/* Map Enhancements - Additional Styles */

/* User pin styling */
.user-pin {
    background: transparent !important;
    border: none !important;
}

.user-pin .bg-red-500 {
    animation: pinPulse 2s infinite;
}

@keyframes pinPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Pin popup styling */
.pin-popup {
    min-width: 200px;
}

.pin-popup button {
    transition: all 0.2s ease;
}

.pin-popup button:hover {
    transform: scale(1.05);
}

/* Ensure map is always interactive */
#map-container {
    touch-action: pan-x pan-y pinch-zoom;
    cursor: grab;
}

#map-container:active {
    cursor: grabbing;
}

/* Map instructions overlay */
.map-instructions {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: white;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1000;
    animation: fadeInOut 5s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

/* Click indicator */
.map-click-indicator {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.6);
    border: 2px solid rgba(239, 68, 68, 1);
    pointer-events: none;
    z-index: 2000;
    animation: clickRipple 0.6s ease-out;
}

@keyframes clickRipple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Weather Stats Popup Styles */
.weather-stats-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    padding: 0;
    overflow: hidden;
}

.weather-stats-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
    min-width: 300px;
    max-width: 350px;
}

.weather-stats-popup-content {
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.weather-stats-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.weather-stats-header h3 {
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.weather-stats-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    margin: 0;
}

.weather-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.weather-stat-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
}

.weather-stat-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.weather-stat-item .stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.weather-stat-item .stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.weather-stat-item .stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weather-stats-loading {
    text-align: center;
    padding: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.weather-stats-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.weather-stats-actions button {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
}

.weather-stats-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.weather-stats-actions button:active {
    transform: translateY(0);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .weather-stats-popup .leaflet-popup-content {
        min-width: 280px;
        max-width: 320px;
    }
    
    .weather-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .weather-stat-item {
        padding: 0.5rem;
    }
    
    .weather-stat-item .stat-icon {
        font-size: 1.25rem;
    }
    
    .weather-stat-item .stat-value {
        font-size: 1rem;
    }
    
    .weather-stat-item .stat-label {
        font-size: 0.7rem;
    }
}

