/* Neighborhood Map Styles */
.map-wrap {
    position: relative;
    max-width: 100%;
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
    background: #f0f0f0; /* Placeholder while loading */
}

.map-iframe {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 8px;
}

.map-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    pointer-events: none; /* Allow clicks through to markers */
}

.map-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
    transform: translate(-50%, -50%); /* Center on coordinates */
    z-index: 10;
}

.map-marker:hover,
.map-marker:focus {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Marker types with AAA contrast colors */
.map-marker--viewpoints {
    background: #0066cc; /* Blue for viewpoints */
}

.map-marker--trails {
    background: #006b3c; /* Green for trails */
}

.map-marker--shore {
    background: #3498db; /* Light blue for shore */
}

.map-marker--eats {
    background: #d32f2f; /* Red for dining */
}

.map-fallback {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.map-fallback a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid rgba(0, 102, 204, 0.2);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.map-fallback a:hover,
.map-fallback a:focus {
    background: rgba(0, 102, 204, 0.15);
    border-color: rgba(0, 102, 204, 0.3);
    outline: 2px solid rgba(0, 102, 204, 0.3);
    outline-offset: 2px;
}

.map-legend {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
}

.map-legend ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.map-legend li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
}

.legend-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.legend-marker--viewpoints {
    background: #0066cc;
}

.legend-marker--trails {
    background: #006b3c;
}

.legend-marker--eats {
    background: #d32f2f;
}

.map-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #666;
    text-align: center;
    font-style: italic;
}

/* Visually hidden utility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .map-marker {
        width: 20px;
        height: 20px;
        font-size: 0.625rem;
    }

    .map-fallback {
        flex-direction: column;
        align-items: center;
    }

    .map-legend ul {
        gap: 1rem;
    }

    .map-legend li {
        font-size: 0.8125rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .map-legend {
        background: rgba(255, 255, 255, 0.05);
    }

    .map-legend li {
        color: #ccc;
    }

    .map-fallback a {
        color: #66b3ff;
        background: rgba(102, 179, 255, 0.1);
        border-color: rgba(102, 179, 255, 0.2);
    }

    .map-fallback a:hover,
    .map-fallback a:focus {
        background: rgba(102, 179, 255, 0.15);
        border-color: rgba(102, 179, 255, 0.3);
    }

    .map-note {
        color: #999;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .map-marker {
        transition: none;
    }

    .map-marker:hover,
    .map-marker:focus {
        transform: translate(-50%, -50%);
    }
}