/* User-specific focus airport + saved locations dropdown. */

#locations-panel, #markers-panel {
    position: fixed;
    top: calc(var(--topbar-h) + 8px);
    right: 12px;
    z-index: 100001;
    width: min(360px, calc(100vw - 24px));
    max-height: min(640px, calc(100vh - var(--topbar-h) - 24px));
    overflow-y: auto;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 7px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
    color: var(--text-light);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#locations-panel[hidden], #markers-panel[hidden] { display: none; }

#locations-header, #markers-header {
    font-weight: bold;
    font-size: 14px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--panel-border);
}

.locations-focus-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.locations-focus-label {
    flex: 1;
}

#locations-panel button, #markers-panel button {
    padding: 6px 8px;
    background: var(--btn-bg);
    color: var(--text-light);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

#locations-panel button:hover, #markers-panel button:hover {
    background: var(--btn-hover);
}

.locations-add-row {
    display: flex;
    gap: 6px;
}

.locations-add-row input {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    background: var(--btn-bg);
    color: var(--text-light);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    text-transform: uppercase;
}

/* Typed codes show in capitals; the hint stays in normal case and size. */
.locations-add-row input::placeholder {
    text-transform: none;
    font-size: 12px;
    color: var(--text-light);
    opacity: 0.65;
}

.locations-watchlist-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #c8ced6;
    cursor: pointer;
}

.locations-watchlist-option input,
.locations-item-watchlist input {
    accent-color: var(--mint);
}

.locations-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 300px;
    overflow-y: auto;
}

.locations-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.locations-item-name {
    flex: 1;
    text-align: left;
}

.locations-item-watchlist {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #b7c0ca;
    font-size: 11px;
    white-space: nowrap;
    cursor: pointer;
}

.locations-item-remove {
    padding: 4px 8px !important;
    color: #ff8080 !important;
}

.locations-empty {
    font-size: 12px;
    color: #888;
    padding: 4px 0;
}

.locations-subtitle {
    color: #b7c0ca;
    font-size: 11px;
    line-height: 1.35;
    padding: 8px 0;
    border-bottom: 1px solid var(--panel-border);
    margin-bottom: 6px;
}

.locations-status {
    font-size: 12px;
    color: var(--mint);
}

.locations-status.locations-status-error {
    color: #ff8080;
}

@media (max-width: 700px) {
    #locations-panel {
        left: 6px;
        max-height: calc(100vh - var(--topbar-h) - var(--timeline-h) - 18px);
        right: 6px;
        width: auto;
    }
}

/* Stations overhaul (2026-10-09): type, group and filter selects; Watchlist star; type dot; group names. */
#locations-panel select {
    padding: 5px 6px;
    background: var(--btn-bg);
    color: var(--text-light);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    font-size: 12px;
}
.locations-add-row select { flex: none; }
.locations-add-row #locationsAddGroup { flex: 1; min-width: 0; }
.locations-filter-row { display: flex; align-items: center; gap: 8px; padding-top: 6px; border-top: 1px solid var(--panel-border); }
.locations-filter-row select { flex: 1; min-width: 0; }
.locations-count { font-size: 11px; color: #b7c0ca; white-space: nowrap; }
#locations-panel .locations-item-star { padding: 2px 4px; background: none; border: none; color: #6b7684; font-size: 15px; line-height: 1; }
#locations-panel .locations-item-star.on { color: #fbbf24; }
.locations-item-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); }
.locations-item-name { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.locations-item-code { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.locations-item-groups { font-size: 10.5px; color: #9aa3ad; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#locations-panel .locations-item-type { flex: none; width: 92px; padding: 3px 4px; font-size: 11px; }

/* Station type tag in the Groups tab (ui/stationGroupsPanel.js); colours match core/stationTypes.js. */
.station-type-tag { font-size: 10.5px; padding: 1px 5px; border-radius: 3px; color: #0b0f14; text-transform: capitalize; }
.station-type-hub { background: #fbbf24; }
.station-type-outstation { background: #38bdf8; }
.station-type-alternate { background: #c084fc; }

/* Markers tab (ui/markersPanel.js). */
.markers-form { display: flex; flex-direction: column; gap: 6px; }
#markers-panel input[type="text"] {
    min-width: 0; padding: 6px 8px; background: var(--btn-bg); color: var(--text-light);
    border: 1px solid var(--panel-border); border-radius: 4px; font-size: 12px;
}
.markers-coords { display: flex; gap: 6px; }
.markers-coords input { flex: 1; }
.markers-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#markers-panel #markerPickBtn.on { border-color: var(--mint, #5eead4); color: var(--mint, #5eead4); }
.markers-colors { display: inline-flex; gap: 4px; margin-left: auto; }
#markers-panel .markers-swatch { width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 2px solid transparent; }
#markers-panel .markers-swatch.on { border-color: white; }
#markers-panel .markers-rename { padding: 4px 6px; }

/* Hover briefing for your stations and markers on the map (map/stationMarkersLayer.js). */
.stn-brief-wrap .maplibregl-popup-content { background: var(--panel-bg, #121820); color: var(--text-light, #dbe3ea); padding: 8px 10px; border: 1px solid var(--panel-border, #2a3340); border-radius: 6px; }
.stn-brief-wrap .maplibregl-popup-tip { display: none; }
.stn-brief { font-size: 12px; line-height: 1.45; }
.stn-brief b { font-size: 13px; color: white; }
.stn-brief-tags { color: var(--type); font-size: 11px; }
.stn-brief-wx { font-weight: 600; }
.stn-brief-wx.cat-VFR { color: #4ade80; } .stn-brief-wx.cat-MVFR { color: #60a5fa; }
.stn-brief-wx.cat-IFR { color: #f87171; } .stn-brief-wx.cat-LIFR { color: #e879f9; }
.stn-brief-atc { color: #fbbf24; }
.stn-brief-dim { color: #9aa3ad; font-size: 11px; }
