/*
 * WEATHERDEMON NAVIGATION MAP UI 7.0.80
 * Presentation-only navigation layer.
 */

:root {
    --wd-nav-bg: #080b10;
    --wd-nav-panel: rgba(13, 18, 25, 0.94);
    --wd-nav-panel-soft: rgba(17, 24, 33, 0.88);
    --wd-nav-border: rgba(148, 174, 201, 0.24);
    --wd-nav-text: #f4f7fa;
    --wd-nav-muted: #aebdca;
    --wd-nav-route: #35b8ff;
    --wd-nav-route-glow: rgba(53, 184, 255, 0.48);
    --wd-nav-corridor: rgba(53, 184, 255, 0.18);
    --wd-nav-alert: #ffb14a;
    --wd-nav-danger: #ff5757;
    --wd-nav-good: #6de2a1;
}

.wd-navigation-shell {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background:
        radial-gradient(
            circle at 70% 10%,
            rgba(38, 92, 138, 0.22),
            transparent 36%
        ),
        linear-gradient(180deg, #0a0e14, #06080c);
    color: var(--wd-nav-text);
    font-family: inherit;
}

.wd-navigation-shell[hidden] {
    display: none !important;
}

.wd-nav-topbar {
    position: relative;
    z-index: 9503;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    background: rgba(6, 9, 14, 0.96);
    border-bottom: 1px solid var(--wd-nav-border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.34);
}

.wd-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.wd-nav-demon-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background:
        radial-gradient(
            circle at 50% 42%,
            rgba(80, 195, 255, 0.32),
            transparent 60%
        ),
        #101822;
    border: 1px solid rgba(78, 190, 255, 0.35);
    box-shadow:
        0 0 18px rgba(48, 173, 255, 0.18),
        inset 0 0 18px rgba(48, 173, 255, 0.08);
    font-size: 22px;
}

.wd-nav-brand-copy {
    min-width: 0;
}

.wd-nav-brand-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wd-nav-brand-tagline {
    margin: 1px 0 0;
    color: var(--wd-nav-muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.wd-nav-close {
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--wd-nav-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--wd-nav-text);
    font-size: 1.2rem;
    cursor: pointer;
}

.wd-nav-stage {
    position: relative;
    min-height: 0;
    overflow: hidden;
}

#wd-navigation-map {
    position: absolute;
    inset: 0;
    background: #0b1118;
}

#wd-navigation-map .leaflet-tile-pane {
    filter:
        invert(0.88)
        hue-rotate(180deg)
        brightness(0.55)
        contrast(1.18)
        saturate(0.72);
}

#wd-navigation-map .leaflet-control-zoom a,
#wd-navigation-map .leaflet-control-attribution {
    background: rgba(10, 14, 20, 0.88);
    color: #d8e4ed;
    border-color: rgba(255, 255, 255, 0.14);
}

#wd-navigation-map .leaflet-control-attribution a {
    color: #85cfff;
}

.wd-nav-maneuver-card {
    position: absolute;
    z-index: 9502;
    top: 14px;
    left: 50%;
    width: min(720px, calc(100% - 28px));
    transform: translateX(-50%);
    border: 1px solid rgba(112, 199, 255, 0.34);
    border-radius: 18px;
    background:
        linear-gradient(
            135deg,
            rgba(17, 29, 42, 0.97),
            rgba(9, 14, 21, 0.96)
        );
    box-shadow:
        0 16px 44px rgba(0, 0, 0, 0.45),
        0 0 28px rgba(44, 166, 244, 0.10);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

.wd-nav-maneuver-main {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
}

.wd-nav-turn-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 15px;
    background: rgba(45, 174, 250, 0.13);
    border: 1px solid rgba(77, 191, 255, 0.27);
    font-size: 28px;
}

.wd-nav-maneuver-distance {
    margin-bottom: 2px;
    color: #78d0ff;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wd-nav-maneuver-instruction {
    font-size: clamp(1.05rem, 2vw, 1.4rem);
    font-weight: 800;
    line-height: 1.15;
}

