/* Stark IntraTheater by Stark. Big-screen mode (ten-foot layout) and the TV guide page.
   Everything that changes the look is scoped to html.bigscreen, so with the mode off the app is drawn exactly as before.
   --safe is the screen-safe margin in percent (0, 2.5, 5 or 7.5), set by js/bigscreen.js. */

/* the top-bar switch (shown in both modes) */
.bs-toggle { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .3rem .8rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.bs-toggle:hover { border-color: var(--gold); }
.bs-toggle[aria-pressed="true"] { border-color: var(--accent); background: var(--panel-2); box-shadow: inset 0 -3px 0 var(--accent); }
/* normal mode: icon only at every width, so the top bar keeps its old shape (the name is in aria-label and the footer button spells it out) */
.bs-toggle { white-space: nowrap; min-width: 44px; justify-content: center; }
html:not(.bigscreen) .bs-toggle .bs-label { display: none; }
html:not(.bigscreen) .bs-toggle { padding: .3rem .6rem; }
/* a phone's top bar has no room: the switch is in the footer there */
@media (max-width: 520px) { #bs-toggle { display: none; } }
.bs-toggle-foot:hover { border-color: var(--gold); }
.bs-toggle-foot[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }

/* guide page */
.bs-margin.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bs-margin:hover { border-color: var(--gold); }
.bs-margin-block h3 { margin-top: 1rem; }
.bs-guide ol { padding-inline-start: 1.4rem; max-width: 70ch; }
.bs-guide li { margin: .35rem 0; }
.bs-guide p { max-width: 70ch; }

/* ---------- big-screen mode ---------- */
html.bigscreen { font-size: 112.5%; }
@media (min-width: 761px) { html.bigscreen { font-size: 125%; } }
@media (min-width: 1500px) { html.bigscreen { font-size: 150%; } }
html.bigscreen body {
  padding: calc(var(--safe, 0) * 1vh) calc(var(--safe, 0) * 1vw);
  padding-bottom: calc(var(--safe, 0) * 1vh + env(safe-area-inset-bottom, 0px));
  line-height: 1.5;
}
html.bigscreen main { max-width: 1800px; }
/* the top bar scrolls away with the page so it never sits on the very edge of the picture */
html.bigscreen .topbar { position: static; backdrop-filter: none; background: var(--bg-2); border-radius: 14px; margin-bottom: .6rem; flex-wrap: wrap; }
html.bigscreen .btn, html.bigscreen .mainnav a, html.bigscreen .bs-toggle, html.bigscreen .profile-chip { min-height: 56px; }
html.bigscreen .btn-small, html.bigscreen .icon-btn { min-height: 52px; min-width: 52px; }
html.bigscreen .btn { padding: .6rem 1.2rem; }
html.bigscreen .bs-toggle { font-size: .95rem; }
html.bigscreen .lang-pick { font-size: 1rem; padding: .5rem .6rem; max-width: 12em; min-height: 56px; }
html.bigscreen select, html.bigscreen input[type="text"], html.bigscreen input[type="time"], html.bigscreen input[type="password"], html.bigscreen input[type="search"], html.bigscreen textarea { font-size: 1rem; min-height: 52px; }
html.bigscreen .muted, html.bigscreen .fine, html.bigscreen .small { font-size: 1rem; }
html.bigscreen .tile, html.bigscreen .choice, html.bigscreen .kid-tile, html.bigscreen .ev-card, html.bigscreen .country { min-height: 64px; }
@media (min-width: 761px) {
  html.bigscreen .mainnav { order: 5; flex: 1 1 100%; }
  html.bigscreen .mainnav a { font-size: .82rem; padding: .35rem .5rem; }
  html.bigscreen .brand { flex: 1 1 auto; }
  html.bigscreen .brand-by { display: none; }
}
html.bigscreen .footer { margin-top: 1rem; }

/* strong focus: every focused thing gets a thick outline plus a halo, in mouse use too */
html.bigscreen :focus:not(main) { outline: 6px solid var(--focus) !important; outline-offset: 3px; border-radius: 10px; box-shadow: 0 0 0 10px rgba(0, 0, 0, .55); }
html.bigscreen[data-theme="light"] :focus:not(main) { box-shadow: 0 0 0 10px rgba(255, 255, 255, .8); }
html.bigscreen main:focus { outline: none; }
html.bigscreen video:focus { outline-offset: -6px; box-shadow: none; }

/* nothing is revealed by hovering only: the movie clip trim handles show all the time */
html.bigscreen .st-h::after { opacity: 1; }
/* what a hover shows, a focus shows too */
html.bigscreen .btn:focus, html.bigscreen .tabs button:focus, html.bigscreen .chip:focus, html.bigscreen .tile:focus, html.bigscreen .choice:focus:not(:disabled),
html.bigscreen .menu-card:focus, html.bigscreen .ev-card:focus, html.bigscreen .country:focus, html.bigscreen .essay-card:focus, html.bigscreen .mw-item:focus,
html.bigscreen .pl-play:focus, html.bigscreen .profile-chip:focus, html.bigscreen .key:focus, html.bigscreen .st-card:focus, html.bigscreen .st-music:focus { border-color: var(--gold); }
html.bigscreen .mainnav a:focus { background: var(--panel); }
html.bigscreen .tl-pin:focus .tl-label { border-color: var(--era, var(--gold)); }
html.bigscreen .dotmap .dot:focus .pt { fill: #fff; }

html.bigscreen .toast { bottom: calc(1.2rem + var(--safe, 0) * 1vh); }
/* phone-width screens: no bar fixed over the page. The arrow keys go by what is on screen and a fixed bar would sit on top of the controls under it, so the menu is a grid in the top bar and scrolls away with it. */
@media (max-width: 760px) {
  html.bigscreen body { padding-bottom: calc(var(--safe, 0) * 1vh + env(safe-area-inset-bottom, 0px)); }
  html.bigscreen .mainnav { position: static; order: 5; flex: 1 1 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; justify-content: normal; border: 0; border-top: 1px solid var(--line); background: none; padding: .3rem 0 0; }
  html.bigscreen .topbar { background: var(--bg-2); }
}
html.bigscreen .toast { max-width: min(900px, calc(100vw - 2rem)); font-size: 1.05rem; }
html.bigscreen[dir="rtl"] .bs-guide ol { padding-inline-start: 1.4rem; }

/* printing the guide: only the guide, black on white */
@media print {
  body.print-guide { background: #fff; color: #000; padding: 0 !important; font-size: 11pt; }
  body.print-guide .topbar, body.print-guide .footer, body.print-guide .toast, body.print-guide .skip-link, body.print-guide .no-print,
  body.print-guide dialog, body.print-guide .mainnav { display: none !important; }
  body.print-guide main { max-width: none; padding: 0; }
  body.print-guide .card { border: 0; box-shadow: none; background: #fff; color: #000; padding: 0 0 .4rem; break-inside: avoid; margin: 0 0 .5rem; }
  body.print-guide .muted, body.print-guide .fine, body.print-guide .lede { color: #333; }
  body.print-guide h1 { font-size: 20pt; } body.print-guide h2 { font-size: 13pt; margin-top: .2rem; }
  body.print-guide .bs-settings { display: none !important; }
}
