/* Enhanced Weather Forecast Cards - PascoWeather.com */

/* Main forecast card container */
.forecast-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
}

/* Hover effects for forecast cards */
.forecast-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

[data-theme="dark"] .forecast-card:hover {
    box-shadow: 0 10px 25px rgba(255,255,255,0.1);
}

/* Temperature display improvements */
.forecast-card .temperature-display {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
}

.forecast-card .temperature-high {
    color: var(--danger-color);
}

.forecast-card .temperature-low {
    color: var(--info-color);
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Visual temperature trend bar */
.temperature-trend {
    height: 4px;
    background: linear-gradient(90deg, var(--info-color) 0%, var(--warning-color) 50%, var(--danger-color) 100%);
    border-radius: 2px;
    margin: 0.5rem 0;
    position: relative;
    overflow: hidden;
}

.temperature-trend::after {
    content: '';
    position: absolute;
    top: 0;
    left: var(--trend-position, 50%);
    width: 8px;
    height: 4px;
    background: var(--text-color);
    border-radius: 2px;
    transform: translateX(-50%);
}

/* Weather icon enhancements */
.forecast-card .weather-icon {
    width: 64px;
    height: 64px;
    margin: 0.5rem 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform 0.2s ease;
}

.forecast-card:hover .weather-icon {
    transform: scale(1.1);
}

/* Day and date styling */
.forecast-card .day-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.forecast-card .day-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Weather description */
.forecast-card .weather-description {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    min-height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Precipitation indicator */
.precipitation-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(23, 162, 184, 0.1);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--info-color);
}

.precipitation-indicator.no-rain {
    background: rgba(40, 167, 69, 0.1);
    color: var(--secondary-color);
}

.precipitation-indicator.high-rain {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

/* Click hint */
.forecast-card .click-hint {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s ease;
    background: var(--card-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.forecast-card:hover .click-hint {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .forecast-card .weather-icon {
        width: 48px;
        height: 48px;
    }
    
    .forecast-card .temperature-display {
        font-size: 1.2rem;
    }
    
    .forecast-card .day-name {
        font-size: 1rem;
    }
    
    .forecast-card .weather-description {
        font-size: 0.85rem;
        min-height: 2.2rem;
    }
}

/* Current weather card enhancements */
.current-weather-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-secondary) 100%);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.current-weather-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Current weather icon */
.current-weather-card .weather-icon {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* Current temperature display */
.current-weather-card .current-temp {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Weather details grid */
.weather-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.weather-detail-item {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.weather-detail-item:hover {
    background: var(--border-color);
}

.weather-detail-item i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.weather-detail-item .detail-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.weather-detail-item .detail-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Loading state for forecast cards */
.forecast-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.forecast-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Quick Action Cards */
.quick-action-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.quick-action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.quick-action-icon {
    font-size: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

.quick-action-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.quick-action-card .card-text {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.quick-action-card .btn {
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.quick-action-card .btn:hover {
    transform: translateY(-1px);
}

/* Weather stats styling */
.weather-stat {
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.weather-stat:hover {
    background: var(--border-color);
}

/* Traffic Status Cards */
.traffic-status-card {
    transition: all 0.3s ease;
    border-radius: 10px;
}

.traffic-status-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.traffic-status-icon {
    font-size: 2rem;
}

.traffic-status-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.traffic-status-card .badge {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Enhanced Traffic Map */
.enhanced-traffic-map {
    border-radius: 12px;
    overflow: hidden;
}

.traffic-map-container {
    position: relative;
    height: 500px;
}

.traffic-map-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 180px;
}

[data-theme="dark"] .traffic-map-legend {
    background: rgba(52, 58, 64, 0.95);
    color: var(--text-color);
}

.traffic-map-legend h6 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-item span {
    font-size: 0.85rem;
    color: var(--text-color);
}

/* Traffic Incidents and Construction */
.incident-item,
.construction-item {
    margin-bottom: 1rem;
}

.incident-item:last-child,
.construction-item:last-child {
    margin-bottom: 0;
}

.incident-item h6,
.construction-item h6 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.incident-item p,
.construction-item p {
    font-size: 0.9rem;
    color: var(--text-color);
}

.incident-item small,
.construction-item small {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Mobile responsiveness for traffic section */
@media (max-width: 768px) {
    .traffic-map-legend {
        position: static;
        margin-top: 1rem;
        width: 100%;
    }
    
    .traffic-map-container {
        height: 400px;
    }
    
    .traffic-status-card {
        margin-bottom: 1rem;
    }
}

/* Accessibility improvements */
.forecast-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .forecast-card,
    .forecast-card .weather-icon,
    .weather-detail-item {
        transition: none;
    }
    
    .forecast-card:hover {
        transform: none;
    }
    
    .forecast-card:hover .weather-icon {
        transform: none;
    }
}