/* TV sign-in with the phone: the QR view in the account dialog (TV side) and the /tv page (phone side).
 * Builds on style.css / account.css tokens. The QR code stays black on white in every theme. */

.device-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: center; margin: 4px 0 12px; }
.device-qr { justify-self: center; width: min(260px, 70vw); aspect-ratio: 1; background: #fff; border-radius: 10px; }
.device-qr:empty { background: rgba(255, 255, 255, .08); }
.qr-svg { display: block; width: 100%; height: 100%; border-radius: 10px; }
.device-side { text-align: center; }
.device-step { margin: 0; color: var(--muted); font-size: 1rem; }
.device-url { margin: 2px 0 14px; font-size: 1.5rem; font-weight: 700; color: var(--text); letter-spacing: .01em; }
.device-code { margin: 2px 0 10px; font-size: 2.6rem; font-weight: 800; letter-spacing: .14em; color: var(--gold);
  font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.device-status { min-height: 1.5em; margin: 0; color: var(--text); }
.device-dead .device-qr, .device-dead .device-code, .device-dead .device-url { opacity: .25; }

@media (min-width: 640px) {
  .device-grid { grid-template-columns: auto minmax(0, 1fr); gap: 28px; }
  .device-side { text-align: left; }
}

/* TV: a QR code a phone reads from the sofa, the code readable across the room */
.tv-ui .device-grid { grid-template-columns: auto minmax(0, 1fr); gap: 3vw; }
.tv-ui .device-qr { width: 34vh; }
.tv-ui .device-side { text-align: left; }
.tv-ui .device-url { font-size: 1.9rem; }
.tv-ui .device-code { font-size: 3.4rem; }
.tv-ui .device-status { font-size: 1.05rem; }
.tv-ui .overlay .account-card:has(#acctTvView:not([hidden])) { max-width: min(64rem, 100%); }

/* the /tv page on the phone */
.device-page .acct-view { text-align: left; }
.device-page h1 { text-align: center; }
.device-confirm-title { font-size: 1.3rem; margin: 0 0 6px; text-align: center; }
.device-page .device-code { text-align: center; font-size: clamp(2rem, 10vw, 2.8rem); margin: 6px 0 8px; }
.device-match { text-align: center; margin: 0 0 14px; color: var(--text); font-weight: 600; }
.device-kind { color: var(--muted); margin: 0 0 12px; }
.device-warning { border-left: 4px solid var(--gold); padding: 8px 12px; margin: 0 0 14px; line-height: 1.45; }
.device-warning.strong { border-left-color: var(--red); background: rgba(208, 84, 79, .12); font-weight: 600; }
.device-remote-check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; line-height: 1.4; }
.device-remote-check input { width: 24px; height: 24px; flex: none; margin-top: 2px; }
.device-code-input { font-size: 1.6rem; letter-spacing: .18em; text-transform: uppercase; text-align: center; max-width: 14ch; }
.acct-tv-note { margin: 12px 0 0; }

@media (forced-colors: active) {
  .device-warning, .device-warning.strong { border-left-color: CanvasText; }
}
