/* ==========================================================================
   Video modal — club-reference live clips (currently: Schrotty)
   Single shared dialog, populated per-club by video-modal.js from the
   `video`/`description` fields in clubs-data.js.
   ========================================================================== */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-intro);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.video-modal[hidden] {
  display: none;
}

.video-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.video-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: min(92vh, 900px);
  overflow-y: auto;
  background: #050505;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(97, 206, 112, 0.08), 0 30px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 60px -12px rgba(97, 206, 112, 0.2);
  padding: var(--space-md);
  transform: scale(0.94);
  opacity: 0;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}

.video-modal.is-open .video-modal__dialog {
  transform: scale(1);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .video-modal__dialog {
    transition: opacity var(--dur-fast) linear;
    transform: none;
  }
}

/* ---- Close button (>= 44px hit target at every breakpoint) ---- */
.video-modal__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.video-modal__close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.video-modal__close svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* ---- Head: logo, club name, location ---- */
.video-modal__head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-right: 3rem;
  margin-bottom: var(--space-sm);
}

.video-modal__logo {
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated-2);
}

.video-modal__logo[hidden] {
  display: none;
}

.video-modal__head-text {
  min-width: 0;
}

.video-modal__club {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-h3);
  color: var(--text);
  line-height: 1.15;
}

.video-modal__meta {
  margin-top: 0.3em;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.video-modal__tag {
  color: var(--accent);
}

/* ---- Video stage ---- */
.video-modal__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  isolation: isolate;
}

.video-modal__stage:fullscreen,
.video-modal__stage:-webkit-full-screen {
  aspect-ratio: auto;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

/* Same clip, scaled up + heavily blurred behind the contained video so
   portrait/odd-ratio footage never shows plain black bars. */
.video-modal__bg {
  position: absolute;
  inset: -12%;
  z-index: 0;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(44px) brightness(0.35) saturate(1.1);
  transform: scale(1.06);
}

.video-modal__video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

/* ---- Prominent "enable sound" toggle (autoplay always starts muted) ---- */
.video-modal__unmute {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.55em 0.95em;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.video-modal__unmute:hover,
.video-modal__unmute[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.video-modal__unmute svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* ---- Transport bar: play/pause, progress, time, fullscreen ---- */
.video-modal__transport {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0) 100%);
}

.video-modal__playpause,
.video-modal__fullscreen {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.video-modal__playpause:hover,
.video-modal__fullscreen:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.video-modal__playpause svg,
.video-modal__fullscreen svg {
  width: 1rem;
  height: 1rem;
}

.video-modal__progress {
  position: relative;
  flex: 1;
  height: 2rem;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.video-modal__progress::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.video-modal__progress-fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 4px;
  width: 0%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: var(--accent);
  pointer-events: none;
}

.video-modal__time {
  flex-shrink: 0;
  min-width: 6.5ch;
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

/* ---- Description ---- */
.video-modal__desc {
  margin-top: var(--space-sm);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Footer: "LIVE AT ..." + booking CTA ---- */
.video-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

.video-modal__live {
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

@media (max-width: 640px) {
  .video-modal {
    padding: 12px;
  }

  .video-modal__dialog {
    max-height: calc(100svh - 24px);
    padding: var(--space-sm);
  }

  .video-modal__head {
    gap: var(--space-xs);
  }

  .video-modal__club {
    font-size: 1.1rem;
  }

  .video-modal__desc {
    -webkit-line-clamp: 3;
  }

  .video-modal__footer {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }

  .video-modal__footer .btn {
    width: 100%;
    justify-content: center;
  }

  .video-modal__unmute span {
    display: none;
  }
}
