/* Live Kiosks (Views/LiveKiosks): one tile per kiosk, a live, scaled-down copy
   of its screen. The pop-out (Watch) is one tile filling its own window. */
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.lk-tile { border: 1px solid #dee2e6; border-radius: 8px; overflow: hidden; background: #fff; cursor: zoom-in; }
.lk-tile:focus-visible { outline: 2px solid var(--bw-primary, #0d6efd); outline-offset: 2px; }
.lk-tile.lk-down { border-color: #dc3545; cursor: default; }
.lk-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #dee2e6; background: #fff; }
.lk-title { flex: 1 1 auto; min-width: 0; }
.lk-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-sub { font-size: 0.8rem; color: #6c757d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1.2em; }
.lk-badge { flex: 0 0 auto; font-size: 0.75rem; font-weight: 600; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.lk-badge.live { background: #d1e7dd; color: #0f5132; }
.lk-badge.waiting { background: #fff3cd; color: #664d03; }
.lk-badge.down { background: #f8d7da; color: #842029; }
.lk-pop {
    flex: 0 0 auto; font-size: 0.75rem; font-weight: 600; padding: 2px 10px; border-radius: 999px;
    border: 1px solid #adb5bd; background: #fff; color: #495057; cursor: pointer; white-space: nowrap;
}
.lk-pop:hover { background: #e9ecef; }
.lk-pop[hidden] { display: none; }
.lk-screen { position: relative; width: 100%; aspect-ratio: 16 / 10; background: #111; overflow: hidden; }
.lk-screen iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; pointer-events: none; }
/* Above the frame, which comes later in the tile and would otherwise keep
   showing a disconnected kiosk's last screen over the message. */
.lk-cover {
    position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 6px; padding: 16px; text-align: center; background: #1b1b1b; color: #adb5bd;
    font-size: 0.9rem;
}
.lk-cover[hidden] { display: none; }
.lk-cover.down { background: #2c1316; color: #f1aeb5; }
.lk-cover-title { font-size: 1.1rem; font-weight: 700; }
.lk-cover.down .lk-cover-title { color: #ff6b6b; }
#lkZoom .modal-dialog { max-width: min(96vw, 1400px); }

/* ===== Pop-out: one kiosk filling the window, letterboxed to its shape ===== */
.lk-solo-page { margin: 0; height: 100vh; overflow: hidden; background: #111; }
.lk-solo-page .lk-grid { display: block; height: 100%; }
.lk-tile.lk-solo { display: flex; flex-direction: column; height: 100vh; border: 0; border-radius: 0; cursor: default; background: #111; }
.lk-screen.lk-fill { flex: 1 1 auto; aspect-ratio: auto; }
