/* Interactive map prototype */

.interactive-map-page,
.interactive-map-page * {
    box-sizing: border-box;
}

.interactive-map-page {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 60px;
    color: #2b261f;
    font-family: Roboto, Arial, sans-serif;
}

.interactive-map-heading,
.interactive-map-card,
.interactive-map-guide,
.interactive-map-editor {
    background: #ead9b5;
    border: 1px solid rgba(75, 58, 34, 0.52);
    border-top: 4px solid #8a6c30;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.interactive-map-heading {
    padding: clamp(22px, 4vw, 40px);
    text-align: center;
}

.interactive-map-heading h1,
.interactive-map-toolbar h2,
.interactive-map-guide h2 {
    margin: 0;
    color: #3d2455;
    font-family: Cinzel, Georgia, serif;
}

.interactive-map-heading h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.interactive-map-heading p:last-child {
    max-width: 760px;
    margin: 14px auto 0;
    line-height: 1.6;
}

.interactive-map-eyebrow {
    margin: 0 0 7px;
    color: #765a24;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.interactive-map-card,
.interactive-map-guide,
.interactive-map-editor {
    margin-top: 24px;
}

.interactive-map-card {
    padding: clamp(12px, 2vw, 20px);
}

.interactive-map-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.interactive-map-toolbar h2,
.interactive-map-guide h2 {
    font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.interactive-map-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interactive-map-actions button,
.interactive-map-actions a {
    min-height: 40px;
    padding: 8px 13px;
    color: #fff;
    background: #4c2b66;
    border: 1px solid #4c2b66;
    border-radius: 7px;
    font: 600 0.9rem Roboto, Arial, sans-serif;
    line-height: 22px;
    text-decoration: none;
    cursor: pointer;
}

.interactive-map-actions button:hover,
.interactive-map-actions a:hover,
.interactive-map-actions button:focus-visible,
.interactive-map-actions a:focus-visible {
    background: #65417f;
}

.interactive-map-canvas {
    width: 100%;
    height: clamp(420px, 66vh, 760px);
    overflow: hidden;
    background: #173a4a;
    border: 1px solid #604b2c;
    border-radius: 10px;
}

.interactive-map-status {
    margin: 10px 2px 0;
    color: #655b4b;
    font-size: 0.86rem;
}

.interactive-map-guide {
    padding: clamp(18px, 3vw, 30px);
}

.interactive-map-guide > p {
    line-height: 1.6;
}

#prototype-location-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

#prototype-location-list li {
    padding: 13px;
    background: rgba(255, 255, 255, 0.34);
    border: 1px solid rgba(75, 58, 34, 0.3);
    border-radius: 9px;
}

#prototype-location-list a {
    color: #374e6d;
    font-weight: 700;
    text-underline-offset: 3px;
}

.interactive-map-editor {
    padding: 0;
    overflow: hidden;
}

.interactive-map-editor summary {
    padding: 14px 18px;
    color: #2b261f;
    background: rgba(181, 147, 73, 0.18);
    font-weight: 700;
    cursor: pointer;
}

.interactive-map-editor p,
.interactive-map-editor output {
    display: block;
    margin: 15px 18px;
}

.interactive-map-editor output {
    padding: 10px;
    background: rgba(255, 255, 255, 0.42);
    border-radius: 6px;
    font-family: monospace;
}

/* Leaflet theme */
.interactive-map-page .leaflet-control-zoom a {
    color: #3d2455;
    background: #f3e5c4;
}

.interactive-map-page .leaflet-popup-content-wrapper,
.interactive-map-page .leaflet-popup-tip {
    color: #2b261f;
    background: #f1e2bf;
}

.interactive-map-page .leaflet-popup-content h3 {
    margin: 0 0 7px;
    color: #3d2455;
    font-family: Cinzel, Georgia, serif;
    font-size: 1.05rem;
}

.interactive-map-page .leaflet-popup-content p {
    margin: 0 0 9px;
    line-height: 1.45;
}

.interactive-map-page .leaflet-popup-content a {
    color: #374e6d;
    font-weight: 700;
}


/* Compact interactive-map marker */

.rodinia-marker-dot {
    width: 14px !important;
    height: 14px !important;

    margin: 0 !important;

    background: #4c2b66;
    border: 2px solid #f0d788;
    border-radius: 50%;

    box-shadow:
        0 0 0 1px rgba(40, 26, 15, 0.9),
        0 2px 6px rgba(0, 0, 0, 0.55);

    opacity: 0.82;

    transition:
        opacity 140ms ease,
        transform 140ms ease,
        box-shadow 140ms ease;
}

.rodinia-marker-dot:hover,
.rodinia-marker-dot:focus {
    opacity: 1;

    box-shadow:
        0 0 0 2px rgba(240, 215, 136, 0.95),
        0 3px 8px rgba(0, 0, 0, 0.65);
}


@media screen and (max-width: 800px) {
    .interactive-map-page {
        width: min(100% - 18px, 1180px);
        margin-top: 12px;
    }

    .interactive-map-toolbar {
        display: block;
    }

    .interactive-map-actions {
        margin-top: 10px;
    }

    .interactive-map-canvas {
        height: 62vh;
        min-height: 390px;
    }

    #prototype-location-list {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .interactive-map-page .leaflet-zoom-animated,
    .interactive-map-page .leaflet-fade-anim .leaflet-popup {
        transition: none !important;
    }
}
