/* KZ Weather Plugin Styles */

.kz-weather-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Weather Map Styles */
.kz-weather-map {
    position: relative;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 2px solid #0ea5e9;
}

.kz-weather-map svg {
    width: 100%;
    height: auto;
    max-height: 500px;
}

.kz-weather-map .region-path {
    cursor: pointer;
    transition: all 0.3s ease;
    stroke: #1f2937;
    stroke-width: 2;
}

.kz-weather-map .region-path:hover {
    filter: brightness(1.1);
    stroke-width: 3;
}

.kz-weather-tooltip {
    position: absolute;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    z-index: 20;
    min-width: 280px;
    pointer-events: none;
}

/* Cities Grid */
.kz-weather-cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.kz-weather-city-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e5e7eb;
}

.kz-weather-city-card:hover {
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.kz-weather-city-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.kz-weather-city-region {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.kz-weather-temp {
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.kz-weather-temp.hot { color: #dc2626; }
.kz-weather-temp.warm { color: #d97706; }
.kz-weather-temp.mild { color: #059669; }
.kz-weather-temp.cool { color: #2563eb; }

/* Hero Section */
.kz-weather-hero {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    padding: 3rem 0;
    border-radius: 1rem;
    margin: 2rem 0;
}

.kz-weather-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.kz-weather-current-temp {
    font-size: 4rem;
    font-weight: 700;
    margin: 1rem 0;
}

.kz-weather-condition {
    font-size: 1.25rem;
    color: #bfdbfe;
    margin-bottom: 0.5rem;
}

.kz-weather-feels-like {
    font-size: 0.875rem;
    color: #93c5fd;
}

.kz-weather-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.kz-weather-stat {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.kz-weather-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.kz-weather-stat-label {
    font-size: 0.875rem;
    color: #bfdbfe;
}

/* Forecast Table */
.kz-weather-forecast-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.kz-weather-forecast-table th {
    background: #f9fafb;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

.kz-weather-forecast-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.kz-weather-forecast-table tr:hover {
    background: #f9fafb;
}

.kz-weather-forecast-date {
    font-weight: 600;
    color: #111827;
}

.kz-weather-forecast-day {
    font-size: 0.875rem;
    color: #6b7280;
}

.kz-weather-forecast-temp {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
}

.kz-weather-forecast-temp.high { color: #dc2626; }
.kz-weather-forecast-temp.low { color: #2563eb; }

/* Weather Icons */
.kz-weather-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-block;
}

.kz-weather-icon.large {
    width: 4rem;
    height: 4rem;
}

/* News Section */
.kz-weather-news {
    margin: 3rem 0;
}

.kz-weather-news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.kz-weather-news-article {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.kz-weather-news-article:hover {
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.kz-weather-news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.kz-weather-news-content {
    padding: 1.5rem;
}

.kz-weather-news-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.kz-weather-news-category.extreme {
    background: #fef2f2;
    color: #dc2626;
}

.kz-weather-news-category.forecast {
    background: #eff6ff;
    color: #2563eb;
}

.kz-weather-news-category.agriculture {
    background: #fefce8;
    color: #ca8a04;
}

.kz-weather-news-category.technology {
    background: #f0fdf4;
    color: #16a34a;
}

.kz-weather-news-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.kz-weather-news-excerpt {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.kz-weather-news-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.kz-weather-news-link {
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.kz-weather-news-link:hover {
    color: #1d4ed8;
}

/* Sidebar */
.kz-weather-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.kz-weather-sidebar-widget {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.kz-weather-sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kz-weather-alert {
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid;
    margin-bottom: 1rem;
}

.kz-weather-alert.warning {
    background: #fef3c7;
    border-color: #f59e0b;
}

.kz-weather-alert.watch {
    background: #fef2f2;
    border-color: #ef4444;
}

.kz-weather-alert-title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.kz-weather-alert-region {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.kz-weather-alert-description {
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.kz-weather-alert-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Temperature Legend */
.kz-weather-legend {
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #bae6fd;
    margin: 2rem 0;
}

.kz-weather-legend-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    text-align: center;
    margin-bottom: 1rem;
}

.kz-weather-legend-items {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.kz-weather-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kz-weather-legend-color {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.kz-weather-legend-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

/* Widget Styles */
.kz-weather-widget {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.kz-weather-widget-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.kz-weather-widget-temp {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
}

.kz-weather-widget-condition {
    font-size: 0.875rem;
    color: #6b7280;
}

.kz-weather-widget-forecast {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

.kz-weather-widget-forecast-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.kz-weather-widget-forecast-item:last-child {
    border-bottom: none;
}

.kz-weather-widget-day {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.kz-weather-widget-forecast-temp {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .kz-weather-cities-grid {
        grid-template-columns: 1fr;
    }
    
    .kz-weather-news-grid {
        grid-template-columns: 1fr;
    }
    
    .kz-weather-current-temp {
        font-size: 3rem;
    }
    
    .kz-weather-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .kz-weather-legend-items {
        flex-direction: column;
        align-items: center;
    }
    
    .kz-weather-forecast-table {
        font-size: 0.875rem;
    }
    
    .kz-weather-forecast-table th,
    .kz-weather-forecast-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .kz-weather-hero {
        padding: 2rem 0;
    }
    
    .kz-weather-current-temp {
        font-size: 2.5rem;
    }
    
    .kz-weather-stats {
        grid-template-columns: 1fr;
    }
    
    .kz-weather-tooltip {
        min-width: 240px;
        padding: 1rem;
    }
}

/* Animation Classes */
.kz-weather-fade-in {
    animation: kzWeatherFadeIn 0.5s ease-in-out;
}

@keyframes kzWeatherFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kz-weather-pulse {
    animation: kzWeatherPulse 2s infinite;
}

@keyframes kzWeatherPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Loading States */
.kz-weather-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6b7280;
}

.kz-weather-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: kzWeatherSpin 1s linear infinite;
    margin-right: 0.5rem;
}

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

/* Error States */
.kz-weather-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    padding: 1rem;
    color: #dc2626;
    text-align: center;
    margin: 1rem 0;
}

/* Print Styles */
@media print {
    .kz-weather-map,
    .kz-weather-news-image {
        display: none;
    }
    
    .kz-weather-forecast-table {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .kz-weather-hero {
        background: #f3f4f6 !important;
        color: #000 !important;
    }
}