/* Chart Viewer popup (ui/chartViewerPopup.js): fills the map container, same behavioral pattern as
   .skewt-overlay in skewt.css -- lives inside #map, centered on it, follows the side bars'
   expand/collapse. Kept deliberately simpler than the Skew-T popup: one iframe, no controls. */
.chart-viewer-popup {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    background: var(--panel-bg, #1b1f27);
    color: var(--text-light);
    padding: 12px 14px;
    box-sizing: border-box;
}
.chart-viewer-popup[hidden] { display: none; }

.chart-viewer-popup-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.chart-viewer-popup-title {
    font-weight: 700;
    font-size: 14px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-viewer-popup-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
}

.chart-viewer-popup-actions a {
    color: #8ab4ff;
    font-size: 12px;
    text-decoration: none;
}

.chart-viewer-popup-close {
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 2px 6px;
}

.chart-viewer-popup-frame {
    background: #fff;
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

@media (max-width: 760px) {
    .chart-viewer-popup {
        padding: 10px;
    }
}

/* Click popup on a SID/STAR map overlay line or fix point
   (static/js/map/procedureOverlaysLayer.js). A lightweight MapLibre popup, not part of the
   persistent right-side info panel. */
.procedure-overlay-popup .maplibregl-popup-content {
    background: var(--panel-bg, #1b1f27);
    border: 1px solid var(--panel-border);
    color: var(--text-light);
    font-size: 12px;
    padding: 8px 10px;
}

.procedure-overlay-popup-title {
    color: white;
    font-weight: 700;
    margin-bottom: 3px;
}

.procedure-overlay-popup-fix {
    font-weight: 600;
    margin-bottom: 3px;
}

.procedure-overlay-popup-meta {
    opacity: 0.85;
    margin-bottom: 2px;
}

.procedure-overlay-popup-status {
    color: #ffb454;
    margin-top: 4px;
}

.procedure-overlay-popup-disclaimer {
    font-size: 10px;
    font-style: italic;
    margin-top: 6px;
    opacity: 0.65;
}

/* Airport-wide "All SIDs / All STARs" toolbar (ui/chartViewer.js). */
.chart-airport-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 8px; }
.chart-airport-btn {
    font-size: 11px; padding: 3px 8px; border-radius: 4px; cursor: pointer;
    border: 1px solid var(--panel-border); background: transparent; color: var(--text-light);
}
.chart-airport-btn[data-airport-type="SID"].active { border-color: #22d3ee; color: #22d3ee; }
.chart-airport-btn[data-airport-type="STAR"].active { border-color: #f472b6; color: #f472b6; }
.chart-airport-runway { font-size: 11px; }
.chart-airport-note { flex-basis: 100%; font-size: 10.5px; color: var(--text-muted, #9aa3ad); }
