/* Osiris Dashboard - WordPress Plugin Styles */
.osiris-dashboard-container {
    position: relative;
    width: 100%;
    height: 700px;
    background: #0a0a0f;
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #e0e0e0;
    --osiris-cyan: #00e5ff;
    --osiris-gold: #d4af37;
    --osiris-green: #00ff88;
    --osiris-red: #ff4444;
    --osiris-bg: #0a0a0f;
    --osiris-panel: rgba(15, 15, 25, 0.95);
    --osiris-border: rgba(0, 229, 255, 0.15);
}

/* ── View Mode Switcher ── */
.osiris-mode-switcher {
    display: flex;
    gap: 4px;
    margin-right: 12px;
}
.osiris-mode-btn {
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.2);
    color: #6ee7a8;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.osiris-mode-btn:hover {
    background: rgba(0, 229, 255, 0.15);
    color: #00e676;
}
.osiris-mode-btn.active {
    background: rgba(0, 229, 255, 0.25);
    border-color: #00e5ff;
    color: #00e5ff;
    font-weight: 600;
}
.osiris-user-marker {
    position: relative;
    width: 20px;
    height: 20px;
}
.osiris-user-dot {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 10px; height: 10px;
    background: #00e5ff;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.8);
    z-index: 2;
}
.osiris-user-pulse {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 20px; height: 20px;
    background: rgba(0, 229, 255, 0.3);
    border-radius: 50%;
    animation: osiris-pulse 2s ease-out infinite;
    z-index: 1;
}
@keyframes osiris-pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}
.osiris-dashboard-container.osiris-fullscreen {
    position: fixed; top: 0; left: 0; width: 100vw !important; height: 100vh !important;
    z-index: 999999; border-radius: 0;
}
.osiris-loading {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; background: var(--osiris-bg); color: var(--osiris-cyan);
    font-size: 14px; letter-spacing: 2px; text-transform: uppercase;
}
.osiris-spinner {
    width: 40px; height: 40px; border: 3px solid rgba(0,229,255,0.1);
    border-top-color: var(--osiris-cyan); border-radius: 50%;
    animation: osiris-spin 1s linear infinite; margin-bottom: 16px;
}
@keyframes osiris-spin { to { transform: rotate(360deg); } }
.osiris-map { width: 100%; height: 100%; position: absolute; top: 0; left: 0; }
.osiris-topbar {
    position: absolute; top: 0; left: 0; right: 0; height: 48px;
    background: linear-gradient(180deg, rgba(10,10,15,0.98) 0%, rgba(10,10,15,0.8) 100%);
    border-bottom: 1px solid var(--osiris-border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; z-index: 10; backdrop-filter: blur(10px);
}
.osiris-topbar-left { display: flex; align-items: center; gap: 12px; }
.osiris-logo-wrap { display: flex; align-items: center; gap: 8px; }
.osiris-logo-svg { width: 22px; height: 17px; color: var(--osiris-gold); filter: drop-shadow(0 0 6px rgba(212,175,55,0.4)); }
.osiris-logo { font-size: 18px; font-weight: 700; color: var(--osiris-gold); letter-spacing: 3px; }
.osiris-zulu { font-size: 11px; color: var(--osiris-cyan); font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.osiris-topbar-right { display: flex; align-items: center; gap: 16px; font-size: 11px; color: #6ee7a8; }
.osiris-stat { display: flex; align-items: center; gap: 4px; }
.osiris-stat-value { color: var(--osiris-green); font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.osiris-sidepanel {
    position: absolute; top: 56px; left: 8px; display: flex; flex-direction: column; gap: 6px;
    height: fit-content; max-height: calc(100% - 80px); z-index: 10;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.osiris-sidepanel.hidden { transform: translateX(-300px); opacity: 0; pointer-events: none; }

/* Layer list rail (collapsible via master toggle) */
.osiris-layer-rail {
    display: flex; gap: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    max-height: calc(100vh - 160px); overflow: hidden;
}
.osiris-layer-rail.collapsed {
    max-height: 0; opacity: 0; pointer-events: none; margin: 0;
}

/* ── Category Tabs (left sidebar) ── */
.osiris-cat-tabs {
    width: 100px; background: var(--osiris-panel);
    border: 1px solid var(--osiris-border); border-radius: 8px 0 0 8px;
    display: flex; flex-direction: column; gap: 2px; padding: 8px 0;
    overflow-y: auto; backdrop-filter: blur(20px);
}
.osiris-cat-tab {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px 8px 8px; cursor: pointer; border-radius: 4px; margin: 0 4px;
    position: relative; transition: background 0.15s;
}
.osiris-cat-tab:hover { background: rgba(255,255,255,0.05); }
.osiris-cat-tab.selected { background: rgba(0,229,255,0.1); }
.osiris-cat-tab.selected::before {
    content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px;
    background: var(--osiris-cyan); border-radius: 0 2px 2px 0;
}
.osiris-cat-icon { font-size: 14px; line-height: 1; width: 18px; text-align: center; }
.osiris-cat-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: #6ee7a8; font-weight: 600; white-space: nowrap; }
.osiris-cat-badge {
    position: absolute; top: 2px; right: 4px;
    font-size: 7px; color: #fff; border-radius: 8px;
    padding: 0 4px; line-height: 12px; font-weight: 700;
}

/* ── Flyout Panel ── */
.osiris-flyout {
    min-width: 190px; max-width: 240px; background: var(--osiris-panel);
    border: 1px solid var(--osiris-border); border-left: none;
    border-radius: 0 8px 8px 0; backdrop-filter: blur(20px);
    display: flex; flex-direction: column; height: fit-content;
    max-height: calc(100vh - 120px); overflow-y: auto; overflow-x: hidden;
}
.osiris-flyout.hidden { display: none; }
.osiris-flyout-header {
    padding: 10px 12px; border-bottom: 1px solid var(--osiris-border);
    font-size: 11px; font-weight: 700; letter-spacing: 1px;
}
.osiris-flyout-title { font-size: 11px; }
.osiris-flyout-list { padding: 4px; overflow-y: auto; flex: 1; }

/* ── Layer Items ── */
.osiris-layer-item {
    display: flex; align-items: center;
    padding: 6px 10px; border-radius: 4px; cursor: pointer;
    transition: background 0.15s; font-size: 11px; gap: 8px;
    white-space: nowrap; overflow: hidden;
}
.osiris-layer-item:hover { background: rgba(255,255,255,0.05); }
.osiris-layer-item.active { background: rgba(0,0,0,0.15); }
.osiris-layer-item .osiris-layer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ── Layer On/Off Dot Toggle ── */
.osiris-layer-dot {
    width: 10px; height: 10px; border-radius: 50%;
    flex-shrink: 0; transition: all 0.2s;
}
.osiris-layer-dot.on {
    box-shadow: 0 0 8px currentColor !important;
}
.osiris-layer-name { flex: 1; color: #6ee7a8; }
.osiris-layer-count { font-size: 9px; color: #4a9e7a; font-family: 'JetBrains Mono', monospace; }
.osiris-layer-status { font-size: 9px; margin-left: auto; }
.osiris-bottombar {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(0deg, rgba(10,10,15,0.95) 0%, rgba(10,10,15,0.7) 100%);
    border-top: 1px solid var(--osiris-border); z-index: 10;
    font-size: 10px; color: #6ee7a8; font-family: 'JetBrains Mono', monospace;
    display: flex; flex-direction: column; overflow: hidden;
}
.osiris-bottombar.osiris-ticker-1row { height: 28px; }
.osiris-bottombar.osiris-ticker-2row { height: 44px; }
.osiris-bottombar.osiris-ticker-3row { height: 60px; }
.osiris-ticker-row {
    flex: 1; display: flex; align-items: center;
    padding: 0 16px; overflow: hidden; white-space: nowrap;
    border-bottom: 1px solid rgba(0,229,255,0.05);
    gap: 16px; position: relative;
}
.osiris-ticker-row:last-child { border-bottom: none; }
.osiris-ticker-label {
    font-size: 8px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    color: var(--osiris-cyan); flex-shrink: 0; min-width: 40px;
}
.osiris-ticker-items {
    flex: 1; overflow: hidden; position: relative; height: 100%;
    display: flex; align-items: center;
}
.osiris-ticker-scroll {
    display: inline-flex; gap: 24px; animation: osiris-ticker 40s linear infinite;
    position: absolute; white-space: nowrap;
}
.osiris-ticker-item {
    display: inline-flex; align-items: center; gap: 6px; font-size: 10px;
}
.osiris-ticker-symbol { color: #6ee7a8; font-weight: 600; }
.osiris-ticker-price { color: #e0e0e0; font-family: 'JetBrains Mono', monospace; }
.osiris-ticker-change { font-weight: 600; }
.osiris-ticker-change.pos { color: var(--osiris-green); }
.osiris-ticker-change.neg { color: var(--osiris-red); }
.osiris-ticker-news {
    font-size: 10px; color: #6ee7a8;
}
.osiris-ticker-news a { color: #e0e0e0; text-decoration: none; }
.osiris-ticker-news a:hover { color: var(--osiris-cyan); }
.osiris-ticker-sep { color: #4a9e7a; font-size: 8px; }
@keyframes osiris-ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.osiris-ticker-row:hover .osiris-ticker-scroll { animation-play-state: paused; }
.osiris-toolbar {
    display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px;
    background: var(--osiris-panel); border: 1px solid var(--osiris-border);
    border-radius: 8px; padding: 6px; backdrop-filter: blur(20px);
    width: fit-content;
}
.osiris-toolbar-btn {
    width: 36px; height: 36px; background: rgba(0,0,0,0.2); border: 1px solid var(--osiris-border);
    border-radius: 6px; color: #6ee7a8; cursor: pointer; display: flex; align-items: center;
    justify-content: center; font-size: 16px; transition: all 0.15s; backdrop-filter: blur(10px);
}
.osiris-toolbar-btn:hover { color: var(--osiris-cyan); border-color: var(--osiris-cyan); background: rgba(0,229,255,0.1); }
.osiris-toolbar-btn.active { color: var(--osiris-cyan); background: rgba(0,229,255,0.15); border-color: var(--osiris-cyan); }
.osiris-popup { font-size: 12px; }
.osiris-popup-title { font-weight: 700; color: var(--osiris-cyan); margin-bottom: 6px; font-size: 13px; }
.osiris-popup-row { display: flex; justify-content: space-between; padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.osiris-popup-label { color: #6ee7a8; }
.osiris-popup-value { color: #e0e0e0; font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.osiris-popup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 6px; }
.osiris-popup-metric { background: rgba(0,0,0,0.3); border-radius: 4px; padding: 4px 6px; }
.osiris-popup-metric-label { display: block; font-size: 7px; color: #4a9e7a; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.osiris-popup-metric-val { display: block; font-size: 11px; color: #e0e0e0; font-family: 'JetBrains Mono', monospace; margin-top: 1px; }
.osiris-popup-links { display: flex; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; }
.osiris-popup-link { flex: 1; text-align: center; font-size: 8px; padding: 4px 2px; background: rgba(0,229,255,0.08); border: 1px solid rgba(0,229,255,0.15); border-radius: 4px; color: var(--osiris-cyan); text-decoration: none; font-weight: 600; transition: background 0.15s; }
.osiris-popup-link:hover { background: rgba(0,229,255,0.2); }
.osiris-popup-deepdive { width: 100%; text-align: center; font-size: 9px; padding: 5px; background: rgba(212,175,55,0.1); border: 1px solid rgba(212,175,55,0.25); border-radius: 4px; color: var(--osiris-gold); cursor: pointer; font-weight: 700; letter-spacing: 1px; transition: background 0.15s; }
.osiris-popup-deepdive:hover { background: rgba(212,175,55,0.2); }
.osiris-popup-deepdive:disabled { opacity: 0.5; cursor: default; }
[data-toggle-terrain].active { color: #76ff03 !important; border-color: #76ff03 !important; background: rgba(118,255,3,0.15) !important; }
.osiris-popup .badge-mw { color: #76ff03; font-weight: 700; }
.osiris-popup .badge-operational { color: #4caf50; font-weight: 600; }
.osiris-popup .badge-decommissioned { color: #f44336; font-weight: 600; }
.osiris-popup .badge-occupied { color: #ff9800; font-weight: 600; }
.osiris-dashboard-container .maplibregl-popup-content {
    background: var(--osiris-panel) !important; border: 1px solid var(--osiris-border) !important;
    border-radius: 8px !important; color: #e0e0e0 !important; padding: 12px !important; backdrop-filter: blur(20px);
}
.osiris-dashboard-container .maplibregl-popup-tip { border-top-color: var(--osiris-border) !important; }
.osiris-dashboard-container .maplibregl-popup-close-button { color: #6ee7a8 !important; font-size: 16px !important; padding: 4px 8px !important; }
.osiris-dashboard-container .maplibregl-popup-close-button:hover { color: var(--osiris-cyan) !important; background: none !important; }
/* ── Local Time ── */
.osiris-local {
    font-size: 11px; color: #6ee7a8; font-family: 'JetBrains Mono', monospace; font-weight: 600;
    margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--osiris-border);
}
.osiris-local::before { content: 'LOC '; color: #4a9e7a; font-weight: 400; }
.osiris-local[data-location]::after {
    content: ' · ' attr(data-location); color: #4a9e7a; font-weight: 400;
}

/* ── Search Panel ── */
.osiris-search-panel {
    position: absolute; top: 56px; left: 56px; width: 320px; z-index: 11;
    background: var(--osiris-panel); border: 1px solid var(--osiris-border);
    border-radius: 8px; backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    transition: opacity 0.2s, transform 0.2s;
}
.osiris-search-panel.hidden { display: none; }
.osiris-search-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; border-bottom: 1px solid var(--osiris-border);
}
.osiris-search-close {
    background: none; border: none; color: #6ee7a8; cursor: pointer; font-size: 14px; padding: 2px 6px;
}
.osiris-search-close:hover { color: var(--osiris-cyan); }
.osiris-search-body { padding: 10px 12px; }
.osiris-search-input-wrap { position: relative; }
.osiris-search-input {
    width: 100%; padding: 8px 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--osiris-border);
    border-radius: 6px; color: #e0e0e0; font-size: 12px; outline: none; box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}
.osiris-search-input:focus { border-color: var(--osiris-cyan); box-shadow: 0 0 12px rgba(0,229,255,0.15); }
.osiris-search-input::placeholder { color: #555; }
.osiris-search-results {
    position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px;
    background: rgba(10,10,15,0.98); border: 1px solid var(--osiris-border);
    border-radius: 6px; max-height: 240px; overflow-y: auto;
}
.osiris-search-result-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer;
    font-size: 11px; color: #6ee7a8; transition: background 0.15s;
}
.osiris-search-result-item:hover { background: rgba(0,229,255,0.08); color: #fff; }
.osiris-search-result-item:first-child { border-radius: 6px 6px 0 0; }
.osiris-search-result-item:last-child { border-radius: 0 0 6px 6px; }
.osiris-search-result-icon { flex-shrink: 0; font-size: 14px; }
.osiris-search-result-text {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.osiris-my-location-btn {
    display: flex; align-items: center; gap: 6px; margin-top: 8px; width: 100%;
    padding: 8px 12px; background: rgba(0,229,255,0.06); border: 1px solid rgba(0,229,255,0.2);
    border-radius: 6px; color: var(--osiris-cyan); cursor: pointer; font-size: 11px; font-weight: 600;
    transition: background 0.15s; font-family: 'Inter', sans-serif;
}
.osiris-my-location-btn:hover { background: rgba(0,229,255,0.15); }
.osiris-my-location-btn:disabled { opacity: 0.5; cursor: default; }
.osiris-my-loc-icon { font-size: 16px; }

@keyframes osiris-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ── Toggle Switches ── */
.osiris-toggle-master { cursor: pointer; display: inline-flex; vertical-align: middle; margin-right: 6px; }
.osiris-toggle-track {
    display: inline-block; width: 24px; height: 12px; background: rgba(255,255,255,0.12);
    border-radius: 6px; position: relative; transition: background 0.2s; vertical-align: middle;
}
.osiris-toggle-track.on { background: var(--osiris-cyan); }
.osiris-toggle-track.mixed { background: rgba(0,229,255,0.3); }
.osiris-toggle-thumb {
    position: absolute; top: 1px; left: 1px; width: 10px; height: 10px; border-radius: 50%;
    background: #888; transition: all 0.2s;
}
.osiris-toggle-track.on .osiris-toggle-thumb { left: 13px; background: #fff; }
.osiris-toggle-track.mixed .osiris-toggle-thumb { left: 7px; background: var(--osiris-cyan); }

.osiris-toggle-slider { cursor: pointer; display: inline-flex; vertical-align: middle; flex-shrink: 0; position: relative; }
.osiris-toggle-slider input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.osiris-toggle-slider-track {
    display: inline-block; width: 24px; height: 12px; border-radius: 6px;
    position: relative; transition: all 0.2s; vertical-align: middle;
    border: 1px solid #555; box-sizing: border-box;
}
.osiris-toggle-slider input:checked + .osiris-toggle-slider-track { background: rgba(0,229,255,0.2); border-color: var(--osiris-cyan); }
.osiris-toggle-slider-thumb {
    position: absolute; top: 0; left: 0; width: 10px; height: 10px; border-radius: 50%;
    transition: all 0.2s; background: #555; margin: 1px;
}
.osiris-toggle-slider input:checked + .osiris-toggle-slider-track .osiris-toggle-slider-thumb { left: 12px; background: var(--osiris-cyan); box-shadow: 0 0 6px var(--osiris-cyan); }

.osiris-dashboard-container ::-webkit-scrollbar { width: 4px; }
.osiris-dashboard-container ::-webkit-scrollbar-track { background: transparent; }
.osiris-dashboard-container ::-webkit-scrollbar-thumb { background: rgba(0,229,255,0.2); border-radius: 2px; }
@media (max-width: 768px) {
    .osiris-sidepanel { left: 4px; height: auto; max-height: 60vh; bottom: 36px; top: 56px; }
    .osiris-sidepanel.hidden { transform: translateX(-100%); }
    .osiris-cat-tabs { width: 64px; border-radius: 6px 0 0 6px; padding: 6px 0; }
    .osiris-cat-tab { padding: 6px 6px; gap: 4px; }
    .osiris-cat-icon { font-size: 11px; width: 14px; }
    .osiris-cat-label { font-size: 7px; letter-spacing: 0.5px; }
    .osiris-flyout { min-width: 140px; max-width: 180px; }
    .osiris-topbar { height: 40px; padding: 0 8px; }
    .osiris-logo-wrap { gap: 4px; }
    .osiris-logo-svg { width: 16px; height: 12px; }
    .osiris-logo { font-size: 14px; letter-spacing: 2px; }
    .osiris-hover-trigger { top: 48px; left: 74px; padding: 4px 12px 16px 4px; }
    .osiris-toolbar-btn { width: 32px; height: 32px; font-size: 14px; }
    .osiris-bottombar.osiris-ticker-1row { height: 24px; }
    .osiris-bottombar.osiris-ticker-2row { height: 38px; }
    .osiris-bottombar.osiris-ticker-3row { height: 52px; }
    .osiris-ticker-row { padding: 0 8px; gap: 8px; }
    .osiris-ticker-item { font-size: 9px; }
}
