/* ---------- A title's page (js/detail.js): rating, trailer, credits, badges, seasons; tokens from app.css :root ---------- */
/* A detail page's rating choices (app.js): wraps like .row-btns, every choice a full target. */
.rate-group { display: flex; flex-wrap: wrap; gap: 12px; }
.rate-group > * { min-height: 44px; min-width: 44px; }
/* Trailer: YouTube's player at 16:9, as large as the screen allows (a phone on its side too). */
.trailer-dialog { width: min(1100px, 94vw, calc(78vh * 16 / 9)); margin: auto; border: 0; padding: 12px; color: var(--ink); background: #000; border-radius: 16px; }
.trailer-dialog::backdrop { background: rgba(0, 0, 0, .85); }
.trailer-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; background: #000; }
.trailer-dialog .row-btns { justify-content: center; margin-top: 12px; }
/* Cast, director and genres under the buttons: links, so a remote reaches them on its way down. */
.credits { display: grid; gap: 8px; margin-top: 18px; }
/* The labels sit in a gutter, so every line's chips start at one edge: Down from a chip, or from the
   buttons, reaches the chip right below it instead of skipping a line whose label pushed it aside. */
.credit-line { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding-left: 7rem; }
.credit-label { position: absolute; left: 0; top: 0; height: 36px; display: flex; align-items: center; color: var(--muted); font-weight: 600; font-size: .92rem; }
.credits .chip { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; color: var(--ink); text-decoration: none; }
/* Height reserved: the language badges arrive after PlaybackInfo, without pushing the text down. */
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; min-height: 28px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(244, 239, 230, .12); font-size: .85rem; font-weight: 700; }
.badge .icon { width: 16px; height: 16px; }
.badge.good { background: rgba(60, 207, 142, .18); color: #9ff0c9; }
.badge.warn { background: rgba(245, 184, 65, .18); color: #ffd98a; }
@media (hover: hover) {
  .episode:hover { background: rgba(244, 239, 230, .1); }
  .episode:hover p { display: block; }
}
/* One row of buttons on a TV, so Play to Benzerleri stays two or three presses: the buttons take the
   screen's width (a resumed, dubbed film with a trailer has seven, about 75rem in the text face at 700), and
   only the text keeps a reading width. In rem, so html.tv's 125% scales it with the labels. */
html.tv .detail-body { max-width: none; }
html.tv .detail-body > :not(.row-btns) { max-width: 52rem; }
@supports not (aspect-ratio: 1) {
  .trailer-frame { height: calc((min(1100px, 94vw, 78vh * 16 / 9) - 24px) * 9 / 16); }
  /* An img's padding hides the picture: a height, from the column's 240px (120px on a phone). */
  .episode img { height: 135px; }
  @media (max-width: 720px) { .episode img { height: 67.5px; } }
}
/* ---------- seasons ---------- */
.seasons { padding: 0 var(--gutter); }
.season-tabs { display: flex; gap: 8px; overflow-x: auto; padding: calc(8px + var(--ring-out)) var(--ring-out) calc(4px + var(--ring-out)); margin: calc(-1 * var(--ring-out)); scrollbar-width: none; }
.tab { padding: 10px 16px; border-radius: 999px; background: rgba(244, 239, 230, .1); font-weight: 700; white-space: nowrap; }
.tab.active { background: var(--ink); color: var(--ink-inv); }
.episodes { display: grid; gap: 10px; }
.episode { position: relative; display: grid; grid-template-columns: minmax(120px, 240px) 1fr; gap: 16px; text-align: left; padding: 10px; border-radius: var(--radius); background: rgba(244, 239, 230, .04); }
.episode:focus { background: rgba(244, 239, 230, .1); }
.episode img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: var(--panel); }
.episode img.broken { visibility: hidden; }
.episode h3 { margin: 4px 0 6px; font-size: 1.05rem; }
.episode p { margin: 0; color: var(--muted); font-size: var(--t-callout-size); line-height: var(--t-callout-lh); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* An episode shows its whole text where the remote or the keyboard rests (a tap plays it, so touch
   screens show it in full; a mouse gets it on hover, below). */
.episode:focus p { display: block; }
@media (hover: none) { .episode p { display: block; } }
@media (max-width: 720px) {
  /* No remote here: the label leads its line. */
  .credit-line { padding-left: 0; }
  .credit-label { position: static; height: auto; margin-right: 4px; }
  .episode { grid-template-columns: 120px 1fr; }
  .tab { min-height: 44px; }
}
.btn.seen .icon { opacity: .45; }
.btn.seen[aria-pressed="true"] .icon { opacity: 1; color: var(--good); stroke-width: 2.5; }
/* One button size and one baseline: "Sezonu izlendi olarak işaretle" next to "Sezonu indir". */
.season-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin: 4px 0 12px; }
/* A long press on an episode (app.js) shows it is being held from 150 ms: a slow press-in, transform only. */
.episode { transition: transform 200ms var(--ease-out); }   /* let go, it eases back from the hold */
.episode.holding { transform: scale(.97); transition: transform 450ms var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .episode.holding { transform: none; opacity: .7; } }
