/* «На телевизор» in the player (tv-cast.js): the code dialog, and the AirPlay / Chromecast buttons in the bar. */
.tv-modal { position: fixed; inset: 0; z-index: 2150; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .66); backdrop-filter: blur(3px); padding: 20px; }
.tv-modal.hidden, .tv-modal .hidden { display: none; }
.tvm-card { position: relative; width: 100%; max-width: 400px; max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 24px 70px rgba(0, 0, 0, .6); }
.tvm-close { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.tvm-close:hover, .tvm-close:focus-visible { color: var(--text); background: var(--line); }
.tvm-head { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 12px; padding-right: 36px; }
.tvm-head .ico { color: var(--accent); width: 22px; height: 22px; display: inline-flex; }
.tvm-head svg { width: 22px; height: 22px; }
.tvm-how { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.tvm-url { display: block; margin: 6px 0; color: var(--text); font-size: 17px; font-weight: 700; letter-spacing: .01em; user-select: all; }
.tvm-form { display: flex; gap: 8px; margin-top: 14px; }
.tvm-code { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: 700 22px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; text-align: center; }
.tvm-code:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.tvm-go { min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: #1a1205; font-size: 15px; font-weight: 700; cursor: pointer; }
.tvm-go:disabled { opacity: .7; cursor: default; }
.tvm-go:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.tvm-error { min-height: 18px; margin-top: 8px; color: #ff8a7a; font-size: 13px; line-height: 1.35; }
.tvm-state { font-size: 15px; font-weight: 600; line-height: 1.35; }
.tvm-note { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.4; }
.tvm-btns { display: flex; gap: 10px; margin-top: 16px; }
.tvm-btns button, .tvm-more { flex: 1; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
.tvm-btns button:hover, .tvm-more:hover { background: var(--line); }
.tvm-btns button:focus-visible, .tvm-more:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.tvm-more { display: block; width: 100%; margin-top: 10px; background: transparent; color: var(--muted); }
#c-airplay.on, #c-cast.on { color: var(--accent); }
/* 0.30.1: «Chromecast» / «AirPlay» — the device's browser takes the film to the TV (tv-send.js) */
.tvm-send { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.tvm-or { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.tvm-send-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.tvm-send-btn, .tvm-air-here { flex: 1 1 140px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
.tvm-send-btn svg, .tvm-air-here svg { width: 20px; height: 20px; flex: none; }
.tvm-send-btn:hover, .tvm-air-here:hover { background: var(--line); }
.tvm-send-btn:focus-visible, .tvm-air-here:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.tvm-send-btn:disabled { opacity: .6; cursor: default; }
.tvm-send-btn.busy { opacity: 1; }
.tvm-send-how, .tvm-send-ios { color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 8px; }
.tvm-send-msg { margin-top: 8px; font-size: 13px; line-height: 1.35; }
.tvm-send-msg:empty { display: none; }
.tvm-send-msg.err { color: #ff8a7a; }
.tvm-link { display: flex; flex-direction: column; gap: 12px; align-items: stretch; margin-top: 12px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.tvm-link.hidden, .tvm-qr.hidden { display: none; }
.tvm-qr { width: 220px; height: 220px; max-width: 100%; align-self: center; flex: none; border-radius: 8px; background: #fff; padding: 6px; } /* the link is long: a big code scans from a phone */
.tvm-link-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tvm-link-how { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.tvm-link-url { width: 100%; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: inherit; font: 12px/1.3 ui-monospace, Menlo, monospace; }
.tvm-link-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tvm-link-btns button { flex: 1 1 120px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.tvm-link-btns button:hover { background: var(--line); }
.tvm-link-btns button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.tvm-link-exp { color: var(--muted); font-size: 12px; }
@media (max-width: 560px) {
  .tv-modal { align-items: flex-end; padding: 0; }
  .tvm-card { max-width: none; max-height: 100dvh; border-radius: 20px 20px 0 0; padding: 18px 14px max(18px, env(safe-area-inset-bottom, 0px)); }
  .tvm-close { width: 44px; height: 44px; top: 6px; right: 6px; }
}
