/* airport.css — Netherlands Airport Info (nieuwe layout)
   Aanvullend op /style.css en Bootstrap 5. Alle klassen zijn bewust
   niet "row/item/section", zodat ze niet botsen met Bootstrap. */

/* Achtergrond: leg background.jpg in deze map */
body.page-airports {
    background-image: url('background.jpg') !important;
    background-position: center center !important;
    background-attachment: fixed !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

/* ---------- Index: sidebar ---------- */
.airport-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.search-box {
    position: relative;
}

.airport-search {
    background-color: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding-right: 2.5rem;
}

.airport-search::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.airport-search:focus {
    background-color: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-color: #0dcaf0;
    box-shadow: 0 0 0 0.2rem rgba(13, 202, 240, 0.2);
}

.search-box i {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

.airport-list {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: 62vh;
    min-height: 200px;
    padding-right: 4px;
}

.airport-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
    padding: 0.55rem 0.75rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.airport-item:hover,
.airport-item:focus-visible {
    border-color: #0dcaf0;
    background: rgba(13, 202, 240, 0.12);
    outline: none;
}

.airport-item.active {
    background: #0dcaf0;
    border-color: #0dcaf0;
    color: #000;
    font-weight: 600;
}

.airport-code {
    flex: 0 0 auto;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    background: rgba(13, 202, 240, 0.18);
    color: #0dcaf0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
}

.airport-item.active .airport-code {
    background: rgba(0, 0, 0, 0.18);
    color: #000;
}

/* ---------- Index: kaart ---------- */
.map-wrap {
    position: relative;
    isolation: isolate; /* Leaflet-panes (z-index tot 1000) blijven onder navbar en dropdowns */
    border-radius: 6px;
    overflow: hidden;
}

#map {
    height: 70vh;
    min-height: 420px;
}

.map-controls {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #212529;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.control-btn:hover,
.control-btn:focus-visible {
    background: #0dcaf0;
    color: #000;
    outline: none;
}

.custom-marker {
    position: relative;
    display: block;
    width: 24px;
    height: 24px;
    left: -12px;
    top: -12px;
    background-color: #0aa2c0;
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.custom-marker::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    margin: 6px 0 0 6px;
    background-color: #fff;
    border-radius: 50%;
}

/* Leaflet-popup en bronvermelding: de site-CSS zet tekst wit, op de witte
   Leaflet-vlakken is dat onleesbaar. Daarom hier bewust met !important. */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: #fff;
}

.leaflet-popup-content,
.leaflet-popup-content p,
.leaflet-popup-content strong,
.leaflet-popup-content span {
    color: #212529 !important;
}

.leaflet-popup-content {
    min-width: 200px;
}

.leaflet-popup-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50 !important;
}

.leaflet-popup-content p {
    margin: 0 0 0.5rem;
}

.leaflet-popup-content a.popup-btn {
    display: block;
    padding: 0.45rem 1rem;
    background-color: #0dcaf0;
    color: #000 !important;
    border-radius: 4px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.leaflet-popup-content a.popup-btn:hover {
    background-color: #31d2f2;
}

.leaflet-container a.leaflet-popup-close-button {
    color: #6c757d !important;
}

.leaflet-control-attribution,
.leaflet-control-attribution a {
    color: #333 !important;
}

/* ---------- Vliegveldpagina: METAR ---------- */
.metar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.flight-category {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 5px;
    color: #fff;
    font-weight: 700;
}

.flight-category.fc-VFR  { background-color: #00aa00; }
.flight-category.fc-MVFR { background-color: #0077cc; }
.flight-category.fc-IFR  { background-color: #dd0000; }
.flight-category.fc-LIFR { background-color: #aa00aa; }

.info-row {
    display: flex;
    gap: 1rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    flex: 0 0 110px;
    color: #0dcaf0;
    font-weight: 600;
}

.info-value {
    flex: 1;
    min-width: 0;
    color: #fff;
}

.metar-raw {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    word-break: break-word;
}

/* ---------- Vliegveldpagina: charts ---------- */
.airport-section {
    padding: 0.25rem 0 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.airport-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.airport-section-title {
    display: flex;
    align-items: center;
    margin: 0 0 0.9rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0dcaf0;
}

.airport-section-title i {
    margin-right: 0.6rem;
}

.chart-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.6rem;
}

.chart-item {
    flex: 0 0 260px;
    max-width: 100%;
}

.chart-desc {
    flex: 1;
    min-width: 0;
}

.chart-button {
    display: block;
    width: 100%;
    padding: 0.4rem 0.8rem;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: 1px solid #0dcaf0;
    border-radius: 6px;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
}

.chart-button i {
    margin-right: 0.45rem;
    color: #0dcaf0;
}

.chart-button:hover,
.chart-button:focus-visible {
    background: #0dcaf0;
    color: #000;
    outline: none;
}

.chart-button:hover i,
.chart-button:focus-visible i {
    color: #000;
}

.frequency {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: rgba(13, 202, 240, 0.12);
    border-radius: 6px;
    color: #0dcaf0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .airport-list {
        max-height: 240px;
    }

    #map {
        height: 60vh;
        min-height: 360px;
    }
}

@media (max-width: 575.98px) {
    .info-row {
        flex-direction: column;
        gap: 0.1rem;
    }

    .info-label {
        flex-basis: auto;
    }
}