/* Map styles for Leaflet map (moved from inline in index.html)
   Includes marker visuals: white core, golden ring, drop shadow, and pulsing glow.
*/

/* Responsive map sizing */
#map-section {
    background: linear-gradient(to bottom, var(--color-dark-gray), var(--color-black));
}

#map {
    width: 100%;
    height: 60vh;
    /* viewport-based height for responsiveness */
    min-height: 320px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    margin: 0 auto 40px auto;
}

/* Custom DivIcon styling. We'll keep pointer-events so markers can be clicked/draggable
   Note: do NOT translate the container here — Leaflet's iconAnchor handles exact placement
*/
.custom-pin {
    position: relative;
    width: 44px;
    height: 44px;
    /* Leave positioning to Leaflet's iconAnchor to ensure exact coordinate alignment */
    pointer-events: auto;
}

/* Golden ring */
.custom-pin .pin-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 4px solid var(--color-gold);
    /* golden ring */
    z-index: 3;
    background: rgba(201, 166, 70, 0.02);
}

/* White circular core */
.custom-pin .pin-core {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-white);
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Subtle drop-shadow halo below */
.custom-pin .pin-shadow {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translate(-50%, -20%);
    width: 56px;
    height: 12px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    filter: blur(6px);
    z-index: 1;
    pointer-events: none;
}

/* Pulsing outer glow */
.custom-pin .pin-pulse {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(201, 166, 70, 0.16);
    z-index: 2;
    pointer-events: none;
    /* decorative */
    animation: pinPulse 2000ms infinite ease-out;
}

@keyframes pinPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.9;
    }

    70% {
        transform: translate(-50%, -50%) scale(2.1);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* Ensure Leaflet default icon image paths do not show */
.leaflet-container .leaflet-marker-icon {
    background: transparent;
    border: 0;
}

/* Popup tweaks for accessibility */
.leaflet-popup-content {
    font-family: var(--font-primary);
    font-size: 14px;
}

.leaflet-popup-content h4 {
    margin: 0 0 6px 0;
    font-size: 15px;
}

@media screen and (max-width: 768px) and (orientation: portrait) {
    #map {
        min-height: 300px;
        height: 300px;
    }
}