/* ================================================
   Video Demo — Authentic Screen Recording Player
   Side-by-side with persistent overlay labels
   ================================================ */

/* --- Container --- */

.video-demo {
  --vd-bg: #0a0c0a;
  --vd-surface: #111311;
  --vd-border: rgba(255, 255, 255, 0.08);
  --vd-text: rgba(255, 255, 255, 0.92);
  --vd-text-muted: rgba(255, 255, 255, 0.55);
  --vd-text-faint: rgba(255, 255, 255, 0.35);
  --vd-pando-accent: #4a8c62;
  --vd-standard-accent: #d7ba7d;
  --vd-radius: var(--radius-lg, 10px);

  position: relative;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  border-radius: var(--vd-radius);
  overflow: hidden;
  background: var(--vd-bg);
  border: 1px solid var(--vd-border);
  box-shadow: none;
  font-family: var(--font-sans, 'Geist', -apple-system, BlinkMacSystemFont, sans-serif);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* When inside the landing page answer-default panel */
.answer-default .video-demo {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  border-radius: clamp(var(--radius-lg, 10px), 2vw, 1.5rem);
}

/* --- Window Chrome (macOS-style top bar) --- */

.video-demo-chrome {
  display: flex;
  align-items: center;
  gap: var(--space-1, 8px);
  padding: 10px 16px;
  background: #141614;
  border-bottom: 1px solid var(--vd-border);
  position: relative;
  z-index: 5;
}

.video-demo-chrome .terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.video-demo-chrome .terminal-dot:nth-child(1) { background: rgba(255, 95, 87, 0.8); }
.video-demo-chrome .terminal-dot:nth-child(2) { background: rgba(255, 189, 46, 0.8); }
.video-demo-chrome .terminal-dot:nth-child(3) { background: rgba(39, 201, 63, 0.8); }

.video-demo-chrome-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono, 'Geist Mono', monospace);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
}

.video-demo-chrome-title code {
  color: var(--vd-pando-accent);
  font-family: inherit;
  font-weight: 600;
}

/* --- Labels Bar (pandō vs Standard agent) --- */

.video-demo-labels-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--vd-border);
  position: relative;
  z-index: 5;
}

.video-demo-bar-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--vd-surface);
}

.video-demo-bar-label--pando {
  border-right: 1px solid var(--vd-border);
}

.video-demo-bar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.video-demo-bar-label--pando .video-demo-bar-dot {
  background: var(--vd-pando-accent);
  box-shadow: 0 0 8px rgba(74, 140, 98, 0.5);
}

.video-demo-bar-label--standard .video-demo-bar-dot {
  background: var(--vd-standard-accent);
  box-shadow: 0 0 8px rgba(215, 186, 125, 0.35);
}

.video-demo-bar-name {
  font-family: var(--font-sans, 'Geist', sans-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.video-demo-bar-label--pando .video-demo-bar-name {
  color: var(--vd-pando-accent);
}

.video-demo-bar-label--standard .video-demo-bar-name {
  color: var(--vd-standard-accent);
}

/* Per-side timers — always match their column color */
.video-demo-bar-timer {
  margin-left: auto;
  font-family: var(--font-mono, 'Geist Mono', monospace);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  min-width: 3.2em;
  text-align: right;
}

.video-demo-bar-label--pando .video-demo-bar-timer {
  color: var(--vd-pando-accent);
}

.video-demo-bar-label--standard .video-demo-bar-timer {
  color: var(--vd-standard-accent);
}

/* --- Video Viewport --- */

.video-demo-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: auto;
  background: #000;
  overflow: hidden;
}

.video-demo-viewport video {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Center divider line --- */

.video-demo-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 3;
  pointer-events: none;
}

/* --- Completion banner (overlays video when pandō finishes) --- */

.video-demo-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 12, 10, 0.92) 0%,
    rgba(10, 12, 10, 0.82) 100%
  );
  border-bottom: 1px solid transparent;
  transition: max-height 400ms cubic-bezier(0.2, 0.8, 0.2, 1),
              padding 400ms cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 300ms ease,
              border-color 300ms ease;
}

.video-demo-banner.is-visible {
  max-height: 60px;
  padding: 12px 20px;
  opacity: 1;
  border-bottom-color: rgba(74, 140, 98, 0.45);
  pointer-events: auto;
}

.video-demo-banner-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.video-demo-banner-check {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--vd-pando-accent);
  color: #0a0c0a;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(74, 140, 98, 0.6);
}

.video-demo-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.video-demo-banner-text strong {
  font-family: var(--font-sans, 'Geist', sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--vd-pando-accent);
  letter-spacing: 0.02em;
}

