/* GIS Map page styles */

.page-body { display: flex; flex: 1; overflow: hidden; min-height: 0; }

/* ─── VIEW TABS ─── */
.view-tabs { display: flex; gap: 2px; background: rgba(26,47,78,0.4); border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.view-tab { display: flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted); text-decoration: none; transition: all 0.15s; font-family: inherit; position: relative; }
.view-tab:hover { color: var(--text); background: rgba(59,130,246,0.06); }
.view-tab.active { background: var(--navy); color: var(--text); }
.view-tab i { font-size: 13px; }

/* ─── MAIN CANVAS ─── */
.occ-canvas { flex: 1; position: relative; overflow: hidden; background: #080E1A; min-height: 0; min-width: 0; }

/* ─── CANVAS TOOLBAR ─── */
.canvas-toolbar { position: absolute; top: 12px; left: 12px; z-index: 10; display: flex; flex-direction: column; gap: 4px; }
.toolbar-btn { width: 34px; height: 34px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); font-size: 14px; transition: all 0.15s; }
.toolbar-btn:hover { border-color: var(--accent); color: var(--accent2); background: rgba(59,130,246,0.08); }
.toolbar-btn.active { background: var(--navy); color: var(--accent2); border-color: var(--accent); }

/* ─── LEGEND ─── */
.map-legend { position: absolute; bottom: 12px; left: 12px; z-index: 10; background: rgba(13,21,38,0.88); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.legend-title { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ld-ontime  { background: #10D9A0; }
.ld-warning { background: #FBBF24; }
.ld-alert   { background: #FB923C; }
.ld-critical{ background: #F87171; }
.ld-unknown { background: #5E7FA8; }

/* ─── MAP SCALE BADGE ─── */
.map-scale { position: absolute; bottom: 12px; right: 12px; z-index: 10; background: rgba(13,21,38,0.88); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 11px; color: var(--muted); }
.map-scale strong { color: var(--text); font-weight: 700; }

/* ─── RIGHT PANEL ─── */
.occ-right { width: 300px; background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.right-tabs { display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.right-tab { flex: 1; padding: 10px 8px; font-size: 11px; font-weight: 600; cursor: pointer; text-align: center; color: var(--muted); border-bottom: 2px solid transparent; transition: all 0.15s; background: none; border-top: none; border-left: none; border-right: none; font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 5px; }
.right-tab:hover { color: var(--text); }
.right-tab.active { color: var(--accent2); border-bottom-color: var(--accent); }
.right-badge { background: var(--red); color: #fff; font-size: 9px; font-weight: 700; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.right-badge-amber { background: var(--amber) !important; color: #080E1A !important; }
.right-panel-body { flex: 1; overflow-y: auto; }

/* ─── ALERT ITEMS ─── */
.occ-alert-item { padding: 10px 12px; border-bottom: 1px solid rgba(26,47,78,0.5); cursor: pointer; transition: background 0.15s; }
.occ-alert-item:hover { background: rgba(59,130,246,0.05); }
.occ-alert-item.crit { border-left: 3px solid var(--red); }
.occ-alert-item.high { border-left: 3px solid var(--amber); }
.occ-alert-item.warn { border-left: 3px solid var(--accent); }
.alert-row1 { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.alert-kano { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; color: var(--text); }
.alert-ack-btn { margin-left: auto; padding: 2px 8px; border-radius: 5px; font-size: 10px; font-weight: 600; border: 1px solid rgba(59,130,246,0.3); background: rgba(59,130,246,0.08); color: var(--accent2); cursor: pointer; transition: all 0.15s; font-family: inherit; }
.alert-ack-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.alert-detail { font-size: 11px; color: var(--muted); }
.alert-ts { font-size: 10px; color: var(--muted); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }

/* ─── STATION DETAIL POPUP ─── */
.sta-detail { position: absolute; right: 300px; top: 0; bottom: 0; width: 260px; background: var(--panel); border-left: 1px solid var(--border); display: none; flex-direction: column; z-index: 20; }
.sta-detail.open { display: flex; }
.sta-hdr { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.sta-name-big { font-size: 14px; font-weight: 700; color: var(--text); }
.sta-code { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); margin-top: 2px; }
.sta-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; }
.sta-close:hover { color: var(--red); }
.sta-body { flex: 1; overflow-y: auto; }
.sta-section { padding: 12px 14px; border-bottom: 1px solid rgba(26,47,78,0.5); }
.sta-sec-title { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.sta-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.sta-key { font-size: 11.5px; color: var(--muted); }
.sta-val { font-size: 11.5px; font-weight: 600; color: var(--text); font-family: 'JetBrains Mono', monospace; }
.sta-val.green { color: var(--green); }
.sta-val.amber { color: var(--amber); }
.sta-val.red { color: var(--red); }

/* ─── TOOLTIP ─── */
.occ-tooltip { position: absolute; z-index: 50; pointer-events: none; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; min-width: 160px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); display: none; }
.tooltip-header { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.tooltip-row { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); padding: 1px 0; }
.tooltip-row span { color: var(--text); font-weight: 600; font-family: 'JetBrains Mono', monospace; }
