/* ============================================================
   NINJA* (lafour_theme) — components/video-player.css
   Custom player chrome for Vimeo MP4-progressive playback.
   - Brand-red scrub bar.
   - Brand-red throbber when buffering.
   - Minimal HUD (play / mute / fullscreen).
   ============================================================ */

.lafour-vp {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--c-bg);
  overflow: hidden;
  isolation: isolate;
}

.lafour-vp__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── HUD ─────────────────────────────────────────────────── */
.lafour-vp__hud {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: linear-gradient(to top, rgba(10, 10, 10, 0.85), rgba(10, 10, 10, 0));
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.lafour-vp:hover .lafour-vp__hud,
.lafour-vp.is-paused .lafour-vp__hud,
.lafour-vp:focus-within .lafour-vp__hud {
  opacity: 1;
}

.lafour-vp__btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--c-border-2);
  color: var(--c-text);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.lafour-vp__btn:hover,
.lafour-vp__btn:focus-visible {
  border-color: var(--c-brand);
  color: var(--c-brand);
}
.lafour-vp__btn svg { width: 14px; height: 14px; fill: currentColor; }

/* ── Scrub bar ───────────────────────────────────────────── */
.lafour-vp__bar {
  flex: 1;
  position: relative;
  height: 2px;
  background: var(--c-border-2);
  cursor: pointer;
}
.lafour-vp__bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--c-brand);
  transition: width 80ms linear;
}
.lafour-vp__bar-buffer {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.18);
}
.lafour-vp__bar:hover .lafour-vp__bar-fill {
  background: var(--c-brand);
}

/* ── Time display ────────────────────────────────────────── */
.lafour-vp__time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--c-muted);
  letter-spacing: var(--tracking-wide);
  white-space: nowrap;
}
.lafour-vp__time b {
  color: var(--c-text);
  font-weight: var(--weight-regular);
}

/* ── Buffering throbber ──────────────────────────────────── */
.lafour-vp__throb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.lafour-vp.is-buffering .lafour-vp__throb { opacity: 1; }
.lafour-vp__throb::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 2px solid var(--c-border-2);
  border-top-color: var(--c-brand);
  border-radius: 50%;
  animation: lafour-spin 700ms linear infinite;
}

/* ── Big poster play button (before first play) ─────────── */
.lafour-vp__poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity var(--dur-base) var(--ease-out);
}
.lafour-vp.is-started .lafour-vp__poster {
  opacity: 0;
  pointer-events: none;
}
.lafour-vp__poster::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.2), rgba(10, 10, 10, 0.7));
}
.lafour-vp__poster-play {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.lafour-vp__poster:hover .lafour-vp__poster-play {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 0.2);
}
.lafour-vp__poster-play svg { width: 22px; height: 22px; fill: var(--c-text); }

/* ── Fallback iframe (when MP4 progressive not available) ─ */
.lafour-vp--iframe iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
