.app-nearby-map[hidden] { display: none; }
.app-nearby-map { display: none; }

@media (min-width: 1024px) {
    .app-nearby-map:not([hidden]) {
        display: block;
        position: absolute;
        inset: -20px -20px 145px calc(-1 * clamp(60px, 8vw, 140px));
        opacity: 0;
        transform: translateY(22px) scale(.97);
        transition: opacity 800ms ease, transform 900ms cubic-bezier(.16, 1, .3, 1);
    }

    .app-nearby-map.is-visible { opacity: 1; transform: none; }
    .app-nearby-map-graphic {
        position: absolute;
        inset: 0 0 0 calc(-1 * clamp(72px, 6vw, 120px));
        transform: translateX(calc(-1 * clamp(90px, 9vw, 168px)));
        -webkit-mask-image: radial-gradient(ellipse 50% 50% at center, #000 42%, #0009 72%, transparent 100%);
        mask-image: radial-gradient(ellipse 50% 50% at center, #000 42%, #0009 72%, transparent 100%);
    }
    .app-nearby-map-graphic::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse at 55% 50%, #16222b66, transparent 68%);
        pointer-events: none;
    }
    .app-nearby-map:not(.is-loading) .app-nearby-map-graphic::before { animation: app-map-layer-reveal 600ms ease-out both; }

    .app-nearby-map-svg { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; }
    .app-map-layer-roads { animation: app-map-layer-reveal 850ms ease-out 100ms both; }
    .app-map-layer-labels { animation: app-map-layer-reveal 650ms ease-out 380ms both; }
    .app-map-pin {
        transform-box: fill-box;
        transform-origin: center;
        animation: app-map-pin-reveal 650ms cubic-bezier(.16, 1, .3, 1) both;
    }
    .app-map-layer-origin { animation: app-map-layer-reveal 600ms ease-out 600ms both; }
    .app-map-layer-routes,
    .app-map-traveller { animation: app-map-layer-reveal 700ms ease-out 1050ms both; }
    .app-nearby-map:not(.is-loading) .app-nearby-map-venue { animation: app-map-layer-reveal 650ms ease-out 950ms both; }
    .app-nearby-map.is-loading .app-nearby-map-venue { visibility: hidden; }
    .app-nearby-map-loader {
        display: none;
        position: absolute;
        left: calc(50% - 24px);
        top: calc(50% - 24px);
        width: 48px;
        height: 48px;
        box-sizing: border-box;
        border: 2px solid #91ceff20;
        border-top-color: #81eee0;
        border-right-color: #a18af4;
        border-radius: 50%;
        box-shadow: 0 0 18px #81eee030, inset 0 0 14px #9e65e625;
        filter: drop-shadow(0 0 5px #81eee080);
        animation: app-map-loading 950ms linear infinite;
    }
    .app-nearby-map.is-loading .app-nearby-map-loader { display: block; }
    .app-nearby-map.is-loading .app-nearby-map-svg { opacity: .2; }
    .app-nearby-map.is-loading .app-nearby-map-status { top: 60%; }
    .app-map-road { fill: none; stroke: #42464f; stroke-width: 3; opacity: .5; stroke-linecap: round; stroke-linejoin: round; }
    .app-map-road--major { stroke: #60646f; stroke-width: 5; opacity: .46; }
    .app-map-road--path { stroke-width: 1.7; opacity: .3; }
    .app-map-street-label { fill: #888d99; opacity: .65; font: 400 14px 'Poppins', sans-serif; letter-spacing: 1px; text-anchor: middle; }
    .app-map-route-base { fill: none; stroke: #a18af4; stroke-width: 3; opacity: .18; stroke-linecap: round; stroke-linejoin: round; }
    .app-map-route-light {
        fill: none;
        stroke: #81eee0;
        stroke-width: 4;
        stroke-linecap: round;
        stroke-linejoin: round;
        filter: drop-shadow(0 0 7px #60e3edaa) drop-shadow(0 0 18px #9e65e65c);
    }
    .app-map-traveller { fill: #f3fffc; filter: drop-shadow(0 0 8px #87fff4); pointer-events: none; }
    .app-map-pin { cursor: default; outline: none; }
    .app-map-pin-dot { fill: #b2a0ea; stroke: #1a1922; stroke-width: 5; transition: fill 250ms ease, r 250ms ease; }
    .app-map-pin.is-active .app-map-pin-dot,
    .app-map-pin:hover .app-map-pin-dot,
    .app-map-pin:focus .app-map-pin-dot { fill: #91f2df; r: 13; filter: drop-shadow(0 0 9px #82e9da80); }
    .app-map-pin-halo { fill: none; stroke: #afa0e5; stroke-width: 1; opacity: .3; }
    .app-map-pin-label { opacity: 0; transition: opacity 250ms ease; pointer-events: none; }
    .app-map-pin.is-active .app-map-pin-label,
    .app-map-pin:hover .app-map-pin-label,
    .app-map-pin:focus .app-map-pin-label { opacity: 1; }
    .app-map-pin-label rect { fill: #20232ce8; stroke: #ffffff28; }
    .app-map-pin-label text { fill: #f4f4f6; font: 500 17px 'Poppins', sans-serif; text-anchor: middle; }
    .app-map-origin-ring { fill: #7ebff81a; stroke: #91ceff75; stroke-width: 1.5; }
    .app-map-origin-dot { fill: #9dd6ff; stroke: #e8f7ff; stroke-width: 4; filter: drop-shadow(0 0 10px #73bdff88); }
    .app-map-origin-label { fill: #bbdfff; font: 500 16px 'Poppins', sans-serif; paint-order: stroke; stroke: #111; stroke-width: 5; }

    .app-nearby-map-location,
    .app-nearby-map-venue {
        position: absolute;
        display: grid;
        gap: 6px;
        font-family: 'Poppins', sans-serif;
    }
    .app-nearby-map-location { top: 5%; right: 7%; }
    .app-nearby-map-eyebrow { color: #a4d2f0; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
    .app-nearby-map-location strong { color: #dedfe4; font-size: .875rem; font-weight: 500; }
    .app-nearby-location-type { color: #7e8592; font-size: .75rem; }
    .app-nearby-use-location {
        justify-self: start;
        margin-top: 7px;
        padding: 8px 12px;
        border: 1px solid #a4d2f04d;
        border-radius: 6px;
        background: #15202bbb;
        color: #c7e8ff;
        font: 500 .875rem/1.3 'Poppins', sans-serif;
        cursor: pointer;
    }
    .app-nearby-use-location:hover { border-color: #bce5ff; background: #22303f; }
    .app-nearby-map-venue {
        right: 6%;
        bottom: 12%;
        max-width: 250px;
        padding: 14px 18px;
        border: 1px solid #ffffff1c;
        border-radius: 12px;
        background: #1a1e25e8;
        box-shadow: 0 16px 40px #0005;
    }
    .app-nearby-map-venue[hidden] { display: none; }
    .app-nearby-map-name { color: #f6f6f8; font-size: 1rem; font-weight: 600; }
    .app-nearby-map-detail { color: #a3acb9; font-size: .875rem; line-height: 1.4; }
    .app-nearby-map-status { position: absolute; inset: 40% 10% auto; color: #9da5b0; text-align: center; font: 400 .875rem/1.6 'Poppins', sans-serif; }
    .app-nearby-map-status:empty { display: none; }
    .app-nearby-map-credit { position: absolute; bottom: 2%; right: 6%; color: #8a909a; font: 400 .75rem/1.4 'Poppins', sans-serif; }
    .app-nearby-map-credit a { color: #b5bdc9; }
}

.app-location-dialog {
    position: fixed;
    width: min(90vw, 470px);
    max-height: calc(100svh - 40px);
    box-sizing: border-box;
    overflow-y: auto;
    padding: 40px 32px 32px;
    border: 1px solid #ffffff24;
    border-radius: 20px;
    background: #181a20;
    color: #fff;
    box-shadow: 0 30px 100px #000b;
    font-family: 'Poppins', Arial, sans-serif;
}
.app-location-dialog[open] { animation: app-location-enter 220ms ease-out; }
.app-location-dialog::backdrop { background: #06070bc9; backdrop-filter: blur(8px); }
.app-location-dialog form { margin: 0; }
.app-location-eyebrow { display: block; margin-bottom: 16px; color: #9dbdd4; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.app-location-dialog h2 { margin: 0 0 22px; color: #fff; font: 400 2rem/1.05 'Archivo Black', sans-serif; letter-spacing: -.04em; }
.app-location-dialog p { margin: 0 0 14px; color: #b0b5c0; font-size: .875rem; line-height: 1.7; }
.app-location-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; color: #c4c8d1; font-size: 26px; cursor: pointer; }
.app-location-actions { display: flex; align-items: center; gap: 18px; margin-top: 26px; }
.app-location-continue { padding: 12px 20px; border: 0; border-radius: 6px; background: #e1f1ff; color: #121920; font: 600 .875rem/1.3 'Poppins', sans-serif; cursor: pointer; }
.app-location-continue:disabled { opacity: .5; cursor: wait; }
.app-location-cancel { padding: 12px 0; border: 0; background: transparent; color: #b4bbc7; font: 400 .875rem/1.3 'Poppins', sans-serif; cursor: pointer; }
.app-location-feedback:empty { display: none; }
.app-location-feedback:not(:empty) { padding: 12px 14px; border-radius: 8px; background: #ffffff08; color: #d1e4f5; }
.app-nearby-use-location:focus-visible,
.app-location-dialog button:focus-visible { outline: 2px solid #c0e8ff; outline-offset: 4px; }
@keyframes app-location-enter { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
@keyframes app-map-loading { to { transform: rotate(360deg); } }
@keyframes app-map-layer-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes app-map-pin-reveal { from { opacity: 0; scale: .65; } to { opacity: 1; scale: 1; } }

@media (prefers-reduced-motion: reduce) {
    .app-nearby-map,
    .app-map-pin-dot,
    .app-map-pin-label { transition: none !important; }
    .app-location-dialog[open] { animation: none; }
    .app-nearby-map-loader { animation: none; }
    .app-nearby-map-graphic::before,
    .app-nearby-map-svg g,
    .app-map-traveller,
    .app-nearby-map .app-nearby-map-venue { animation: none !important; }
}
