/* Network Routes map (network-routes.aspx) */
:root {
    --nm-accent: #f89838;
    --nm-accent-deep: #e8792f;
    --nm-navy: #0b3c8c;
    --nm-navy-deep: #0f2238;
    --nm-sea: #62c4fb;
}

.network-map-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.network-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.network-stats li {
    min-width: 96px;
    padding: .6rem 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e3a5f 0%, var(--nm-navy-deep) 100%);
    color: #fff;
    text-align: center;
    box-shadow: 0 6px 18px rgba(15, 34, 56, .18);
}

.network-stats strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.2;
    color: var(--nm-accent);
}

.network-stats span {
    font-size: .72rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .85;
}

.network-map-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(15, 34, 56, .18);
    border: 1px solid rgba(30, 58, 95, .08);
}

.network-map {
    height: 560px;
    width: 100%;
    background: var(--nm-sea); /* shown while the vector tiles load */
}

@media (max-width: 767px) {
    .network-map { height: 420px; }
}

/* Home page variant: same footprint as the former 850x863 route image */
.network-map-card--home {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.network-map-card--home .network-map {
    height: auto;
    aspect-ratio: 850 / 863;
}

.left-corner-cut:before { z-index: 4; } /* keep the corner cut above the map */

.network-map-card--home .network-map-legend {
    left: 12px;
    bottom: 12px;
    gap: .6rem;
    padding: .4rem .7rem;
    font-size: .72rem;
}

.network-map-card--home .network-map-panel { width: 280px; }

/* Legend */
.network-map-legend {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    padding: .55rem .9rem;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 34, 56, .15);
    font-size: .78rem;
    color: #333;
}

.network-map-legend i {
    display: inline-block;
    vertical-align: middle;
    margin-right: .35rem;
}

.legend-airport { width: 10px; height: 10px; border-radius: 50%; background: var(--nm-navy); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.legend-route { width: 22px; height: 0; border-top: 2px solid var(--nm-accent-deep); }

.network-map-hint {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    padding: .35rem .8rem;
    border-radius: 999px;
    background: rgba(15, 34, 56, .75);
    color: #fff;
    font-size: .75rem;
    pointer-events: none;
    transition: opacity .4s ease;
}

.network-map-hint.is-hidden { opacity: 0; }

/* Airport markers */
.nm-airport {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: opacity .25s ease;
}

.nm-airport .nm-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
}

.nm-airport .nm-dot {
    background: var(--nm-navy);
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(15, 34, 56, .35);
    transition: transform .2s ease;
}

.nm-airport .nm-label {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 2px;
    padding: 1px 6px;
    border-radius: 6px;
    background: #fff;
    color: var(--nm-navy-deep);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(15, 34, 56, .18);
}

.nm-airport:hover .nm-dot,
.nm-airport.is-active .nm-dot { transform: scale(1.3); }

.nm-airport.is-dim { opacity: .35; }

/* Route hover tooltip */
.maplibregl-popup.nm-route-tip .maplibregl-popup-content {
    padding: 7px 11px;
    border-radius: 8px;
    background: var(--nm-navy-deep);
    color: #fff;
    font-size: .78rem;
    line-height: 1.35;
    box-shadow: 0 6px 16px rgba(15, 34, 56, .25);
    pointer-events: none;
}

.maplibregl-popup.nm-route-tip .maplibregl-popup-tip { display: none; }
.maplibregl-popup.nm-route-tip { pointer-events: none; }

.network-map .maplibregl-ctrl-group {
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(15, 34, 56, .15);
}

/* Airport detail panel (docked beside the routes instead of a popup over them) */
.network-map-panel {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    width: 320px;
    max-height: calc(100% - 130px); /* keep the zoom buttons below it visible */
    overflow-y: auto;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 34, 56, .22);
    font-size: .85rem;
    animation: nm-panel-in .3s ease;
}

.network-map-panel[hidden] { display: none; }

.nm-panel-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    color: #6c757d;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.nm-panel-close:hover { color: var(--nm-navy-deep); }

@keyframes nm-panel-in {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 767px) {
    .network-map-panel {
        top: auto;
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        max-height: 45%;
    }

    @keyframes nm-panel-in {
        from { opacity: 0; transform: translateY(16px); }
        to { opacity: 1; transform: none; }
    }
}

.nm-popup-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .4rem;
    padding-right: 1.25rem;
    font-weight: 700;
    color: var(--nm-navy-deep);
}

.nm-popup-title .nm-code {
    padding: 1px 7px;
    border-radius: 6px;
    background: var(--nm-accent);
    color: #fff;
    font-size: .78rem;
}

.nm-popup-sub {
    margin-bottom: .5rem;
    color: #6c757d;
    font-size: .78rem;
}

.nm-popup-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nm-popup-list li {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding: .25rem 0;
    border-top: 1px solid #f0f2f5;
}

.nm-popup-list li span:last-child {
    color: #6c757d;
    font-size: .75rem;
    text-align: right;
}
