/* watch.css — Adjaranett-style series watch page for chcd.
   Player on the left, scrollable episode-list panel on the right, season·episode
   nav bar under the player. Extends base.css tokens only. */

.watch { padding-top: 8px; padding-bottom: 8px; }

/* ── top bar: breadcrumb + search ─────────────────────────────────────────── */
.watch-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 18px; flex-wrap: wrap; margin: 4px 0 14px;
}
.crumbs { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink-dim); }
.crumbs .cur { color: var(--ink-dim); font-weight: 600; }
.watch-search { width: min(320px, 100%); }

/* ── header ───────────────────────────────────────────────────────────────── */
.watch-head { margin-bottom: 14px; }
.watch-head .h-hero { font-size: clamp(1.5rem, 3.4vw, 2.3rem); }

/* ── stage grid ───────────────────────────────────────────────────────────── */
.watch-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 16px;
  align-items: start;
}

/* ── player column ────────────────────────────────────────────────────────── */
.player-col { min-width: 0; }
.player-shell {
  position: relative; aspect-ratio: 16 / 9; background: #000;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.player-shell video, .player-shell .plyr { width: 100%; height: 100%; }
.player-shell .plyr { border-radius: var(--radius); }
.player-shell .wm {
  position: absolute; top: 12px; right: 14px; height: 34px; width: auto;
  opacity: .85; pointer-events: none; z-index: 4;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}
:root { --plyr-color-main: var(--ember); }

.player-empty {
  aspect-ratio: 16 / 9; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.player-empty .em { font-size: 2.4rem; margin-bottom: .4rem; }
.player-empty .es-title { font-weight: 700; color: var(--ink); margin: 0 0 .25rem; }

/* season · episode bar under the player */
.season-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.sb-label { font-weight: 600; color: var(--ink-dim); }
.sb-count { color: var(--muted); font-weight: 600; margin-left: 4px; }
.sb-nav { display: flex; gap: 8px; }
.sb-arrow {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: 1.35rem; line-height: 1;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.sb-arrow:hover { border-color: var(--honey); background: var(--surface-2); }
.sb-arrow:active { transform: scale(.94); }
.sb-arrow.is-disabled { opacity: .35; pointer-events: none; }

/* ── episode panel (right) ────────────────────────────────────────────────── */
.episode-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 15px; border-bottom: 1px solid var(--line);
}
.ph-title { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.panel-tags { display: flex; gap: 8px; padding: 10px 15px; border-bottom: 1px solid var(--line); }
.src-pill {
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  padding: 4px 12px; border-radius: var(--radius-pill);
  background: var(--bg-elev); border: 1px solid var(--line); color: var(--muted);
}
.src-pill.is-on { background: linear-gradient(180deg, var(--honey-hi), var(--honey)); color: var(--honey-ink); border-color: transparent; }

.panel-list { overflow-y: auto; max-height: min(66vh, 620px); scrollbar-width: thin; scrollbar-color: var(--surface-2) transparent; }
.panel-list::-webkit-scrollbar { width: 8px; }
.panel-list::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 4px; }

.ep-row {
  position: relative; display: grid; grid-template-columns: 34px 1fr auto;
  align-items: center; gap: 11px; padding: 11px 14px;
  text-decoration: none; color: var(--ink-dim);
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  transition: background .13s ease, color .13s ease;
}
.ep-row:last-child { border-bottom: 0; }
.ep-row:hover { background: var(--surface-2); color: var(--ink); }
.ep-row:focus-visible { outline: 2px solid var(--honey); outline-offset: -2px; }
.ep-row-no {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 8px; background: var(--bg-elev); color: var(--muted);
  font-weight: 700; font-size: .85rem;
}
.ep-row-t { font-size: .92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-row-state { display: flex; align-items: center; }
.dot-now { width: 9px; height: 9px; border-radius: 50%; background: var(--honey); box-shadow: 0 0 7px var(--honey); }
.dot-watched { color: var(--honey); font-weight: 800; font-size: .82rem; opacity: 0; transition: opacity .15s; }
.ep-row[data-watched="1"] .dot-watched { opacity: .9; }

/* current + watched states */
.ep-row.is-current { background: linear-gradient(90deg, rgba(229,9,20,.16), transparent 80%); color: var(--ink); border-left-color: var(--honey); }
.ep-row.is-current .ep-row-no { background: linear-gradient(180deg, var(--honey-hi), var(--honey)); color: var(--honey-ink); }

/* resume progress bar under each row */
.ep-row .ep-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.ep-row .ep-progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--honey), var(--honey-hi)); }

/* ── responsive: stack panel below player ─────────────────────────────────── */
@media (max-width: 900px) {
  .watch-stage { grid-template-columns: 1fr; }
  .panel-list { max-height: 340px; }
}
@media (max-width: 480px) {
  .season-bar { flex-wrap: wrap; }
  .player-shell .wm { height: 26px; top: 8px; right: 10px; }
}

/* ── season switcher in the episode panel ─────────────────────────────────── */
.season-select-wrap { position: relative; display: inline-flex; align-items: center; }
.season-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  font-family: var(--serif); font-weight: 700; font-size: 1.02rem; color: var(--ink);
  background: var(--bg-elev); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 7px 30px 7px 12px; cursor: pointer; max-width: 200px; line-height: 1.2;
}
.season-select:hover { border-color: var(--honey); }
.season-select:focus-visible { outline: 2px solid var(--honey); outline-offset: 1px; }
.season-select option { background: var(--surface); color: var(--ink); font-family: var(--sans); }
.season-select-caret { position: absolute; right: 11px; pointer-events: none; color: var(--muted); font-size: .78rem; }

/* ── FAQ block under the player/panel stage ───────────────────────────────── */
.watch-faq { margin-top: 28px; }
.faq-title { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 12px; color: var(--ink); }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; color: var(--ink-dim); list-style: none;
  display: flex; align-items: center; gap: 8px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; color: var(--honey); font-weight: 700; width: 1em; flex: none; }
.faq-item[open] summary::before { content: "–"; }
.faq-item[open] summary { color: var(--ink); }
.faq-item p { margin: 10px 0 0; color: var(--muted); line-height: 1.6; }
