/**
 * Weather Widget Styles
 * Стили для погодного виджета - упрощенная версия для аквапарка
 */

.weather-widget {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    padding: 15px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
    min-height: 80px;
    max-width: 300px;
}

/* Состояние ожидания загрузки */
.weather-widget-pending {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 50px;
    padding: 15px 20px;
    text-align: center;
    min-height: 80px;
    max-width: 300px;
    gap: 12px;
}

.weather-pending-icon {
    font-size: 32px;
    animation: pulse 2s infinite;
}

.weather-pending-text {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Уведомление об устаревших данных */
.weather-expired-notice {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ffc107;
    color: #856404;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    font-weight: 500;
    z-index: 1;
}

.weather-expired {
    opacity: 0.8;
    border: 1px solid #ffc107;
}

/* Горизонтальный макет */
.weather-layout-horizontal {
    flex-direction: row;
    gap: 20px;
}

.weather-layout-horizontal .weather-main-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

/* Вертикальный макет */
.weather-layout-vertical {
    flex-direction: column;
    text-align: center;
    gap: 15px;
}

.weather-layout-vertical .weather-main-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Иконка погоды - улучшенная и цветная */
.weather-icon {
    flex-shrink: 0;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.weather-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: contrast(1.3) saturate(1.6) brightness(1.2);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.weather-icon:hover img {
    transform: scale(1.1);
    filter: contrast(1.4) saturate(1.8) brightness(1.3);
}

/* Добавляем цветные фоны для разных типов погоды */
.weather-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75px;
    height: 75px;
    border-radius: 50%;
    opacity: 0.2;
    z-index: -1;
    transition: opacity 0.3s ease;
}

/* Солнечная погода */
.weather-icon img[src*="01d"], 
.weather-icon img[src*="01n"] {
    filter: contrast(1.4) saturate(1.8) brightness(1.4) hue-rotate(15deg);
}

.weather-icon:has(img[src*="01d"])::before,
.weather-icon:has(img[src*="01n"])::before {
    background: radial-gradient(circle, #FFD700, #FF8C00);
    opacity: 0.25;
}

/* Частично облачно */
.weather-icon img[src*="02d"], 
.weather-icon img[src*="02n"],
.weather-icon img[src*="03d"], 
.weather-icon img[src*="03n"] {
    filter: contrast(1.3) saturate(1.5) brightness(1.3);
}

.weather-icon:has(img[src*="02"])::before,
.weather-icon:has(img[src*="03"])::before {
    background: radial-gradient(circle, #87CEEB, #4682B4);
    opacity: 0.2;
}

/* Облачно */
.weather-icon img[src*="04d"], 
.weather-icon img[src*="04n"] {
    filter: contrast(1.2) saturate(1.3) brightness(1.2);
}

.weather-icon:has(img[src*="04"])::before {
    background: radial-gradient(circle, #B0C4DE, #778899);
    opacity: 0.18;
}

/* Дождь */
.weather-icon img[src*="09d"], 
.weather-icon img[src*="09n"],
.weather-icon img[src*="10d"], 
.weather-icon img[src*="10n"] {
    filter: contrast(1.3) saturate(1.6) brightness(1.2) hue-rotate(-15deg);
}

.weather-icon:has(img[src*="09"])::before,
.weather-icon:has(img[src*="10"])::before {
    background: radial-gradient(circle, #4169E1, #1E90FF);
    opacity: 0.22;
}

/* Гроза */
.weather-icon img[src*="11d"], 
.weather-icon img[src*="11n"] {
    filter: contrast(1.4) saturate(1.7) brightness(1.1);
}

.weather-icon:has(img[src*="11"])::before {
    background: radial-gradient(circle, #483D8B, #6A5ACD);
    opacity: 0.22;
}

/* Снег */
.weather-icon img[src*="13d"], 
.weather-icon img[src*="13n"] {
    filter: contrast(1.3) saturate(1.1) brightness(1.4);
}

.weather-icon:has(img[src*="13"])::before {
    background: radial-gradient(circle, #F0F8FF, #E6E6FA);
    opacity: 0.25;
}

/* Туман */
.weather-icon img[src*="50d"], 
.weather-icon img[src*="50n"] {
    filter: contrast(1.1) saturate(1.2) brightness(1.2);
}

.weather-icon:has(img[src*="50"])::before {
    background: radial-gradient(circle, #D3D3D3, #A9A9A9);
    opacity: 0.2;
}

/* Информация о температуре */
.weather-temp-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.weather-temperature {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    color: inherit;
}

.weather-description {
    font-size: 14px;
    color: inherit;
    text-transform: capitalize;
    font-weight: 500;
    opacity: 0.8;
}

.weather-city {
    font-size: 16px;
    color: inherit;
    font-weight: 600;
    opacity: 0.9;
}

/* Ошибки */
.weather-widget-error {
    background: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* Адаптивность */
@media (max-width: 768px) {
    .weather-layout-horizontal {
        flex-direction: column;
        gap: 10px;
    }
    
    .weather-layout-horizontal .weather-main-info {
        justify-content: center;
    }
    
    .weather-widget {
        padding: 12px 16px;
        min-height: 70px;
        max-width: 280px;
    }
    
    .weather-temperature {
        font-size: 28px;
    }
    
    .weather-icon img {
        width: 50px;
        height: 50px;
    }

    .weather-widget-pending {
        flex-direction: column;
        gap: 8px;
        padding: 15px;
    }

    .weather-pending-icon {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .weather-widget {
        padding: 10px 14px;
        min-height: 60px;
        max-width: 250px;
    }
    
    .weather-temperature {
        font-size: 24px;
    }
    
    .weather-icon img {
        width: 42px;
        height: 42px;
    }

    .weather-widget-pending {
        padding: 12px;
        min-height: 60px;
    }

    .weather-pending-icon {
        font-size: 20px;
    }

    .weather-pending-text {
        font-size: 12px;
    }
}

/* Анимации */
.weather-widget {
    transition: all 0.3s ease;
}

.weather-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Темные цветовые схемы */
.weather-widget.dark-theme {
    background: #2c3e50;
    color: #ecf0f1;
}

.weather-widget.dark-theme .weather-temperature {
    color: #ecf0f1;
}

.weather-widget.dark-theme .weather-city {
    color: #bdc3c7;
}

.weather-widget.dark-theme .weather-description {
    color: #95a5a6;
}

/* Темная тема для состояния ожидания */
.weather-widget-pending.dark-theme {
    background: #34495e;
    border-color: #5a6c7d;
}

.dark-theme .weather-pending-text {
    color: #bdc3c7;
}

/* Темная тема для устаревших данных */
.dark-theme .weather-expired-notice {
    background: #f39c12;
    color: #8e4e00;
}

.weather-expired.dark-theme {
    border-color: #f39c12;
}

/* Солнечная погода - альтернативные селекторы */
.weather-icon[data-weather*="01"] img {
    filter: contrast(1.4) saturate(1.8) brightness(1.4) hue-rotate(15deg) !important;
}

.weather-icon[data-weather*="01"]::before {
    background: radial-gradient(circle, #FFD700, #FF8C00) !important;
    opacity: 0.25 !important;
}

/* Частично облачно - альтернативные селекторы */
.weather-icon[data-weather*="02"] img,
.weather-icon[data-weather*="03"] img {
    filter: contrast(1.3) saturate(1.5) brightness(1.3) !important;
}

.weather-icon[data-weather*="02"]::before,
.weather-icon[data-weather*="03"]::before {
    background: radial-gradient(circle, #87CEEB, #4682B4) !important;
    opacity: 0.2 !important;
}

/* Облачно - альтернативные селекторы */
.weather-icon[data-weather*="04"] img {
    filter: contrast(1.2) saturate(1.3) brightness(1.2) !important;
}

.weather-icon[data-weather*="04"]::before {
    background: radial-gradient(circle, #B0C4DE, #778899) !important;
    opacity: 0.18 !important;
}

/* Дождь - альтернативные селекторы */
.weather-icon[data-weather*="09"] img,
.weather-icon[data-weather*="10"] img {
    filter: contrast(1.3) saturate(1.6) brightness(1.2) hue-rotate(-15deg) !important;
}

.weather-icon[data-weather*="09"]::before,
.weather-icon[data-weather*="10"]::before {
    background: radial-gradient(circle, #4169E1, #1E90FF) !important;
    opacity: 0.22 !important;
}

/* Гроза - альтернативные селекторы */
.weather-icon[data-weather*="11"] img {
    filter: contrast(1.4) saturate(1.7) brightness(1.1) !important;
}

.weather-icon[data-weather*="11"]::before {
    background: radial-gradient(circle, #483D8B, #6A5ACD) !important;
    opacity: 0.22 !important;
}

/* Снег - альтернативные селекторы */
.weather-icon[data-weather*="13"] img {
    filter: contrast(1.3) saturate(1.1) brightness(1.4) !important;
}

.weather-icon[data-weather*="13"]::before {
    background: radial-gradient(circle, #F0F8FF, #E6E6FA) !important;
    opacity: 0.25 !important;
}

/* Туман - альтернативные селекторы */
.weather-icon[data-weather*="50"] img {
    filter: contrast(1.1) saturate(1.2) brightness(1.2) !important;
}

.weather-icon[data-weather*="50"]::before {
    background: radial-gradient(circle, #D3D3D3, #A9A9A9) !important;
    opacity: 0.2 !important;
} 