/* Weather Mood Animations */

/* Container for weather visualizer */
.weather-visualizer {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 200px;
    margin: 20px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    transition: all 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Mini weather visualizer for dashboard */
.weather-visualizer-mini {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 80px;
    margin: 8px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.weather-visualizer-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.25);
}

.weather-visualizer-mini .weather-info {
    padding: 8px;
    font-size: 0.85rem;
}

.weather-visualizer-mini .weather-icon {
    font-size: 1.8rem;
    margin-right: 8px;
}

/* Weather icons and animations */
.weather-icon {
    font-size: 2.5rem;
    margin-right: 12px;
    display: inline-block;
}

/* Animation for sunny weather */
.weather-sunny .weather-icon {
    color: #FFD700;
    animation: pulse 2s infinite;
}

/* Animation for cloudy weather */
.weather-cloudy .weather-icon {
    color: #A9A9A9;
    animation: float 3s infinite;
}

/* Animation for rainy weather */
.weather-rainy .weather-icon,
.weather-drizzle .weather-icon {
    color: #4682B4;
    animation: bounce 2s infinite;
}

/* Animation for snowy weather */
.weather-snowy .weather-icon {
    color: #E0FFFF;
    animation: spin 4s linear infinite;
}

/* Animation for stormy weather */
.weather-stormy .weather-icon {
    color: #483D8B;
    animation: shake 1s infinite;
}

/* Animation for foggy/misty/hazy weather */
.weather-foggy .weather-icon,
.weather-misty .weather-icon,
.weather-hazy .weather-icon {
    color: #DCDCDC;
    animation: pulse 3s infinite;
}

/* Default pleasant weather */
.weather-pleasant .weather-icon {
    color: #7B68EE;
    animation: float 2s infinite;
}

/* Temperature color classes */
.temp-hot {
    color: #FF4500;
}

.temp-warm {
    color: #FF8C00;
}

.temp-mild {
    color: #32CD32;
}

.temp-cool {
    color: #1E90FF;
}

.temp-cold {
    color: #87CEEB;
}

.temp-freezing {
    color: #E0FFFF;
}

/* Animation keyframes */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

.weather-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.weather-icon {
    font-size: 3rem;
    margin-right: 15px;
}

/* Sunny Animation */
.weather-sunny {
    background: linear-gradient(135deg, #87CEEB, #1E90FF);
}

.weather-sunny::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 40px 20px rgba(255, 215, 0, 0.8);
    animation: sun-pulse 3s infinite;
}

@keyframes sun-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 60px 30px rgba(255, 215, 0, 0.9); }
    100% { transform: scale(1); }
}

/* Cloudy Animation */
.weather-cloudy {
    background: linear-gradient(135deg, #E6E6FA, #778899);
}

/* Disable cloud animations in forecast display to prevent layout issues */
.weather-visualizer .weather-cloudy::before, 
.weather-visualizer .weather-cloudy::after {
    content: '';
    position: absolute;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.8);
    animation: float-clouds 30s infinite linear;
}

.weather-visualizer .weather-cloudy::before {
    width: 100px;
    height: 50px;
    top: 30px;
    left: 10%;
    animation-delay: 0s;
}

.weather-visualizer .weather-cloudy::after {
    width: 140px;
    height: 60px;
    top: 60px;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float-clouds {
    0% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* Rainy Animation */
.weather-rainy {
    background: linear-gradient(135deg, #708090, #4682B4);
}

.weather-rainy::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 10px,
        rgba(255, 255, 255, 0.3) 10px,
        rgba(255, 255, 255, 0.3) 12px
    );
    animation: rain 0.5s infinite linear;
    transform: translateZ(0);
}

@keyframes rain {
    0% { background-position: 0 0; }
    100% { background-position: 0 50px; }
}

/* Snowy Animation */
.weather-snowy {
    background: linear-gradient(135deg, #F0F8FF, #B0E0E6);
}

.weather-snowy::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle, white 25%, transparent 25%),
        radial-gradient(circle, white 25%, transparent 25%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    animation: snow-fall 20s infinite linear;
}

@keyframes snow-fall {
    0% { background-position: 0 0, 10px 10px; }
    100% { background-position: 0 200px, 10px 210px; }
}

/* Stormy Animation */
.weather-stormy {
    background: linear-gradient(135deg, #2F4F4F, #191970);
}

.weather-stormy::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0);
    animation: lightning 10s infinite;
}

