/* Custom styles for Kamchatka Earthquake Map */

/* Fix for map controls - ensure they appear above the map */
.leaflet-container {
    z-index: 1;
}

/* Map control buttons styling and positioning */
.absolute.top-4.right-4 {
    z-index: 1000 !important;
    position: fixed !important;
    top: 80px !important; /* Move below header */
    right: 20px !important;
}

/* Button styling improvements */
#toggleLayer,
#fullscreen {
    z-index: 1001 !important;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#toggleLayer:hover,
#fullscreen:hover {
    background: #374151 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Loading screen styling */
#loading {
    z-index: 2000;
    backdrop-filter: blur(5px);
}

/* Sidebar scrollbar styling for dark theme */
aside::-webkit-scrollbar {
    width: 6px;
}

aside::-webkit-scrollbar-track {
    background: #1f2937;
}

aside::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

aside::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Map marker animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.epicenter-marker {
    z-index: 1000;
}

/* Leaflet popup styling for dark theme */
.leaflet-popup-content-wrapper {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.leaflet-popup-tip {
    background: #ffffff;
}

/* Custom control positioning */
.leaflet-control-zoom {
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.leaflet-control-scale {
    background: rgba(31, 41, 55, 0.9);
    color: white;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Fix sidebar scrolling */
aside {
    height: calc(100vh - 0px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    aside {
        width: 100%;
        height: 300px;
        position: absolute;
        bottom: 0;
        transform: translateY(calc(100% - 60px));
        transition: transform 0.3s ease;
    }
    
    aside:hover {
        transform: translateY(0);
    }
    
    .absolute.top-4.right-4 {
        top: 10px !important;
        right: 10px !important;
    }
    
    #toggleLayer,
    #fullscreen {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Additional map styling */
.leaflet-container {
    background: #0f172a;
}

/* Ensure all interactive elements are clickable */
button {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Status indicators */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Loading spinner enhancement */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}