/* ==========================================================================
   صفحة تشغيل الفيديو — Player page (player.php). Layout-only: the player
   engine's own CSS (.player-shell/.player-stage/.player-bar/.playlist/etc.)
   lives in site.css and is untouched. This file only arranges what sits
   AROUND the player: the two-column layout, title row, actions row, lessons
   strip, and the two playlist content modes (chapters / more-stories).
   ========================================================================== */

/* Widen the player column area — the two-col layout needs more room than the
   old single-column 1000px cap. */
.player-wrap, .player-below { max-width: 1180px; }

.player-main { min-width: 0; }

/* ── Title row (under the player) ─────────────────────────────────────── */
.player-titlerow {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px 14px; text-align: center; margin: 16px 0 14px;
}
.player-titlerow .player-title { margin: 0; flex: 1 1 100%; }
.player-titlerow .eyebrow { flex: 0 0 auto; }
.scene-count-pill {
  flex: 0 0 auto; font-weight: 700; font-size: .82rem; color: var(--ink-soft);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 6px 14px;
}
.scene-count-pill:empty { display: none; }

/* ── Actions row — pills grouped + colored by FUNCTION:
   listen = solid gold (the star action) · downloads = gold outline ·
   share/fav = quiet neutral. Groups separated by a wider gap + divider. ── */
.player-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 22px; margin: 0 0 18px; }
.pa-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pa-social { position: relative; }
@media (min-width: 561px) {
  .pa-social::before {
    content: ""; position: absolute; top: 8px; bottom: 8px; right: -12px;
    width: 1.5px; background: var(--line); border-radius: 2px;
  }
}
.action-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-family: var(--font-body); font-weight: 700; font-size: .9rem;
  padding: 11px 18px; min-height: 44px; border-radius: var(--radius-pill);
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease, color .15s ease, background .15s ease;
}
.action-pill:active { transform: translateY(0) scale(.98); }
.action-pill:disabled { opacity: .6; cursor: default; }
.action-pill svg { flex: 0 0 auto; }
/* Downloads (audio/PDF/video) — gold outline family. */
.action-pill.act-download {
  border-color: var(--brand); color: var(--brand-strong);
  background: rgba(245, 168, 28, .07);
}
.action-pill.act-download:hover:not(:disabled) { background: rgba(245, 168, 28, .16); transform: translateY(-1px); }
/* Share / favorite — quiet neutral pills. */
.action-pill.act-social:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-strong); transform: translateY(-1px); }
/* Favorite ON state (JS toggles .active). */
.action-pill.active {
  background: linear-gradient(160deg, var(--star), var(--brand) 55%, var(--brand-strong));
  border-color: transparent; color: var(--brand-ink);
  box-shadow: 0 8px 18px rgba(245, 168, 28, .35), inset 0 1.5px 0 rgba(255, 255, 255, .35);
}

/* ── Side playlist content ────────────────────────────────────────────── */
.playlist .pl-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.playlist .pl-title { white-space: normal; line-height: 1.4; }
.playlist .pl-range { font-size: .76rem; font-weight: 600; color: var(--muted); }
.playlist .pl-thumb { aspect-ratio: 16 / 9; width: 76px; height: auto; }
@supports not (aspect-ratio: 16 / 9) {
  .playlist .pl-thumb { width: 76px; height: 43px; }
}
a.playlist-item.playlist-more { text-decoration: none; }
a.playlist-item.playlist-more .pl-thumb { width: 64px; }

@media (max-width: 999px) {
  .playlist { margin-top: 4px; }
}

@media (max-width: 560px) {
  .player-actions { gap: 8px; }
  .action-pill { padding: 10px 14px; font-size: .84rem; }
  .playlist .pl-thumb { width: 64px; }
}