@keyframes lightning {
    0%, 20%, 40%, 60%, 80%, 100% { 
        background: rgba(255, 255, 255, 0);
    }
    5%, 25%, 45% { 
        background: rgba(255, 255, 255, 0.1);
    }
    10% { 
        background: rgba(255, 255, 255, 0.7);
    }
    15% { 
        background: rgba(255, 255, 255, 0.1);
    }
    30% { 
        background: rgba(255, 255, 255, 0.7);
    }
}

/* Foggy/Misty Animation */
.weather-foggy, .weather-misty {
    background: linear-gradient(135deg, #DCDCDC, #A9A9A9);
}

.weather-foggy::before, .weather-misty::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
    animation: fog-move 20s infinite alternate;
}

@keyframes fog-move {
    0% { opacity: 0.4; transform: translateY(0); }
    100% { opacity: 0.8; transform: translateY(-30px); }
}

/* Hazy Animation */
.weather-hazy {
    background: linear-gradient(135deg, #F0E68C, #BDB76B);
}

.weather-hazy::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(244, 197, 48, 0.2);
    animation: haze-pulse 5s infinite alternate;
}

@keyframes haze-pulse {
    0% { opacity: 0.2; }
    100% { opacity: 0.5; }
}

/* Drizzle Animation */
.weather-drizzle {
    background: linear-gradient(135deg, #B0C4DE, #4682B4);
}

.weather-drizzle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 15px,
        rgba(255, 255, 255, 0.2) 15px,
        rgba(255, 255, 255, 0.2) 16px
    );
    animation: drizzle 0.7s infinite linear;
}

@keyframes drizzle {
    0% { background-position: 0 0; }
    100% { background-position: 0 50px; }
}

/* Default Animation */
.weather-default {
    background: linear-gradient(135deg, #7B68EE, #9370DB);
}

.weather-default::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    box-shadow: 50px 20px 0 10px rgba(255, 255, 255, 0.6);
    animation: default-animation 10s infinite alternate;
}

@keyframes default-animation {
    0% { transform: translateX(0); }
    100% { transform: translateX(50px); }
}

/* Weather Temperature Colors */
.temp-hot {
    color: #FF6347; /* Tomato */
}

.temp-warm {
    color: #FFA500; /* Orange */
}

.temp-mild {
    color: #FFD700; /* Gold */
}

.temp-cool {
    color: #87CEEB; /* Sky Blue */
}

.temp-cold {
    color: #B0E0E6; /* Powder Blue */
}

.temp-freezing {
    color: #F0F8FF; /* Alice Blue */
}

/* Forecast Container Styles */
.forecast-container {
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
}

.forecast-days {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
}

/* Disable all pseudo-element animations in forecast cards to prevent layout issues */
.forecast-day::before,
.forecast-day::after {
    display: none !important;
    content: none !important;
    animation: none !important;
}

.forecast-day {
    flex: 1;
    min-width: 90px;
    max-width: 130px;
    border-radius: 8px;
    overflow: hidden;
    padding: 10px 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    color: white;
    transition: all 0.3s ease;
    margin: 0 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.45) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.forecast-day:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.forecast-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    background-color: rgba(0, 0, 0, 0.2);
    padding: 3px 5px;
    border-radius: 4px;
}

.forecast-day-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.forecast-day .weather-icon {
    font-size: 2rem;
    margin: 5px 0;
}

/* Time period styling for forecast days */
.time-period {
    text-align: center;
    margin: 4px 0;
    background-color: rgba(0, 0, 0, 0.35);
    border-radius: 6px;
    padding: 5px;
    width: 92%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.time-period:hover {
    background-color: rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 255, 255, 0.3);
}

.time-period-empty {
    height: 8px;
    margin: 3px 0;
}

.time-label {
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 3px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7);
    background-color: rgba(0, 0, 0, 0.25);
    padding: 1px 4px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.forecast-temp-small {
    font-size: 11px;
    margin-top: 3px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7);
    padding: 1px 3px;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.weather-icon-small {
    font-size: 14px;
    margin: 3px 0;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.7));
}

.forecast-temp {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 5px 0;
    display: flex;
    flex-direction: column;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.forecast-desc {
    font-size: 0.85rem;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Time period styles for detailed forecast */
.time-period {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 4px 0;
    padding: 3px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.time-period-empty {
    height: 12px;
}

.time-label {
    font-size: 0.7rem;
    font-weight: bold;
    margin-bottom: 2px;
}

.weather-icon-small {
    font-size: 0.9rem;
    margin: 2px 0;
}

.forecast-temp-small {
    font-size: 0.8rem;
    font-weight: bold;
}