/* Phone controller and player pairing dialog, isolated from legacy player rules. */
.remote-page { margin: 0; background: #101010; color: #f5f5f5; font: 14px/1.5 system-ui, sans-serif; color-scheme: dark; }
.remote-page *, .remote-player-dialog * { box-sizing: border-box; letter-spacing: 0; }
.remote-page [hidden], .remote-player-dialog [hidden] { display: none !important; }
.remote-page button, .remote-page input, .remote-player-dialog button { font: inherit; }
.remote-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: max(12px, env(safe-area-inset-top)) max(16px, calc((100% - 728px) / 2), env(safe-area-inset-right)) 12px max(16px, calc((100% - 728px) / 2), env(safe-area-inset-left)); background: #141414; border-bottom: 1px solid #303030; }
.remote-header-brand { display: flex; align-items: center; gap: 12px; }
.remote-header-brand > .bi { font-size: 25px; color: #a6d5b7; }
.remote-header h1 { margin: 0; font-size: 18px; font-weight: 650; }
.remote-header #remoteConnection { display: block; margin-top: 2px; color: #b8b8b8; font-size: 12px; }
.remote-main { max-width: 760px; margin: auto; padding: 0 16px calc(240px + env(safe-area-inset-bottom)); }
.remote-icon-button { width: 44px; height: 44px; flex: 0 0 44px; display: inline-grid; place-items: center; padding: 0; border: 1px solid #454545; border-radius: 50%; background: #272727; color: #fff; cursor: pointer; font-size: 22px; }
.remote-search { display: flex; align-items: center; gap: 12px; height: 46px; border: 1px solid #454545; border-radius: 6px; padding: 0 14px; background: #1c1c1c; }
.remote-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: #fff; background: transparent; font-size: 16px; }
.remote-selection { min-height: 20px; margin: 0 0 12px; color: #a6d5b7; font-size: 12px; overflow-wrap: anywhere; }
.remote-channels { display: grid; }
.remote-channel { display: grid; grid-template-columns: 76px minmax(0, 1fr) 24px; align-items: center; gap: 14px; min-height: 78px; width: 100%; padding: 12px 8px; text-align: left; color: #fff; background: transparent; border: 0; border-bottom: 1px solid #292929; border-radius: 0; cursor: pointer; }
.remote-channel:hover { background: #272727; }
.remote-channel[aria-pressed="true"] { background: #1c3024; }
.remote-channel.is-pending { background: #302b1d; }
.remote-channel-art { width: 76px; height: 46px; display: grid; place-items: center; background: #c5c5c5; border-radius: 4px; overflow: hidden; }
.remote-channel-art img { display: block; width: 100%; height: 100%; padding: 5px; object-fit: contain; }
.remote-channel-art .bi { font-size: 24px; color: #454545; }
.remote-channel-copy { min-width: 0; }
.remote-channel-name { display: block; font-weight: 650; font-size: 14px; overflow-wrap: anywhere; }
.remote-channel-meta { display: block; margin-top: 3px; color: #aaa; font-size: 12px; overflow-wrap: anywhere; }
.remote-channel-check { font-size: 20px; color: #82cfa5; visibility: hidden; }
.remote-channel[aria-pressed="true"] .remote-channel-check { visibility: visible; }
.remote-notice { padding: 16px 0; }
.remote-notice p { margin: 0 0 16px; color: #ccc; }
.remote-notice-actions, .remote-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.remote-button { min-height: 42px; padding: 10px 16px; border: 1px solid #505050; border-radius: 6px; background: #272727; color: #fff; cursor: pointer; font-weight: 600; }
.remote-button:disabled, .remote-icon-button:disabled { opacity: .5; cursor: wait; }
.remote-primary { background: #f1f1f1; color: #151515; border-color: #f1f1f1; }
.remote-empty { color: #aaa; padding: 16px 0; }
.remote-now { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 96px; padding: 18px 0 12px; }
.remote-now-art { display: grid; place-items: center; width: 64px; height: 48px; background: #c5c5c5; border-radius: 4px; overflow: hidden; color: #454545; font-size: 26px; }
.remote-now-art img { width: 100%; height: 100%; padding: 4px; object-fit: contain; }
.remote-now-copy { min-width: 0; }
.remote-now-copy strong { display: block; margin-top: 2px; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.remote-now-copy #remoteNowMeta { display: block; color: #aaa; font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.remote-now-label { color: #9bcbb0; font-size: 10px; font-weight: 700; }
.remote-source-badge { align-self: start; margin-top: 8px; padding: 3px 6px; border: 1px solid #454545; border-radius: 4px; color: #ccc; font-size: 10px; white-space: nowrap; }
.remote-filters { display: grid; gap: 8px; }
.remote-filters select { min-width: 0; width: 100%; height: 40px; border: 1px solid #3a3a3a; border-radius: 6px; padding: 0 12px; background: #171717; color: #ddd; font: inherit; font-size: 13px; }
.remote-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 8px; color: #aaa; font-size: 12px; }
.remote-list-heading h2 { margin: 0; color: #f1f1f1; font-size: 15px; font-weight: 650; }
.remote-games-heading { padding-top: 4px; }
.remote-games-actions { display: flex; gap: 6px; }
.remote-games-actions .remote-icon-button { width: 40px; height: 40px; flex-basis: 40px; font-size: 17px; }
.remote-games { display: grid; gap: 10px; }
.remote-game { width: 100%; display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 108px; padding: 10px; border: 1px solid #343434; border-radius: 6px; background: #1b1b1b; color: #fff; text-align: left; cursor: pointer; }
.remote-game:disabled { opacity: .55; cursor: default; }
.remote-game-art { width: 100px; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; border-radius: 4px; background: #111; }
.remote-game-art img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; }
.remote-game-art.is-logo img { padding: 8px; }
.remote-game-art.is-logo { background: #c5c5c5; }
.remote-game-art.is-logo .bi { color: #454545; }
.remote-game-art .bi { grid-area: 1 / 1; font-size: 24px; color: #888; }
.remote-game-copy { min-width: 0; }
.remote-game-copy > span, .remote-game-copy > strong { display: block; overflow-wrap: anywhere; }
.remote-game-copy > strong { margin: 3px 0; font-size: 13px; line-height: 1.4; }
.remote-game-meta, .remote-game-channel { color: #aaa; font-size: 11px; }
.remote-game-meta.is-live { color: #f5a3b4; }
.remote-game-watch { margin-top: 7px; color: #a6d5b7; font-size: 12px; font-weight: 650; }
.remote-dock { position: fixed; z-index: 3; inset: auto 0 0; max-width: 760px; margin: auto; padding: 0 max(12px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(12px, env(safe-area-inset-left)); background: #171717; border-top: 1px solid #393939; }
.remote-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(60px, auto); gap: 4px; padding: 8px 0; border-bottom: 1px solid #303030; }
.remote-tool { min-width: 0; min-height: 60px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; padding: 6px 4px; border: 0; border-radius: 6px; background: transparent; color: #eee; cursor: pointer; }
.remote-tool > .bi { font-size: 22px; line-height: 1; }
.remote-tool > span { font-size: 11px; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }
.remote-tool:hover:not(:disabled), .remote-tabs button:hover { background: #2c2c2c; }
.remote-tool:disabled { color: #777; cursor: default; }
.remote-tool[aria-pressed="true"] { color: #a6d5b7; }
.remote-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 6px 0; }
.remote-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 44px; padding: 8px; border: 0; border-radius: 6px; background: transparent; color: #aaa; cursor: pointer; font-size: 13px; font-weight: 600; }
.remote-tabs button .bi { font-size: 20px; }
.remote-tabs button[aria-selected="true"] { background: #263c2f; color: #b3e3c4; }
.remote-fullscreen-dialog { text-align: left !important; }
.remote-fullscreen-dialog h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.remote-fullscreen-dialog p { color: #ccc; font-size: 14px; }
.remote-fullscreen-dialog .remote-button { display: inline-flex; align-items: center; gap: 8px; }
.remote-page :focus-visible, .remote-player-dialog :focus-visible { outline: 2px solid #8ab4f8; outline-offset: 3px; }
dialog.remote-player-dialog { position: fixed; inset: 0; width: min(380px, calc(100% - 32px)); height: fit-content; max-height: calc(100dvh - 32px); margin: auto; padding: 24px; border: 1px solid #484848; border-radius: 8px; background: #191919; color: #fff; overflow: auto; font: 14px/1.5 system-ui, sans-serif; text-align: center; }
.remote-player-dialog::backdrop { background: rgba(0, 0, 0, .72); }
.remote-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.remote-dialog-header h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.remote-dialog-header .remote-icon-button { width: 36px; height: 36px; flex-basis: 36px; font-size: 16px; }
.remote-dialog-status { min-height: 22px; margin: 18px 0 12px; color: #ccc; overflow-wrap: anywhere; }
.remote-qr { display: block; width: 248px; max-width: 100%; height: auto; margin: 0 auto; image-rendering: pixelated; aspect-ratio: 1; }
.remote-pair-caption { margin: 12px 0; color: #aaa; font-size: 12px; overflow-wrap: anywhere; }
.remote-pair-link { color: #a8c7fa; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.remote-paired-icon { font-size: 56px; line-height: 1.5; color: #82cfa5; }
.remote-dialog-actions { justify-content: center; margin-top: 18px; }
body.public-tv-layout #gpEmbedTopActions #gpRemoteBtn { flex: 0 0 auto; position: relative; }
body.public-tv-layout #gpEmbedTopActions #gpRemoteBtn[hidden] { display: none !important; }
body.public-tv-layout #gpRemoteBtn[data-paired="true"]::after { content: ""; position: absolute; right: 3px; top: 3px; width: 7px; height: 7px; border-radius: 50%; background: #82cfa5; border: 1px solid #222; }
/* Ad controls live outside this chrome and must stay visible when the UI is hidden. */
html body.public-tv-layout.remote-ui-hidden:not(.tv-app-experience) #playerStage #gpPlayerChrome { display: none !important; }
@media (max-width: 420px) {
  .remote-channel { grid-template-columns: 64px minmax(0, 1fr) 20px; gap: 10px; }
  .remote-channel-art { width: 64px; height: 44px; }
  dialog.remote-player-dialog { padding: 20px; }
}
@media (min-width: 600px) {
  .remote-filters { grid-template-columns: minmax(0, 1fr) 200px; }
  .remote-games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .remote-dock { border-left: 1px solid #303030; border-right: 1px solid #303030; }
}
