/* =====================================================================
   Qapsol Template — Content Details page (immersive)
   Full-bleed backdrop with overlaid title/meta/resume, then a tab bar
   (Episodes / More like this / Trailers / Soundtracks / Cast & Crew).
   Reuses tokens + .cm-* / .content-* components from style.css.
   ===================================================================== */

/* ---------------------------------------------------------- hero */
.vhero {
  position: relative;
  width: 100%;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.vhero-media { position: absolute; inset: 0; z-index: 0; }
.vhero-bg { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.vhero-scrim-left {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 16%, rgba(17, 17, 17, 0.6) 45%, rgba(17, 17, 17, 0) 78%);
}
.vhero-scrim-bottom {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--bg) 1%, rgba(17, 17, 17, 0.45) 26%, transparent 55%);
}
.vhero-mute {
  position: absolute; right: var(--gutter); bottom: 34%; z-index: 3;
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff; cursor: pointer; transition: var(--t-fast);
}
.vhero-mute:hover { background: rgba(0, 0, 0, 0.6); border-color: #fff; }

.vhero-content {
  position: relative; z-index: 2;
  width: 100%;            /* full-width, only the gutter pads it (Netflix-style) */
  padding: 0 var(--gutter) 5vh;
}
.vhero-title {
  margin: 0 0 1.1rem;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1;
  letter-spacing: 0.14em; text-transform: uppercase; color: #fff;
}
.vhero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem;
  margin-bottom: 1rem; color: var(--ink); font-weight: 600;
}
.vhero-meta .pill {
  border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 4px;
  padding: 0.12rem 0.55rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em;
}
.vhero-desc { max-width: 48ch; margin-bottom: 1.5rem; color: rgba(255, 255, 255, 0.85); }

.vhero-progress { max-width: 520px; margin-bottom: 1.5rem; }
.vhero-progress-label { margin-bottom: 0.5rem; font-weight: 700; font-size: 0.9rem; color: #fff; }
.vhero-progress-row { display: flex; align-items: center; gap: 1rem; }
.vhero-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
/* watch progress: production sets --watch-progress on the element; demo defaults to 12% */
.vhero-bar > span { display: block; height: 100%; background: var(--accent); width: var(--watch-progress, 12%); }
.vhero-progress-time { font-size: 0.82rem; color: rgba(255, 255, 255, 0.8); white-space: nowrap; }

.vhero-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.btn-resume {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #fff; color: #111;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  padding: 0.85rem 2rem; border-radius: 6px; transition: var(--t-fast);
}
.btn-resume:hover { background: #e6e6e6; color: #111; }
.btn-circle {
  width: 52px; height: 52px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff; cursor: pointer; transition: var(--t-fast);
}
.btn-circle:hover { background: rgba(255, 255, 255, 0.22); border-color: #fff; }

/* ---------------------------------------------------------- tabs */
.vtabs { width: 100%; padding: 0.5rem var(--gutter) 0; }
.vtabs-nav {
  display: flex; gap: 2rem; overflow-x: auto;
  border-bottom: 1px solid var(--border-faint);
}
.vtab {
  position: relative; white-space: nowrap; cursor: pointer;
  background: none; border: 0; padding: 0 0 1rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: var(--ink-muted); transition: var(--t-fast);
}
.vtab:hover { color: #fff; }
.vtab.active { color: #fff; }
.vtab.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--accent);
}
.vtab-panel { padding: var(--sp-6) 0; }
.vtab-panel[hidden] { display: none; }
.vtab-panel > .content-list-container { padding: 0; }

/* episode thumbnail gets a play overlay on this page */
.cm-ep-thumb-link { position: relative; flex: 0 0 150px; display: block; }
.cm-ep-thumb-link .play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; opacity: 0.85; transition: var(--t-fast);
}
.cm-ep-thumb-link .play-badge .material-symbols-outlined { font-size: 3rem; }
.cm-ep-thumb-link:hover .play-badge { opacity: 1; transform: scale(1.05); }
.cm-ep-thumb-link .cm-ep-thumb { flex: none; width: 100%; }

/* trailers grid */
.vtrailers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-4); }
.vtrailer a { position: relative; display: block; }
.vtrailer img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-card); }
.vtrailer .play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff;
}
.vtrailer .play-badge .material-symbols-outlined { font-size: 3rem; }
.vtrailer p { margin: var(--sp-2) 0 0; color: var(--ink-muted); font-size: 0.9rem; }

/* soundtracks list */
.vtracks { list-style: none; margin: 0; padding: 0; max-width: 720px; }
.vtrack { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--border-faint); }
.vtrack .idx { width: 1.5rem; color: var(--ink-dim); font-weight: 700; }
.vtrack .meta { flex: 1; min-width: 0; }
.vtrack .meta strong { display: block; color: var(--ink); font-weight: 600; }
.vtrack .meta span { color: var(--ink-muted); font-size: 0.85rem; }
.vtrack .dur { color: var(--ink-muted); font-size: 0.85rem; white-space: nowrap; }

/* cast & crew grid */
.vcast { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--sp-6); }
.vcast-item { text-align: center; }
.vcast-avatar {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto var(--sp-2);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-faint);
  color: var(--ink-dim); font-family: var(--font-display); font-weight: 700; font-size: 1.4rem;
}
.vcast-item strong { display: block; color: var(--ink); font-weight: 600; font-size: 0.92rem; }
.vcast-item span { color: var(--ink-muted); font-size: 0.8rem; }

/* season select reuse */
.vtab-panel .cm-episodes-head { margin-bottom: var(--sp-4); }

/* ---------------------------------------------------------- responsive */
@media (max-width: 991.98px) {
  .vhero { min-height: 72vh; }
  .vhero-mute { bottom: auto; top: 90px; }
}
@media (max-width: 575.98px) {
  .vhero-scrim-left { background: linear-gradient(0deg, var(--bg) 4%, rgba(17,17,17,0.5) 34%, transparent 70%); }
  .vhero-content { padding-bottom: 3vh; }
  .vhero-desc { font-size: 0.92rem; }
  .vhero-actions .btn-resume { flex: 1 1 auto; justify-content: center; }
  .vtabs-nav { gap: 1.25rem; }
  .vtab { font-size: 0.95rem; }
}
