/* ═══════════════════════════════════════════════════════════════════
 * live-cam.css — Living Windows: tiny launcher → fullscreen live view
 * Uses the page's --lg-accent palette (marine = #818cf8) so it tracks the
 * active theme/accent. Collapsed footprint is one small glass chip.
 * ═══════════════════════════════════════════════════════════════════ */

/* ---------- tiny launcher chip (lives among the map stat chips) ---------- */
.lw-launch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 11px 0 9px;
    border-radius: 999px;
    cursor: pointer;
    font-family: 'Space Mono', monospace;
    font-size: 0.52rem;
    letter-spacing: 0.14em;
    color: #e6ecf5;
    background: rgba(12, 18, 28, 0.55);
    border: 1px solid rgba(var(--lg-accent-rgb, 129, 140, 248), 0.32);
    backdrop-filter: blur(8px) saturate(1.1);
    -webkit-backdrop-filter: blur(8px) saturate(1.1);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    white-space: nowrap;
}
.lw-launch:hover {
    border-color: rgba(var(--lg-accent-rgb, 129, 140, 248), 0.6);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
}
/* floated on the map, top-center (clear of the top-left vessel legend and
   top-right zoom/compass stack) */
.em-map-container .lw-launch {
    position: absolute;
    top: 96px; /* clear the fixed unified-nav + bridge-pro top strip (full-bleed map starts at y=0) */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1200;
}
.em-map-container .lw-launch:hover { transform: translateX(-50%) translateY(-1px); }
.lw-launch-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #ff4d4d;
    box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.6);
    animation: lw-pulse 2s infinite;
}
.lw-launch-cam { font-size: 0.5rem; opacity: 0.8; padding-left: 1px; }
.lw-launch-txt { color: #cdd6e4; }
.lw-launch.lw-disabled { opacity: 0.45; pointer-events: none; }
.lw-launch.lw-launch-eco { border-color: rgba(120, 220, 150, 0.5); }

@keyframes lw-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.55); }
    70%  { box-shadow: 0 0 0 6px rgba(255, 77, 77, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}

/* ---------- fullscreen overlay ---------- */
.lw-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: flex;
    flex-direction: column;
    background: rgba(4, 7, 12, 0.92);
    backdrop-filter: blur(14px) saturate(1.05);
    -webkit-backdrop-filter: blur(14px) saturate(1.05);
    animation: lw-fade 0.22s ease;
}
.lw-overlay[hidden] { display: none; }
@keyframes lw-fade { from { opacity: 0; } to { opacity: 1; } }
body.lw-open { overflow: hidden; }

.lw-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
}
.lw-bar-title {
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: #e6ecf5;
}
.lw-bar-title .lw-region { color: #7e8a9a; font-size: 0.72rem; }
.lw-bar-close {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    color: #e6ecf5;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.lw-bar-close:hover { background: rgba(255, 77, 77, 0.5); }

.lw-frame {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}
.lw-frame iframe {
    width: 100%;
    height: 100%;
    max-width: 1600px;
    aspect-ratio: 16 / 9;
    max-height: 100%;
    border: 0;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(var(--lg-accent-rgb, 129, 140, 248), 0.18);
}
.lw-fallback {
    color: #9aa6b6;
    font-size: 0.8rem;
    text-align: center;
}
.lw-fallback a { color: var(--lg-accent, #818cf8); }

.lw-selector {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 14px 20px 20px;
}
.lw-pick {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    color: #aab4c2;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.lw-pick:hover { color: #e6ecf5; border-color: rgba(var(--lg-accent-rgb, 129, 140, 248), 0.4); }
.lw-pick.active {
    color: #fff;
    background: rgba(var(--lg-accent-rgb, 129, 140, 248), 0.28);
    border-color: rgba(var(--lg-accent-rgb, 129, 140, 248), 0.6);
}

@media (max-width: 640px) {
    .lw-frame { padding: 0 8px; }
    .lw-frame iframe { border-radius: 8px; }
    .lw-launch-txt { display: none; } /* dot + glyph only on small screens */
}
