/*
 * Modular Testimonial Carousel. Ported unchanged from the Unlimited Elements widget `modular_testimonial_carousel`.
 * The original CSS is not scoped to the widget and uses a few !important rules; both are kept so the look is identical.
 * Class names unchanged.
 */
/* ==========================================================================
   1. LAYOUT FRAME & BASE ADJUSTMENTS
   ========================================================================== */
.ps-carousel-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 48px !important;
  border-radius: 16px !important;
}

.ps-carousel-track-wrapper {
  width: 100%;
  overflow: hidden;
}

.ps-carousel-track {
  display: flex;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.ps-carousel-slide {
  min-width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   2. TWO-COLUMN BALANCED SPLIT GRID MESH
   ========================================================================== */
.ps-testimonial-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.ps-t-left-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* Logo sizing: defaults live here, per-slide text fields override inline.
   No !important so the inline style values from the HTML can win. */
.ps-t-company-logo {
  max-height: 44px;   /* default when no field is set */
  max-width: 220px;   /* default when no field is set */
  width: auto;
  height: auto;
  object-fit: contain;
  margin-bottom: 24px;
}

/* Light mode: hide dark logos */
.ps-mode-light .ps-logo-dark { display: none; }

/* Dark mode: hide light logo only when a dark alternative is present (fallback: light shows if no dark logo added) */
.ps-mode-dark .ps-t-left-col:has(.ps-logo-dark) .ps-logo-light { display: none; }

/* Dark mode: hide dark logos (they only show in dark mode) */
.ps-mode-light .ps-logo-dark { display: none; }

/* Auto-invert dark logos to white — remove this if uploading a custom pre-inverted logo */
.ps-logo-dark { filter: brightness(0) invert(1); }

.ps-t-content {
  position: relative;
  width: 100%;
  margin-bottom: 32px;
}

.ps-t-quote-mark {
  position: absolute;
  top: -24px;
  left: 0;
  font-family: "Source Sans 3", Georgia, serif;
  font-size: 80px;
  line-height: 1;
  opacity: 0.2;
  user-select: none;
}

.ps-t-text {
  margin: 0;
  font-size: 24px;
  line-height: 1.55;
  font-weight: 400;
  position: relative;
  z-index: 2;
  letter-spacing: -0.01em;
}

.ps-t-attribution-zone {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  width: 100%;
}

.ps-t-author-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.ps-t-name {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 700;
}

.ps-t-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.ps-t-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-badge-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 100px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* ==========================================================================
   3. MEDIA CARD POSTER IMAGE
   ========================================================================== */
.ps-t-right-col {
  width: 100%;
}

.ps-media-poster-card {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-media-poster-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  z-index: 0;
}

.ps-media-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background-color: #076fb8 !important;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(7, 111, 184, 0.35);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s;
  outline: none !important;
}

.ps-media-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.06);
  background-color: #0662a3 !important;
}

.ps-media-play-btn svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}

.ps-media-chip {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background-color: #011825;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

.ps-media-chip .ps-chip-dot {
  width: 6px;
  height: 6px;
  background-color: #1b9af0;
  border-radius: 50%;
}

/* ==========================================================================
   4. INTERACTIVE DIRECTIONAL CONTROLS
   ========================================================================== */
.ps-carousel-header-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 24px;
  position: relative;
  z-index: 10;
}

.ps-carousel-arrows {
  display: flex;
  gap: 12px;
}

/* Debug pause button — hide with .ps-debug-pause { display: none; } when done */
.ps-debug-pause {
  height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 2px dashed #f59e0b;
  background: transparent;
  color: #f59e0b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ps-carousel-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  outline: none !important;
}

.ps-carousel-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.ps-carousel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid;
}

.ps-carousel-dots {
  display: flex;
  gap: 8px;
}

.ps-carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background-color: #cbd5e1;
  transition: all 0.2s ease-in-out;
  outline: none !important;
}

