/* Community Map Styles */

/* Map container */
#communityMap {
    width: 100%;
    height: 100%;
    min-height: 400px;
    position: relative;
    z-index: 1;
}

/* Custom marker styling */
.custom-map-marker {
    background: transparent;
    border: none;
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.leaflet-popup-content {
    margin: 0.5rem;
    min-width: 150px;
}

.leaflet-popup-tip {
    background: white;
}

/* Dark mode support for map controls */
@media (prefers-color-scheme: dark) {
    .leaflet-control-zoom a {
        background-color: #1f2937;
        color: #f3f4f6;
        border-color: #374151;
    }

    .leaflet-control-zoom a:hover {
        background-color: #374151;
    }

    .leaflet-popup-content-wrapper {
        background-color: #1f2937;
        color: #f3f4f6;
    }

    .leaflet-popup-tip {
        background-color: #1f2937;
    }
}

/* Loading state for map */
#communityMap.loading {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #communityMap {
        min-height: 300px;
    }
}

/* Ensure map tiles load properly */
.leaflet-container {
    font-family: inherit;
}

/* Attribution styling */
.leaflet-control-attribution {
    font-size: 0.75rem;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
}

@media (prefers-color-scheme: dark) {
    .leaflet-control-attribution {
        background-color: rgba(31, 41, 55, 0.8);
        color: #f3f4f6;
    }

    .leaflet-control-attribution a {
        color: #60a5fa;
    }
}