.video-demo-banner-text span {
  font-family: var(--font-mono, 'Geist Mono', monospace);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-demo-banner-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: calc(var(--radius-sm, 2px) + 2px);
  border: 1px solid rgba(74, 140, 98, 0.55);
  background: rgba(74, 140, 98, 0.14);
  color: var(--vd-pando-accent);
  font-family: var(--font-sans, 'Geist', sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.video-demo-banner-cta:hover {
  background: rgba(74, 140, 98, 0.22);
  border-color: rgba(74, 140, 98, 0.8);
  transform: translateY(-1px);
}

.video-demo-banner-cta:active {
  transform: translateY(0);
}

.video-demo-banner-cta-arrow {
  transition: transform 160ms ease;
}

.video-demo-banner-cta:hover .video-demo-banner-cta-arrow {
  transform: translateX(2px);
}

@media (max-width: 640px) {
  .video-demo-banner {
    padding: 10px 12px;
    gap: 10px;
  }

  .video-demo-banner-text strong {
    font-size: 12px;
  }

  .video-demo-banner-text span {
    font-size: 10px;
  }

  .video-demo-banner-cta {
    padding: 7px 10px;
    font-size: 11px;
  }
}

/* --- Play overlay (veil over entire container) --- */

.video-demo-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: rgba(14, 17, 15, 0.78);
  backdrop-filter: blur(16px) saturate(110%);
  -webkit-backdrop-filter: blur(16px) saturate(110%);
  z-index: 10;
  cursor: pointer;
  border-radius: inherit;
  transition: opacity 400ms ease;
}

.video-demo-play-overlay:hover {
  background: rgba(14, 17, 15, 0.7);
}

.video-demo-play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Headline */
.video-demo-play-headline {
  max-width: 520px;
  margin: 0;
  padding: 0 24px;
  font-family: var(--font-display, 'Geist', -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: clamp(1.15rem, 2.8vw, 1.65rem);
  font-weight: var(--font-weight-light, 300);
  line-height: var(--line-height-snug, 1.3);
  letter-spacing: var(--tracking-tight, -0.015em);
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
}

/* Pill — matches landing-primary-cta (dark-theme variant) */
.video-demo-play-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1, 8px);
  min-height: 2.75rem;
  padding: 0.78rem 1.08rem 0.78rem 0.92rem;
  border-radius: var(--radius-base, 6px);
  border: 1px solid rgba(126, 198, 153, 0.22);
  background: rgba(74, 140, 98, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-mono, 'Geist Mono', monospace);
  font-size: var(--font-size-xs, 12px);
  font-weight: var(--font-weight-medium, 500);
  letter-spacing: var(--tracking-label, 0.06em);
  text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform var(--duration-fast, 150ms) ease, border-color var(--duration-fast, 150ms) ease, background var(--duration-fast, 150ms) ease, box-shadow var(--duration-fast, 150ms) ease;
}

.video-demo-play-overlay:hover .video-demo-play-pill {
  border-color: rgba(126, 198, 153, 0.42);
  background: rgba(74, 140, 98, 0.18);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18), 0 8px 16px rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}

.video-demo-play-overlay:active .video-demo-play-pill {
  background: linear-gradient(180deg, rgba(74, 140, 98, 0.11), rgba(74, 140, 98, 0.07));
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(1px);
}

.video-demo-play-icon {
  font-size: 10px;
  transform: translateX(1px);
}

/* --- Progress bar (thin edge line at bottom of component) --- */

.video-demo-progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 6;
  transition: height 150ms ease;
}

.video-demo-progress:hover {
  height: 4px;
}

.video-demo-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--vd-pando-accent);
  transition: width 100ms linear;
}

.video-demo-progress:hover .video-demo-progress-fill {
  transition: none;
}


/* --- Placeholder state (before video is dropped in) --- */

.video-demo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--vd-bg);
}

/* Hide placeholder content when play overlay is on top */
.video-demo-play-overlay:not(.is-hidden) ~ .video-demo-placeholder {
  opacity: 0.3;
}

.video-demo-placeholder-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-demo-placeholder-icon svg {
  width: 20px;
  height: 20px;
  stroke: rgba(255, 255, 255, 0.2);
  fill: none;
}

.video-demo-placeholder-text {
  font-family: var(--font-mono, 'Geist Mono', monospace);
  font-size: 12px;
  color: var(--vd-text-faint);
  letter-spacing: 0.02em;
}

.video-demo-placeholder-hint {
  font-family: var(--font-sans, 'Geist', sans-serif);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.2);
}

/* --- Responsive --- */

@media (min-width: 1280px) {
  .video-demo-bar-name {
    font-size: 14px;
  }

  .video-demo-chrome-title {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .video-demo-chrome {
    padding: 8px 12px;
  }

  .video-demo-chrome-title {
    font-size: 11px;
  }

  .video-demo-bar-label {
    padding: 7px 12px;
  }

  .video-demo-bar-name {
    font-size: 11px;
  }

  .video-demo-play-pill {
    font-size: 10px;
    padding: 0.45rem 0.75rem 0.45rem 0.65rem;
  }
}

@media (max-width: 480px) {
  .video-demo-chrome-title {
    font-size: 10px;
  }

  .video-demo-bar-name {
    font-size: 10px;
  }

  .video-demo-bar-dot {
    width: 6px;
    height: 6px;
  }

  .video-demo-bar-timer {
    font-size: 10px;
  }
}

/* --- Reduced Motion --- */

@media (prefers-reduced-motion: reduce) {
  .video-demo-play-overlay,
  .video-demo-play-btn,
  .video-demo-progress,
  .video-demo-progress-fill,
  .video-demo-banner,
  .video-demo-banner-cta,
  .video-demo-banner-cta-arrow {
    transition: none;
  }

  .video-demo-banner {
    transform: none;
  }
}
