/* Remodelagem 2026-12: categorias sempre visíveis em Filmes/Séries e
   TV ao vivo com prévia do canal e programação (EPG) abaixo. */

/* ---------- Filmes e Séries ---------- */
.rail-search input { width:100%; min-height:2.3rem; padding:.4rem .75rem; border-radius:.4rem;
  border:1px solid #34343a; background:#17171a; color:#fff; font-size:.9rem; }
.rail-search input:focus { outline:2px solid var(--accent); outline-offset:0; border-color:transparent; }
.category-rail .rail-label { margin:1rem .25rem .35rem; font-size:.68rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:#9a9aa2; }

/* Telas pequenas: categorias como faixa horizontal no topo, em vez de um menu escondido. */
@media (max-width:759px) {
  .catalog-layout { display:flex; flex-direction:column; }
  .catalog-layout > * { order:2; }
  .catalog-layout > .page-title { order:0; }
  .catalog-layout .category-rail { display:block; order:1; margin:0 0 .75rem; }
  .catalog-layout .category-rail h2,.catalog-layout .category-rail .rail-label { display:none; }
  .catalog-layout .rail-search { margin:0 0 .5rem; }
  .catalog-layout .category-list { display:flex; gap:.4rem; overflow-x:auto; padding:.2rem 0 .4rem; scrollbar-width:none; }
  .catalog-layout .category-option { flex:none; white-space:nowrap; border-radius:2rem; padding:.35rem .9rem; background:#1d1d21; border:1px solid #333; }
  .catalog-layout .category-option[aria-pressed=true] { background:var(--accent); border-color:var(--accent); }
  .catalog-layout .filters>div:first-child { display:none; }
}

@media (min-width:760px) {
  .shell .catalog-layout { padding:1.1rem 2vw 2.5rem calc(19vw + 2vw); }
  .shell .catalog-layout { position:relative; }
  .shell .catalog-layout .category-rail { position:absolute; top:0; left:0; right:auto; bottom:auto; width:19vw; padding:1.1rem .9rem 1.5rem; background:linear-gradient(180deg,#101013,#0a0a0c);
    border-right:1px solid #1f1f23; display:flex; flex-direction:column; }
  .catalog-layout .category-rail h2 { font-size:1.45rem; font-weight:800; margin:.1rem .2rem .8rem; letter-spacing:-.01em; }
  .catalog-layout .category-list { flex:1; min-height:0; overflow:auto; scrollbar-width:thin; padding-right:.15rem; }
  .shell .catalog-layout .category-option { position:relative; min-height:2.35rem; padding:.45rem .7rem .45rem .95rem; margin:.08rem 0;
    border-radius:.35rem; color:#cfcfd4; font-size:.92rem; }
  .shell .catalog-layout .category-option[aria-pressed=true] { background:#1e1e23; color:#fff; font-weight:700; }
  .shell .catalog-layout .category-option[aria-pressed=true]:before { content:""; position:absolute; left:.3rem; top:.5rem; bottom:.5rem;
    width:.2rem; border-radius:.2rem; background:var(--accent); }
  .shell .catalog-layout .category-option:focus { background:#2a2a30; color:#fff; }
  .shell .catalog-layout .page-title { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin:0 0 .5rem; padding:0 0 .6rem; border-bottom:1px solid #1f1f23; }
  .shell .catalog-layout .page-title h1 { font-size:2.1rem; line-height:1.1; margin:0; }
  .shell .catalog-layout .page-title .muted { font-size:.85rem; color:#a7a7ae; }
  .shell .catalog-layout .filters { display:flex; align-items:center; gap:.6rem; margin:.4rem 0 .9rem; }
  .shell .catalog-layout .filters .field { margin:0; width:auto; }
  .shell .catalog-layout .filters .field>span { display:none; }
  .shell .catalog-layout .filters select { min-height:2.2rem; padding:.3rem .7rem; font-size:.85rem; }
  .shell .catalog-layout .filters button { min-height:2.2rem; padding:.3rem .8rem; font-size:.85rem; }
  .shell .catalog-layout .cards { grid-template-columns:repeat(6,minmax(0,1fr)); gap:.9rem .7rem; }
  .shell .catalog-layout .card { border-radius:.45rem; overflow:hidden; background:#121215; transition:transform .12s; }
  .shell .catalog-layout .card:focus { transform:scale(1.04); outline:3px solid #fff; outline-offset:0; box-shadow:0 0 0 .3rem var(--accent); z-index:1; }
  .shell .catalog-layout .card-copy { padding:.45rem .5rem .55rem; }
  .shell .catalog-layout .card-copy strong { font-size:.82rem; }
  .shell .catalog-layout .pager { margin-top:1.2rem; }
}

/* ---------- TV ao vivo ---------- */
.live-preview { position:relative; display:block; width:100%; height:0; padding:56.25% 0 0; margin:0; border:0; border-radius:.55rem;
  overflow:hidden; background:#000 radial-gradient(circle at 50% 45%,#1b2028,#05070a 70%); color:#cfd6dd; cursor:pointer; flex:none; }
.live-preview:focus { outline:3px solid var(--green,#83d4ae); outline-offset:2px; }
/* Preview video sits at body level over the box (see MaxPlayer.preview): no clipping,
   no rounded corners and no transforms, so TV hardware video layers can draw it. */
.mp-preview-layer { position:fixed; z-index:5; display:none; margin:0; padding:0; border:0; object-fit:contain; background:#000; pointer-events:none; }
.live-preview:focus { outline-offset:4px; }
.live-preview .preview-placeholder { position:absolute; inset:0; top:0; right:0; bottom:0; left:0; display:flex; align-items:center; justify-content:center; }
.live-preview .preview-placeholder img { width:22%; max-height:40%; object-fit:contain; opacity:.85; border-radius:.5rem; }
.live-preview.playing .preview-placeholder { display:none; }
.live-preview .preview-status { position:absolute; left:0; right:0; bottom:.8rem; text-align:center; font-size:.8rem; padding:0 1rem; text-shadow:0 1px 3px #000; }
.live-preview.empty { cursor:default; }
.live-preview.empty .preview-status { top:50%; bottom:auto; transform:translateY(-50%); font-size:.95rem; color:#9ba3ab; }
.live-preview .preview-badge { position:absolute; top:.6rem; left:.6rem; padding:.15rem .45rem; border-radius:.25rem; background:#e5262b; color:#fff;
  font-size:.62rem; font-weight:800; letter-spacing:.08em; opacity:0; transition:opacity .2s; }
.live-preview.playing .preview-badge { opacity:1; }

@media (min-width:760px) {
  .shell .live-board { grid-template-columns:minmax(0,19fr) minmax(0,33fr) minmax(0,40fr); column-gap:1rem; padding:.8rem 1.1rem .8rem .6rem; }
  .live-board .live-categories h2 { font-size:1.45rem; font-weight:800; margin:.35rem .3rem .7rem; }
  .shell .live-categories .category-option { min-height:2.6rem; margin:.1rem 0; padding:.4rem .8rem; border:1px solid transparent; border-radius:.4rem; font-size:.92rem; }
  .shell .live-categories .category-option[aria-pressed=true] { background:#1f2a26; border-color:#2f4a3f; color:#fff; font-weight:700; }
  .shell .live-categories .category-option:focus { outline:2px solid var(--green); outline-offset:-2px; }
  .shell .live-board .channel-list .card { min-height:3.4rem; }
  .shell .live-board .channel-list .poster { width:2.8rem; height:2.8rem; border-radius:.35rem; }
  .live-board .live-guide { display:flex; flex-direction:column; gap:.55rem; padding:.7rem; background:#161a20; border:1px solid #232831; border-radius:.75rem; }
  .live-board .live-guide .guide-label { display:none; }
  .live-board .channel-head { gap:.7rem; padding:.1rem .15rem; }
  .live-board .channel-head .channel-bug { width:2.6rem; height:2.6rem; border-radius:.35rem; object-fit:contain; background:#262b33; }
  .live-board .channel-title { min-width:0; }
  .live-board .channel-title h2 { font-size:1.15rem; margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .live-board .channel-now { margin:.1rem 0 0; font-size:.8rem; color:var(--green); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .live-board .live-actions { display:flex; gap:.4rem; padding:0; margin:0; flex-wrap:nowrap; }
  .live-board .live-actions button { flex:1 1 0; min-width:0; min-height:2.2rem; padding:.3rem .4rem; font-size:.74rem; background:#20252d; border:0; border-radius:.4rem; justify-content:center; white-space:nowrap; }
  .live-board .live-actions button.primary { background:var(--green); color:#07120d; font-weight:800; text-shadow:none; }
  .live-board .live-actions button.primary .icon { filter:brightness(0); }
  .live-board .live-actions button span { overflow:hidden; text-overflow:ellipsis; }
  .live-board .live-actions button.primary { flex:1.6 1 0; }
  .live-board .live-actions button:last-child { flex:0 0 2.6rem; padding:0; }
  .live-board .live-actions button:last-child span { display:none; }
  .live-board .live-actions button:last-child .icon { margin:0; }
  .live-board .live-actions button[aria-pressed=true]:last-child { background:#3a2328; }
  .live-board .live-actions button:focus { outline:2px solid #fff; outline-offset:1px; }
  .live-board .guide-body { flex:1; min-height:0; overflow:auto; padding:.2rem .15rem; border-top:1px solid #232831; }
  .live-board .guide-body h3 { margin:.4rem 0 .3rem; font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; color:#8f98a2; }
  .live-board .channel-schedule li { padding:.42rem .3rem; border-radius:.3rem; }
  .live-board .channel-schedule li.on-air { background:#1f2a26; }
  .live-board .channel-schedule .schedule-time,.live-board .channel-schedule .program-name { font-size:.82rem; }
  .live-board .channel-schedule li.on-air .program-name { color:#fff; }
}
