/**
 * Social Content Showcase — Scoped Frontend Stylesheet
 *
 * Strictly isolated under `.scs-showcase` using `--scs-*` CSS custom properties
 * so WordPress themes, Elementor containers, and Gutenberg blocks never suffer style bleed.
 */

.scs-showcase {
  --scs-cols-desktop: 4;
  --scs-cols-tablet: 2;
  --scs-cols-mobile: 1;
  --scs-gap-desktop: 20px;
  --scs-gap-tablet: 16px;
  --scs-gap-mobile: 12px;
  --scs-ratio-desktop: 9 / 16;
  --scs-ratio-tablet: 9 / 16;
  --scs-ratio-mobile: 9 / 16;
  --scs-card-bg: #ffffff;
  --scs-border-color: #e2e8f0;
  --scs-accent-color: #2563eb;
  --scs-radius: 14px;
  --scs-single-max-w: 480px;
  --scs-transition-ms: 400ms;

  --scs-active-cols: var(--scs-cols-desktop);
  --scs-active-gap: var(--scs-gap-desktop);
  --scs-active-ratio: var(--scs-ratio-desktop);

  position: relative;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: inherit;
  color: #0f172a;
}

.scs-showcase *,
.scs-showcase *::before,
.scs-showcase *::after {
  box-sizing: border-box;
}

/* Responsive Breakpoint Token Resolution & Device Visibility */
@media (min-width: 1025px) {
  .scs-showcase.scs-hide-desktop {
    display: none !important;
  }
  .scs-showcase.scs-no-arrows-desktop .scs-nav-arrow {
    display: none !important;
  }
  .scs-showcase.scs-no-dots-desktop .scs-dots {
    display: none !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .scs-showcase {
    --scs-active-cols: var(--scs-cols-tablet);
    --scs-active-gap: var(--scs-gap-tablet);
    --scs-active-ratio: var(--scs-ratio-tablet);
  }
  .scs-showcase.scs-hide-tablet {
    display: none !important;
  }
  .scs-showcase.scs-no-arrows-tablet .scs-nav-arrow {
    display: none !important;
  }
  .scs-showcase.scs-no-dots-tablet .scs-dots {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .scs-showcase {
    --scs-active-cols: var(--scs-cols-mobile);
    --scs-active-gap: var(--scs-gap-mobile);
    --scs-active-ratio: var(--scs-ratio-mobile);
  }
  .scs-showcase.scs-hide-mobile {
    display: none !important;
  }
  .scs-showcase.scs-no-arrows-mobile .scs-nav-arrow {
    display: none !important;
  }
  .scs-showcase.scs-no-dots-mobile .scs-dots {
    display: none !important;
  }
}

/* Editor Setup Placeholder */
.scs-showcase.scs-editor-placeholder {
  padding: 28px 24px;
  border: 1px dashed #94a3b8;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

.scs-showcase .scs-editor-placeholder-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.scs-showcase .scs-editor-placeholder-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

/* ==========================================================================
   1. CAROUSEL LAYOUT
   ========================================================================== */

.scs-showcase .scs-carousel-shell,
.scs-showcase .scs-slider-shell {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.scs-showcase .scs-carousel-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
  outline: none;
}

.scs-showcase .scs-carousel-viewport:focus-visible,
.scs-showcase .scs-slider-viewport:focus-visible {
  box-shadow: 0 0 0 2px var(--scs-accent-color);
  border-radius: var(--scs-radius);
}

.scs-showcase .scs-carousel-track {
  display: flex;
  align-items: stretch;
  gap: var(--scs-active-gap);
  will-change: transform;
  transition: transform var(--scs-transition-ms) cubic-bezier(0.22, 1, 0.36, 1);
}

.scs-showcase .scs-carousel-slide {
  flex: 0 0 calc((100% - (var(--scs-active-cols) - 1) * var(--scs-active-gap)) / var(--scs-active-cols));
  min-width: 0;
  margin: 0;
}

/* ==========================================================================
   2. SLIDER LAYOUT (FEATURED STAGE + ADJACENT PREVIEW + THUMBNAILS)
   ========================================================================== */

.scs-showcase .scs-slider-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
  outline: none;
}

.scs-showcase .scs-slider-track {
  display: flex;
  align-items: stretch;
  will-change: transform;
  transition: transform var(--scs-transition-ms) cubic-bezier(0.22, 1, 0.36, 1);
}

.scs-showcase .scs-slider-slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  transition: opacity var(--scs-transition-ms) ease, transform var(--scs-transition-ms) ease;
}

.scs-showcase .scs-slider-slide > .scs-card {
  width: 100%;
  max-width: 560px;
}

/* Adjacent Video Peek Mode */
.scs-showcase .scs-slider-shell.scs-slider-adjacent .scs-slider-track {
  gap: var(--scs-active-gap);
}

@media (min-width: 768px) {
  .scs-showcase .scs-slider-shell.scs-slider-adjacent .scs-slider-viewport {
    padding: 0 12%;
  }
  .scs-showcase .scs-slider-shell.scs-slider-adjacent .scs-slider-slide:not(.is-active) {
    opacity: 0.52;
    transform: scale(0.94);
  }
}

/* Slider Thumbnail Strip */
.scs-showcase .scs-slider-thumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.scs-showcase .scs-thumb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--scs-border-color);
  border-radius: 10px;
  background: var(--scs-card-bg);
  color: #334155;
  cursor: pointer;
  max-width: 190px;
  flex-shrink: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
  opacity: 0.72;
}

