.col-fixed {
    width: 5em;
    text-align: end;
}
.col-fluid {
    flex: 1;
}

.flight-category-VFR {
    background-color: #198754;
    color: white;
}

.flight-category-MVFR {
    background-color: #0d6efd;
    color: white;
}

.flight-category-IFR {
    background-color: #dc3545;
    color: white;
}

.flight-category-LIFR {
    background-color: #ff00ff;
    color: white;
}

.flight-category-UNKNOWN {
    background-color: grey;
    color: white;
}

.flight-category-dimmed {
    opacity: 0.5;
}

#overview-map {
    height: 25em;
    width: 100%;
    margin: 0 auto;
}

/* METAR hover interaction */
.metar-group {
    cursor: pointer;
    border-radius: 2px;
    transition: background-color 0.1s;
}
.metar-group:hover,
.metar-group.active {
    background-color: rgba(13, 110, 253, 0.15);
}
.metar-decoded {
    display: none;
    font-size: 0.85em;
    font-weight: normal;
    color: var(--bs-secondary-color);
    padding: 0.15em 0 0.15em 5.4em;
}

/* NOTAMs (behind ?notams=1) */
.notam-line {
    padding-bottom: 0.75em;
}
.notam-line .col-fluid {
    /* A flex item will not shrink below its min-content width by default, so
       an unbreakable token in item E (a URL, a coordinate string) would push
       the column past the row and wrap it under the badge. */
    min-width: 0;
}
.notam-text {
    /* Item E arrives hard-wrapped and sometimes column-aligned; keep it. */
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 0.95em;
}
.notam-meta {
    font-size: 0.85em;
}
.notam-raw {
    font-size: 0.85em;
}
.notam-raw summary {
    cursor: pointer;
}
.notam-raw pre {
    font-size: inherit;
    margin-top: 0.25em;
}

.notam-classification-INTL {
    background-color: #0d6efd;
    color: white;
}

.notam-classification-DOM {
    background-color: #6c757d;
    color: white;
}

.notam-classification-MIL,
.notam-classification-LMIL {
    background-color: #212529;
    color: white;
}

/* Near-black is the dark theme's background, so the badge inverts to near-white there */
[data-bs-theme=dark] .notam-classification-MIL,
[data-bs-theme=dark] .notam-classification-LMIL {
    background-color: #dee2e6;
    color: #212529;
}

.notam-classification-FDC {
    background-color: #fd7e14;
    color: white;
}

/* Theme switcher: checkmark on the selected option */
[data-bs-theme-value].active .bi-check2 {
    display: inline-block !important;
}

/* MapLibre controls in the dark theme */
[data-bs-theme=dark] .maplibregl-ctrl-group,
[data-bs-theme=dark] .maplibregl-ctrl.maplibregl-ctrl-attrib {
    background-color: var(--bs-body-bg);
}
[data-bs-theme=dark] .maplibregl-ctrl-group button + button {
    border-top-color: var(--bs-border-color);
}
[data-bs-theme=dark] .maplibregl-ctrl button .maplibregl-ctrl-icon,
[data-bs-theme=dark] .maplibregl-ctrl-attrib-button {
    filter: invert(1);
}
[data-bs-theme=dark] .maplibregl-ctrl-attrib,
[data-bs-theme=dark] .maplibregl-ctrl-attrib a {
    color: var(--bs-secondary-color);
}

/* World map theme toggle: one MapLibre control group holding a single button */
.theme-control button {
    color: var(--bs-body-color);
    font-size: 15px;
    line-height: 1;
}

/* Joined to the bottom of the zoom buttons, so it reads as one more button in that group */
.maplibregl-ctrl-top-right .maplibregl-ctrl-group:has(+ .theme-control) {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.maplibregl-ctrl-top-right .maplibregl-ctrl-group + .theme-control {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    box-shadow: none;
}
.maplibregl-ctrl-group + .theme-control button {
    border-top: 1px solid #ddd;
}
[data-bs-theme=dark] .maplibregl-ctrl-group + .theme-control button {
    border-top-color: var(--bs-border-color);
}
/* The group's outline without its top edge, which would draw a heavier line over the compass button */
.maplibregl-ctrl-group + .theme-control::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .1);
    clip-path: inset(2px -2px -2px -2px);
    pointer-events: none;
}