.wd-nav-next {
    padding: 8px 16px 11px;
    background: rgba(255, 255, 255, 0.025);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--wd-nav-muted);
    font-size: 0.78rem;
}

.wd-nav-follow-button {
    position: absolute;
    z-index: 9502;
    right: 14px;
    bottom: 14px;
    min-width: 48px;
    min-height: 48px;
    border: 1px solid rgba(116, 202, 255, 0.32);
    border-radius: 50%;
    background: rgba(10, 17, 25, 0.92);
    color: #8ed8ff;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
}

.wd-nav-bottom {
    position: relative;
    z-index: 9503;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: 10px;
    padding: 10px;
    background: rgba(5, 8, 12, 0.97);
    border-top: 1px solid var(--wd-nav-border);
}

.wd-nav-trip-card,
.wd-nav-scout-card {
    min-width: 0;
    border: 1px solid var(--wd-nav-border);
    border-radius: 16px;
    background: var(--wd-nav-panel);
}

.wd-nav-trip-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
}

.wd-nav-stat {
    padding: 11px 12px;
    background: rgba(255, 255, 255, 0.025);
}

.wd-nav-stat-label {
    color: var(--wd-nav-muted);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.wd-nav-stat-value {
    margin-top: 2px;
    font-size: 1rem;
    font-weight: 800;
}

.wd-nav-scout-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
}

.wd-nav-scout-badge {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 177, 74, 0.12);
    border: 1px solid rgba(255, 177, 74, 0.28);
    color: #ffc06c;
    font-weight: 900;
}

.wd-nav-scout-name {
    color: #ffc06c;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.wd-nav-scout-message {
    margin-top: 2px;
    color: #e5edf4;
    font-size: 0.82rem;
    line-height: 1.25;
}

.wd-nav-vehicle-marker {
    width: 26px;
    height: 26px;
    border: 3px solid #ffffff;
    border-radius: 50% 50% 50% 4px;
    background: #2eb7ff;
    box-shadow:
        0 0 0 6px rgba(46, 183, 255, 0.20),
        0 0 22px rgba(46, 183, 255, 0.72);
    transform: rotate(-45deg);
}

.wd-nav-vehicle-marker > span {
    display: block;
    width: 100%;
    height: 100%;
}

.wd-nav-hazard-marker {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 2px solid #fff2db;
    border-radius: 50%;
    background: #e68a2e;
    color: white;
    font-size: 14px;
    box-shadow: 0 0 16px rgba(230, 138, 46, 0.55);
}

.wd-nav-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 8px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(109, 226, 161, 0.11);
    border: 1px solid rgba(109, 226, 161, 0.22);
    color: var(--wd-nav-good);
    font-size: 0.62rem;
    font-weight: 800;
    vertical-align: middle;
}

.wd-nav-status-pill.is-rerouting {
    background: rgba(255, 177, 74, 0.11);
    border-color: rgba(255, 177, 74, 0.28);
    color: var(--wd-nav-alert);
}

body.wd-navigation-active {
    overflow: hidden;
}

@media (max-width: 760px) {
    .wd-nav-topbar {
        padding: 7px 9px;
    }

    .wd-nav-brand-tagline {
        display: none;
    }

    .wd-nav-demon-mark {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 18px;
    }

    .wd-nav-maneuver-card {
        top: 8px;
        width: calc(100% - 16px);
        border-radius: 15px;
    }

    .wd-nav-maneuver-main {
        gap: 10px;
        padding: 10px 12px;
    }

    .wd-nav-turn-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 23px;
    }

    .wd-nav-bottom {
        grid-template-columns: 1fr;
        gap: 7px;
        padding: 7px;
    }

    .wd-nav-scout-card {
        order: -1;
    }

    .wd-nav-stat {
        padding: 8px;
    }

    .wd-nav-stat-value {
        font-size: 0.92rem;
    }
}
