/* ---------- Ara (js/searchpage.js); tokens from app.css :root ---------- */
/* Phone and computer: the field, then the rows under it (two columns from 1100 px). TV: the keyboard
   on the left, the results in a window on the right (below). */
.s-page { padding: calc(84px + env(safe-area-inset-top)) var(--gutter) 0; }
.search-bar { max-width: 760px; }
.field.search { font-size: 1.4rem; padding: 18px 20px; }
.s-win { margin-top: 20px; }
.s-track { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
@media (min-width: 1100px) {
  html:not(.tv) .s-track { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  html:not(.tv) .s-track > :not(.s-res):not(.lv-item) { grid-column: 1 / -1; }
}
.s-head { font-size: var(--fs-detail); font-weight: 700; color: var(--muted); margin: 20px 0 8px; line-height: 1.3; }
.s-sec:first-child .s-head, .s-track > .s-head:first-child { margin-top: 0; }

/* A result: the poster at one left edge, the name with what was typed underlined, then the facts
   ("Dizi, 2023, Türkçe dublajlı"); the TV adds what OK does on the focused row. */
.s-res { display: flex; align-items: center; padding: 8px; border-radius: var(--r2); color: var(--ink); }
.s-res > .s-art { flex: none; margin-right: 18px; }
.s-text { display: block; flex: 1; min-width: 0; }
.s-art { display: block; width: 60px; height: 90px; border-radius: var(--r1); object-fit: cover; background: var(--panel-1); }
.s-name { font-size: var(--fs-body); font-weight: 700; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.s-line { display: block; font-size: var(--fs-detail); color: var(--muted); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-hit { border-bottom: 2px solid currentColor; }
.s-res.skel .s-text::before { content: ""; display: block; width: 45%; height: 1.1em; border-radius: var(--r1); background: var(--panel-1); }
@media (hover: hover) and (pointer: fine) { html:not(.tv) .s-res:hover { background: rgba(244, 239, 230, .06); } }
/* Channels: the Canlı TV list item (live.js), as a row. */
.s-track .lv-item { grid-template-columns: 60px minmax(0, 1fr) auto; column-gap: 18px; padding: 8px; background: none; color: var(--ink); }
.s-track .lv-item .lv-logo { width: 60px; }

/* A person the query named, or a list the search read as a mood or kind ("komedi", "kore dizisi"). */
.s-person, .s-facet { margin: 0 0 12px; }
.s-kicker { margin: 0 0 4px; font-size: var(--fs-detail); font-weight: 700; color: var(--ink-3); }
.s-big { margin: 0; font-family: var(--serif); font-weight: 500; font-size: calc(var(--fs-row) * 1.25); line-height: 1.15; letter-spacing: -.01em; }
.s-sub { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-detail); }
.s-none { padding: 8px 0; }

/* The empty page: recent searches, moods, Keşfet. */
.s-sec + .s-sec { margin-top: 28px; }
.s-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.s-moods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 980px; }
.s-mood { display: flex; flex-direction: column; justify-content: flex-end; min-height: 112px; padding: 16px 18px; border-radius: var(--r2); background: var(--panel-2); text-align: left; color: var(--ink); }
.s-mood-l { font-family: var(--serif); font-weight: 500; font-size: var(--fs-deck); line-height: 1.15; }
.s-mood-s { margin-top: 6px; font-size: var(--fs-detail); color: var(--muted); line-height: 1.3; }
.s-mood:focus-visible { background: var(--panel-3); }
@media (hover: hover) and (pointer: fine) { .s-mood:hover { background: var(--panel-3); } }
@media (max-width: 720px) {
  .field.search { font-size: 1.1rem; padding: 14px 16px; }
  .s-moods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .s-mood { min-height: 92px; padding: 12px 14px; }
  .s-art { width: 52px; height: 78px; }
  .s-res, .s-track .lv-item { column-gap: 14px; padding: 6px 0; }
  .s-res > .s-art { margin-right: 14px; }
  .s-track .lv-item { grid-template-columns: 52px minmax(0, 1fr); }
  .s-track .lv-item .lv-logo { width: 52px; }
}

/* ---------- TV (1920 x 1080): keyboard x 106..706, results x 770..1814, y 130..1026 ---------- */
/* The page never scrolls (its window does), so the remote's moves never scroll the document. Every
   focusable sits a ring's reach (--ring-out) inside the overscan line. Keys and rows are filled when
   focused, never ringed or scaled. */
html.tv main.s-main { padding-bottom: 0; }
html.tv .s-page { display: flex; align-items: flex-start; height: 1080px; padding: 130px calc(var(--m) + var(--ring-out)) 0; contain: paint; }
html.tv .s-left { flex: none; width: 600px; margin-right: 64px; }
html.tv .s-right { flex: 1; min-width: 0; }
html.tv .s-left, html.tv .s-right { border-radius: var(--r3); }
/* The column with focus is faintly lit, so it is clear which side OK acts on. */
html.tv .s-left:focus-within, html.tv .s-right:focus-within { background: rgba(244, 239, 230, .035); }
html.tv .s-q { contain: strict; direction: rtl; text-align: left; white-space: nowrap; overflow: hidden; height: 96px; padding: 10px 0 0; border-bottom: 3px solid var(--ink-2);
  font-family: var(--serif); font-weight: 500; font-size: 64px; line-height: 1.15; letter-spacing: -.02em; }
html.tv .s-qt, html.tv .s-ph { direction: ltr; unicode-bidi: isolate; }
html.tv .s-ph { font-size: 34px; color: var(--ink-3); vertical-align: .35em; }
html.tv .s-q.typed .s-ph, html.tv .s-q:not(.typed) .s-qt { display: none; }
html.tv .s-qt::after, html.tv .s-ph::before { content: ""; display: inline-block; width: 4px; height: .8em; background: var(--ink); vertical-align: -.06em; }
html.tv .s-qt::after { margin-left: 6px; }
html.tv .s-ph::before { margin-right: 10px; height: 1.4em; vertical-align: -.3em; }
html.tv .s-compl { display: flex; gap: 10px; height: 60px; margin: 16px 0 18px; contain: strict; }
html.tv .s-compl .chip { flex: 0 1 auto; min-width: 0; height: 60px; padding: 0 22px; font-size: 28px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.tv .kb { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
html.tv .kb-key { height: 68px; border-radius: var(--r2); background: var(--panel-2); font-size: 36px; font-weight: 500; line-height: 1; color: var(--ink); }
html.tv .kb-key.wide { grid-column: span 2; font-size: 28px; font-weight: 600; }
html.tv .kb-key:focus, html.tv .s-compl .chip:focus { background: var(--focus-c); color: var(--ink-inv); box-shadow: none; }

/* The window: whole rows only. The list moves under it by one transform (searchpage.js place); a row
   it can't show whole is hidden. Its padding keeps a chip's or a tile's ring inside the clip. */
/* Layout stays inside the window (contain: strict) and inside each row (fixed height): an answer lays
   out its rows only, never the keyboard. */
html.tv .s-win { height: 896px; margin: 0; padding: var(--ring-out); contain: strict; }
html.tv .s-track { display: block; will-change: transform; }
html.tv .s-track > * { margin: 0 0 6px; }
html.tv .s-track > .out { visibility: hidden; }
html.tv .s-warm { position: absolute; top: 0; left: 0; visibility: hidden; }
html.tv .s-warm > span { white-space: nowrap; }
html.tv .s-res, html.tv .s-track .lv-item { display: block; position: relative; width: 100%; height: 134px; padding: 0 280px 0 110px; contain: strict; transition: none; }
html.tv .s-res > .s-art, html.tv .s-track .lv-item > .lv-logo { position: absolute; left: 10px; top: 10px; }
/* What OK does, on the focused row only ("OK Diziyi aç"): one element the page moves to that row. */
html.tv .s-okh { display: none; position: absolute; right: 20px; top: 45px; align-items: center; gap: 12px; font-size: var(--fs-tv-min); font-weight: 700; line-height: 1.4; white-space: nowrap; }
html.tv .s-res:focus > .s-okh, html.tv .s-track .lv-item:focus > .s-okh { display: flex; }
html.tv .s-res > .s-text { padding-top: 26px; }
html.tv .s-name { display: block; white-space: nowrap; text-overflow: ellipsis; -webkit-line-clamp: none; }
html.tv .s-art { width: 76px; height: 114px; }
html.tv .s-line { display: block; font-size: var(--fs-tv-min); }
html.tv .s-res:focus, html.tv .s-track .lv-item:focus { background: var(--focus-c); color: var(--ink-inv); box-shadow: none; }
html.tv .s-res:focus .s-line, html.tv .s-track .lv-item:focus .lv-inow, html.tv .s-track .lv-item:focus .lv-inext, html.tv .s-track .lv-item:focus .lv-no { color: var(--ink-inv); }
html.tv .s-track .lv-item > .lv-logo { width: 76px; top: 32px; }
html.tv .s-track .lv-ibody { display: block; padding-top: 8px; }
html.tv .s-track .lv-ibody > * { display: block; }
html.tv .s-track .lv-iname { font-size: var(--fs-body); }
html.tv .s-track .lv-inow, html.tv .s-track .lv-inext { font-size: var(--fs-tv-min); }
html.tv .s-head { font-size: 28px; margin: 24px 0 12px; }
html.tv .s-big { font-size: 56px; }
html.tv .s-kicker, html.tv .s-sub { font-size: var(--fs-tv-min); }
html.tv .s-sec + .s-sec { margin-top: 34px; }
html.tv .s-chips { gap: 14px; }
html.tv .s-chips .chip { height: 60px; padding: 0 24px; font-size: 28px; color: var(--ink); }
html.tv .s-moods { gap: 20px; max-width: none; }
html.tv .s-mood { min-height: 150px; padding: 20px 24px; }
html.tv .s-mood-l { font-size: 38px; }
html.tv .s-mood-s { font-size: var(--fs-tv-min); }
html.tv .s-mood:focus { background: var(--focus-c); color: var(--ink-inv); box-shadow: none; }
html.tv .s-mood:focus .s-mood-s { color: var(--ink-inv); }
html.tv .s-browse { min-height: var(--h-btn); padding: 0 32px; font-size: var(--fs-button); }
html.tv .s-none p:first-child { font-size: var(--fs-body); }
html.tv .s-none p { font-size: var(--fs-tv-min); }