.ps-carousel-counter {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ps-carousel-divider {
  font-weight: 400;
  margin: 0 2px;
}

/* ==========================================================================
   5. LIGHT vs DARK THEME DESIGN SYSTEM VARIATIONS
   ========================================================================== */

/* --- LIGHT MODE ENVIRONMENT (Screenshot 1 Match Layout) --- */
.ps-mode-light {
  background-color: #f8fafc !important;
  border: 1px solid #eaecf0 !important;
}
.ps-mode-light .ps-carousel-footer { border-top-color: #eaecf0; }
.ps-mode-light .ps-badge-feature { background-color: #eef3f8; color: #076fb8; }
.ps-mode-light .ps-badge-status { background-color: #f1f5f9; color: #475569; border: 1px dashed #cbd5e1; }
.ps-mode-light .ps-t-text { color: #011825; }
.ps-mode-light .ps-t-quote-mark { color: #076fb8; }
.ps-mode-light .ps-t-name { color: #011825; }
.ps-mode-light .ps-t-title { color: #475467; }
.ps-mode-light .ps-carousel-counter { color: #076fb8; }
.ps-mode-light .ps-carousel-divider { color: #cbd5e1; }
.ps-mode-light .ps-carousel-dot.is-active { background-color: #076fb8; width: 20px; border-radius: 100px; }

/* Fixed Light Mode Arrow rollover overrides */
.ps-mode-light .ps-carousel-arrow { border: 1px solid #eaecf0; color: #475467; background-color: #ffffff; }
.ps-mode-light .ps-carousel-arrow:hover { background-color: #076fb8 !important; color: #ffffff !important; border-color: #076fb8 !important; }
.ps-mode-light .ps-carousel-prev:hover svg { transform: translateX(-2px); }
.ps-mode-light .ps-carousel-next:hover svg { transform: translateX(2px); }

/* --- DARK MODE ENVIRONMENT (Screenshot 2 Match Layout) --- */
.ps-mode-dark {
  background-color: #011825 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.ps-mode-dark .ps-carousel-footer { border-top-color: rgba(255, 255, 255, 0.08); }
.ps-mode-dark .ps-badge-feature { background-color: rgba(27, 154, 240, 0.12); color: #1b9af0; }
.ps-mode-dark .ps-badge-status { background-color: rgba(255, 255, 255, 0.04); color: rgba(255, 255, 255, 0.65); border: 1px dashed rgba(255, 255, 255, 0.15); }
.ps-mode-dark .ps-t-text { color: #ffffff; }
.ps-mode-dark .ps-t-quote-mark { color: #076fb8; }
.ps-mode-dark .ps-t-name { color: #ffffff; }
.ps-mode-dark .ps-t-title { color: #cbd5e1; }
.ps-mode-dark .ps-carousel-counter { color: #1b9af0; }
.ps-mode-dark .ps-carousel-divider { color: rgba(255, 255, 255, 0.2); }
.ps-mode-dark .ps-carousel-dot.is-active { background-color: #1b9af0; width: 20px; border-radius: 100px; }

/* Fixed Dark Mode Arrow rollover overrides */
.ps-mode-dark .ps-carousel-arrow { border: 1px solid rgba(255, 255, 255, 0.1); color: #cbd5e1; background-color: rgba(255, 255, 255, 0.02); }
.ps-mode-dark .ps-carousel-arrow:hover { background-color: #1b9af0 !important; color: #ffffff !important; border-color: #1b9af0 !important; }
.ps-mode-dark .ps-carousel-prev:hover svg { transform: translateX(-2px); }
.ps-mode-dark .ps-carousel-next:hover svg { transform: translateX(2px); }

/* ==========================================================================
   6. PREMIUM MODAL LIGHTBOX LAYOUT MODULE
   ========================================================================== */
.ps-video-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ps-video-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ps-lightbox-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(1, 24, 37, 0.5);
  backdrop-filter: blur(8px);
}

.ps-lightbox-container {
  position: relative;
  width: 90%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  background-color: #000000;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  z-index: 2;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.ps-video-lightbox.is-open .ps-lightbox-container {
  transform: scale(1);
}

.ps-lightbox-close {
  position: absolute;
  top: -44px;
  right: -12px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 36px;
  cursor: pointer;
  outline: none;
  padding: 8px;
  line-height: 1;
}

.ps-lightbox-close:hover,
.ps-lightbox-close:focus,
.ps-lightbox-close:active {
  background: transparent !important;
  color: #ffffff !important;
  outline: none !important;
  box-shadow: none !important;
}

.ps-lightbox-video-frame {
  width: 100%;
  height: 100%;
}

.ps-lightbox-video-frame iframe,
.ps-lightbox-video-frame video {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* ==========================================================================
   7. RESPONSIVE COMPACT MEDIA BREAKPOINTS
   ========================================================================== */
@media (max-width: 991px) {
  .ps-carousel-container { padding: 32px !important; }
  .ps-testimonial-grid { grid-template-columns: 1fr; gap: 40px; }
  .ps-carousel-header-row { margin-bottom: 0px; }
}

@media (max-width: 767px) {
  .ps-carousel-container { padding: 24px !important; }
  .ps-t-text { font-size: 18px; }
  .ps-t-attribution-zone { flex-direction: column; align-items: flex-start; gap: 14px; }
}