/* Aurora Forecast - Custom Styles */

/* Leaflet Map Customization */
.leaflet-container {
    background: #1f2937;
    font-family: inherit;
}

.leaflet-tile-pane {
    filter: brightness(0.6) saturate(0.8);
}

.leaflet-control-zoom a {
    background-color: #374151 !important;
    color: #d1d5db !important;
    border-color: #4b5563 !important;
}

.leaflet-control-zoom a:hover {
    background-color: #4b5563 !important;
}

.leaflet-control-attribution {
    background-color: rgba(31, 41, 55, 0.8) !important;
    color: #9ca3af !important;
}

.leaflet-control-attribution a {
    color: #00ff88 !important;
}

/* Aurora Oval Layer */
.aurora-overlay {
    mix-blend-mode: screen;
}

/* Location Marker */
.location-marker {
    background: radial-gradient(circle, #00ff88 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Search Results Dropdown */
#search-results .search-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #374151;
    transition: background-color 0.15s;
}

#search-results .search-item:last-child {
    border-bottom: none;
}

#search-results .search-item:hover {
    background-color: #374151;
}

#search-results .search-item .city-name {
    font-weight: 500;
    color: #f3f4f6;
}

#search-results .search-item .country {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Forecast Timeline Item */
.forecast-item {
    min-width: 60px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-radius: 0.5rem;
    background: #374151;
    transition: transform 0.2s, background-color 0.2s;
}

.forecast-item:hover {
    transform: translateY(-2px);
    background: #4b5563;
}

.forecast-item.high {
    background: linear-gradient(to bottom, rgba(0, 255, 136, 0.2), transparent);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.forecast-item.medium {
    background: linear-gradient(to bottom, rgba(234, 179, 8, 0.2), transparent);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.forecast-item.low {
    background: linear-gradient(to bottom, rgba(107, 114, 128, 0.2), transparent);
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.forecast-item .time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.forecast-item .prob {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.forecast-item .bar {
    height: 40px;
    width: 8px;
    margin: 0.5rem auto 0;
    border-radius: 4px;
    background: #4b5563;
    overflow: hidden;
    display: flex;
    flex-direction: column-reverse;
}

.forecast-item .bar-fill {
    transition: height 0.5s ease-out;
}

/* Cloud direction indicators on map */
.cloud-direction-indicator {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    color: #1f2937;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    pointer-events: none;
    z-index: 1000;
}

/* Probability info tooltip */
.prob-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    background: #1f2937;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    padding: 0.75rem;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.prob-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #1f2937;
    border-left: 1px solid #4b5563;
    border-top: 1px solid #4b5563;
    transform: rotate(45deg);
}

/* Probability circle animation */
#probability-circle {
    transition: stroke-dashoffset 1s ease-out;
}

/* Glow effects */
.glow-green {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.glow-purple {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Alert animation */
@keyframes alertPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

#cme-alert {
    animation: alertPulse 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #city-search {
        width: 120px;
    }

    .forecast-item {
        min-width: 50px;
    }
}

/* Loading shimmer effect */
.shimmer {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