.scs-showcase .scs-thumb-btn:hover,
.scs-showcase .scs-thumb-btn.is-active {
  opacity: 1;
  border-color: var(--scs-accent-color);
}

.scs-showcase .scs-thumb-btn.is-active {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--scs-accent-color) 24%, transparent);
}

.scs-showcase .scs-thumb-img,
.scs-showcase .scs-thumb-fallback {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.scs-showcase .scs-thumb-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  background: #0f172a;
  color: #f8fafc;
}

.scs-showcase .scs-thumb-caption {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   3. SINGLE VIDEO SPOTLIGHT LAYOUT
   ========================================================================== */

.scs-showcase .scs-single-stage {
  display: flex;
  width: 100%;
}

.scs-showcase .scs-single-stage.scs-align-left {
  justify-content: flex-start;
}

.scs-showcase .scs-single-stage.scs-align-center {
  justify-content: center;
}

.scs-showcase .scs-single-stage.scs-align-right {
  justify-content: flex-end;
}

.scs-showcase .scs-single-slide {
  width: 100%;
  max-width: var(--scs-single-max-w);
  margin: 0;
}

/* ==========================================================================
   4. CARD, RESPONSIVE ASPECT-RATIO MEDIA FRAME & LAZY POSTER
   ========================================================================== */

.scs-showcase .scs-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--scs-card-bg);
  border: 1px solid var(--scs-border-color);
  border-radius: var(--scs-radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.scs-showcase .scs-media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--scs-active-ratio);
  background: #090d16;
  overflow: hidden;
}

.scs-showcase .scs-player-mount {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.scs-showcase .scs-player-mount iframe,
.scs-showcase .scs-player-mount video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.scs-showcase .scs-poster-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
}

.scs-showcase .scs-media-frame.is-hydrated .scs-poster-layer {
  display: none;
}

.scs-showcase .scs-poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.scs-showcase .scs-card:hover .scs-poster-img {
  transform: scale(1.025);
}

.scs-showcase .scs-poster-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scs-showcase .scs-play-trigger {
  position: relative;
  z-index: 3;
  width: 60px;
  height: 60px;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 180ms ease, background-color 180ms ease;
}

.scs-showcase .scs-play-trigger:hover,
.scs-showcase .scs-play-trigger:focus-visible {
  background: var(--scs-accent-color);
  transform: scale(1.08);
  outline: none;
}

.scs-showcase .scs-play-icon {
  font-size: 18px;
  line-height: 1;
  margin-left: 3px;
}

/* Platform & Verified View Count Overlays */
.scs-showcase .scs-media-overlays {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.scs-showcase .scs-media-frame.is-hydrated .scs-media-overlays {
  opacity: 0;
  transition: opacity 200ms ease;
}

.scs-showcase .scs-media-frame.is-hydrated:hover .scs-media-overlays {
  opacity: 1;
}

.scs-showcase .scs-platform-tag,
.scs-showcase .scs-views-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}

/* Unavailable Video Fallback */
.scs-showcase .scs-unavailable-fallback {
  position: absolute;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #0f172a;
  color: #cbd5e1;
}

.scs-showcase .scs-unavailable-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
}

.scs-showcase .scs-unavailable-link {
  font-size: 12px;
  font-weight: 600;
  color: #93c5fd;
  text-decoration: underline;
}

/* Card Text & CTA Footer */
.scs-showcase .scs-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
  flex: 1 1 auto;
}

.scs-showcase .scs-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.38;
  color: #0f172a;
}

.scs-showcase .scs-card-description {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

.scs-showcase .scs-card-description p {
  margin: 0;
}

.scs-showcase .scs-card-cta-wrap {
  margin-top: auto;
  padding-top: 6px;
}

.scs-showcase .scs-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--scs-accent-color);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: filter 160ms ease;
}

.scs-showcase .scs-card-cta:hover,
.scs-showcase .scs-card-cta:focus-visible {
  filter: brightness(0.93);
  color: #ffffff;
}

/* ==========================================================================
   5. NAVIGATION ARROWS & PAGINATION DOTS
   ========================================================================== */

.scs-showcase .scs-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid var(--scs-border-color);
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.scs-showcase .scs-nav-prev {
  left: 10px;
}

.scs-showcase .scs-nav-next {
  right: 10px;
}

.scs-showcase .scs-nav-arrow:hover:not(:disabled),
.scs-showcase .scs-nav-arrow:focus-visible:not(:disabled) {
  background: var(--scs-accent-color);
  border-color: var(--scs-accent-color);
  color: #ffffff;
  outline: none;
}

.scs-showcase .scs-nav-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.scs-showcase .scs-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.scs-showcase .scs-dot {
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  border: 0;
  padding: 0;
  background: #cbd5e1;
  cursor: pointer;
  transition: width 180ms ease, background-color 180ms ease;
}

.scs-showcase .scs-dot.is-active {
  width: 24px;
  background: var(--scs-accent-color);
}

@media (prefers-reduced-motion: reduce) {
  .scs-showcase .scs-carousel-track,
  .scs-showcase .scs-slider-track,
  .scs-showcase .scs-slider-slide,
  .scs-showcase .scs-poster-img,
  .scs-showcase .scs-play-trigger,
  .scs-showcase .scs-dot {
    transition: none !important;
  }
}
