/**
 * Wunderkammer Weather Plugin - MSC CMC CSS - msc-cmc.css
 * Copyright (c) 2025 Giuseppe Fraccalvieri. All rights reserved.
 * Licensed under proprietary license - See LICENSE.txt
 * Unauthorized use is strictly prohibited.
 */
/**
 * MSC CMC Weather Provider Styles
 * Environment and Climate Change Canada
 */

/* Provider buttons inherit standard styles from weather-core.css */
/* No custom button styling needed - uses standard .ww-provider-button */

/* Weather Display Container */
.ww-msc-cmc-current,
.ww-msc-cmc-forecast {
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

/* Header */
.ww-msc-cmc-current .ww-header,
.ww-msc-cmc-forecast .ww-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e31e24;
}

.ww-msc-cmc-current .ww-location,
.ww-msc-cmc-forecast .ww-location {
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}

.ww-msc-cmc-current .ww-provider,
.ww-msc-cmc-forecast .ww-provider {
    font-size: 0.9em;
    color: #666;
}

/* Current Conditions */
.ww-current-conditions {
    margin: 20px 0;
}

.ww-main-condition {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.ww-weather-icon {
    width: 80px;
    height: 80px;
}

.ww-temperature {
    font-size: 3em;
    font-weight: 300;
    color: #333;
}

.ww-condition-text {
    font-size: 1.2em;
    color: #666;
    text-align: center;
}

/* Details Grid */
.ww-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.ww-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.ww-detail-label {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.ww-detail-value {
    font-size: 1em;
    color: #333;
    font-weight: 600;
}

/* Observation Time */
.ww-observation-time {
    font-size: 0.85em;
    color: #999;
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* Station Info */
.ww-station-info {
    font-size: 0.85em;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

/* Forecast Display */
.ww-forecast-daily {
    margin: 20px 0;
}

.ww-forecast-daily h4 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 15px;
}

.ww-forecast-day {
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.2s ease;
    overflow: hidden;
}

.ww-forecast-day:hover {
    background: #e9ecef;
}

.ww-forecast-main {
    display: grid;
    grid-template-columns: 80px 50px 1fr 100px 60px;
    align-items: center;
    gap: 15px;
    padding: 12px;
}

.ww-day-name {
    font-weight: 600;
    color: #333;
}

.ww-day-icon {
    width: 40px;
    height: 40px;
}

.ww-day-temps {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.ww-temp-max {
    color: #e74c3c;
}

.ww-temp-separator {
    color: #ccc;
}

.ww-temp-min {
    color: #3498db;
}

.ww-day-condition {
    color: #666;
    font-size: 0.9em;
}

.ww-day-precip {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    color: #3498db;
    font-size: 0.9em;
}

.ww-day-summary {
    padding: 8px 12px 12px 12px;
    background: rgba(0,0,0,0.03);
    font-size: 0.85em;
    color: #666;
    line-height: 1.3;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Warnings Section */
.ww-warnings-section {
    margin: 20px 0;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.ww-warnings-title {
    margin: 0 0 15px 0;
    color: #856404;
    font-size: 1.1em;
    font-weight: 600;
}

.ww-warning {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid;
}

.ww-warning:last-child {
    margin-bottom: 0;
}

.ww-warning-high {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.ww-warning-medium {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.ww-warning-low {
    background: #d1ecf1;
    border-left-color: #17a2b8;
}

.ww-warning-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ww-warning-type {
    font-weight: 600;
    color: #333;
}

.ww-warning-priority {
    font-size: 0.85em;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(0,0,0,0.1);
    color: #666;
}

.ww-warning-description {
    font-size: 0.95em;
    line-height: 1.4;
    color: #333;
    margin-bottom: 8px;
}

.ww-warning-expiry {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

.ww-warning-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.ww-warning-link:hover {
    text-decoration: underline;
}

/* Current Conditions Section */
.ww-current-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.ww-current-title {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

.ww-station-info {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.ww-current-main {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ww-current-primary {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.ww-current-temp {
    font-size: 2.5em;
    font-weight: 300;
    color: #333;
}

.ww-current-condition {
    font-size: 1.1em;
    color: #666;
    font-weight: 500;
}

.ww-current-icon {
    width: 60px;
    height: 60px;
}

.ww-current-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.ww-current-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.ww-current-label {
    font-weight: 500;
    color: #666;
}

.ww-current-value {
    font-weight: 600;
    color: #333;
}

/* Enhanced Forecast Section */
.ww-forecast-section {
    margin: 20px 0;
}

.ww-forecast-title {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

.ww-forecast-days {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.ww-forecast-day {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.ww-day-header {
    margin-bottom: 10px;
}

.ww-day-name {
    font-weight: 600;
    color: #333;
    font-size: 1em;
}

.ww-period-name {
    font-size: 0.85em;
    color: #666;
    margin-top: 2px;
}

.ww-day-icon {
    width: 50px;
    height: 50px;
    margin: 10px 0;
}

.ww-day-temps {
    margin: 10px 0;
    font-size: 1.1em;
}

.ww-temp-max {
    font-weight: 600;
    color: #d63031;
}

.ww-temp-min {
    font-weight: 600;
    color: #0984e3;
}

.ww-temp-separator {
    margin: 0 5px;
    color: #666;
}

.ww-temp-single {
    font-weight: 600;
}

.ww-temp-single.ww-temp-max {
    color: #d63031;
}

.ww-temp-single.ww-temp-min {
    color: #0984e3;
}

.ww-day-condition {
    font-size: 0.9em;
    color: #666;
    margin: 8px 0;
    font-weight: 500;
}

.ww-day-summary {
    font-size: 0.85em;
    color: #666;
    line-height: 1.3;
    margin: 10px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: left;
}

.ww-day-precip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 0.9em;
    color: #0984e3;
}

.ww-precip-icon {
    font-size: 1.2em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ww-current-primary {
        justify-content: center;
        text-align: center;
    }
    
    .ww-current-details {
        grid-template-columns: 1fr;
    }
    
    .ww-forecast-days {
        grid-template-columns: 1fr;
    }
    
    .ww-warning-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Attribution */
.ww-attribution {
    font-size: 0.85em;
    color: #666;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.ww-attribution a {
    color: #e31e24;
    text-decoration: none;
    font-weight: 500;
}

.ww-attribution a:hover {
    text-decoration: underline;
}

/* Loading State */
.ww-loading {
    text-align: center;
    padding: 40px;
}

.ww-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e31e24;
    border-radius: 50%;
    animation: msc-cmc-spin 1s linear infinite;
}

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

/* Error State */
.ww-error {
    padding: 30px;
    text-align: center;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c00;
}

.ww-error-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.ww-error-message {
    font-size: 1em;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ww-details-grid {
        grid-template-columns: 1fr;
    }
    
    .ww-forecast-day {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 8px;
    }
    
    .ww-main-condition {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .ww-temperature {
        font-size: 2.5em;
    }
    
    .ww-weather-icon {
        width: 60px;
        height: 60px;
    }
    
    .ww-forecast-day {
        padding: 10px;
        font-size: 0.9em;
    }
}

/* Nearby stations styles */
.ww-nearby-stations {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.ww-nearby-stations h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.ww-nearby-stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.ww-nearby-station {
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

.ww-nearby-station:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ww-nearby-station .ww-station-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.ww-nearby-station .ww-station-name {
    font-weight: 600;
    color: #0066cc;
    font-size: 14px;
    margin-right: 8px;
}

.ww-nearby-station .ww-station-distance {
    color: #888;
    font-size: 12px;
}

.ww-nearby-station .ww-station-time {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}

.ww-nearby-station .ww-station-data {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ww-nearby-station .ww-station-item {
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.ww-nearby-station .ww-station-label {
    color: #666;
    font-weight: 500;
    margin-right: 8px;
}

.ww-nearby-station .ww-station-item > span:last-child {
    color: #333;
    font-weight: 600;
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .ww-nearby-stations-grid {
        grid-template-columns: 1fr;
    }
    
    .ww-nearby-station .ww-station-header {
        flex-direction: column;
        gap: 4px;
    }
}