/**
 * Open Meteo Weather - Minimal Stylesheet
 * 
 * Simple, responsive weather display
 * File size: ~3 KB minified
 */

.open-meteo-weather-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.open-meteo-weather-block-wrapper {
    width: 100%;
}

/* Main Card Container */
.open-meteo-weather-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%);
    color: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.open-meteo-weather-card.open-meteo-weather-card-theme-grayscale {
    background: linear-gradient(135deg, rgba(112, 112, 112, 0.7) 0%, rgba(66, 66, 66, 0.7) 100%);
}

/* Header with Location and Time */
.open-meteo-weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 12px;
}

.open-meteo-weather-location {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.open-meteo-weather-time {
    font-size: 12px;
    opacity: 0.9;
}

/* Main Weather Display */
.open-meteo-weather-main {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 12px;
}

.open-meteo-weather-main-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.open-meteo-weather-icon {
    flex-shrink: 0;
}

.weather-icon-emoji {
    width: 64px;
    height: 64px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.weather-icon-emoji svg {
    width: 64px;
    height: 64px;
    display: block;
}

.open-meteo-weather-info {
    flex: 0 1 auto;
}

.weather-temperature {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 4px;
}

.temp-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.temp-unit {
    font-size: 24px;
    font-weight: 400;
    opacity: 0.9;
}

.weather-condition {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
}

/* Details Row */
.open-meteo-weather-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    padding: 0;
    margin-top: 4px;
    border: 0;
}

.detail-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.detail-label {
    font-size: 16px;
}

.wind-direction-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wind-direction-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: rotate(var(--wind-deg, 0deg));
}

.wind-direction-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
}

.humidity-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
}

.humidity-icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    color: #67e8f9;
}

.humidity-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* Footer with Update Time */
.open-meteo-weather-footer {
    text-align: center;
}

.update-time {
    font-size: 11px;
    opacity: 0.75;
}

.open-meteo-weather-credit {
    display: block;
    font-size: 11px;
    opacity: 0.85;
    text-align: center;
}

.open-meteo-weather-credit a {
    color: inherit;
    text-decoration: underline;
}

.open-meteo-weather-astronomy {
    margin-top: 12px;
    padding-top: 12px;
    padding-bottom: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    gap: 6px;
}

.open-meteo-weather-block-credit {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Line Template */
.open-meteo-weather-line-template {
    max-width: 100%;
    overflow-x: visible;
    display: flex;
    justify-content: center;
}

.open-meteo-weather-line-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: nowrap;
    white-space: nowrap;
    padding: 6px 0;
    color: inherit;
    border-bottom: 1px solid rgba(102, 126, 234, 0.28);
}

.open-meteo-weather-line-condition {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.open-meteo-weather-line-condition-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.open-meteo-weather-line-condition-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.open-meteo-weather-line-condition-text {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.open-meteo-weather-line-row .open-meteo-weather-line-temp {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.open-meteo-weather-line-temp::before,
.open-meteo-weather-line-wind::before {
    content: "|";
    display: inline-block;
    margin-right: 8px;
    opacity: 0.45;
    font-size: 14px;
    line-height: 1;
}

.open-meteo-weather-line-temp-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    margin-right: 2px;
}

.open-meteo-weather-line-temp-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.open-meteo-weather-line-wind {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.92;
}

.open-meteo-weather-line-wind .wind-direction-icon {
    width: 16px;
    height: 16px;
}

.open-meteo-weather-line-wind .wind-direction-icon svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 640px) {
    .open-meteo-weather-line-row {
        display: grid;
        grid-template-columns: auto auto auto;
        grid-template-rows: auto auto;
        justify-content: center;
        align-items: center;
        white-space: normal;
        column-gap: 14px;
        row-gap: 8px;
        border-bottom: 0;
    }

    .open-meteo-weather-line-condition {
        grid-column: 1 / -1;
        justify-self: center;
    }

    .open-meteo-weather-line-temp {
        grid-column: 1;
        grid-row: 2;
        justify-self: end;
    }

    .open-meteo-weather-line-temp::before {
        content: none;
    }

    .open-meteo-weather-line-wind {
        grid-column: 3;
        grid-row: 2;
        justify-self: start;
    }
}

.astronomy-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

.astronomy-label {
    opacity: 0.85;
}

.astronomy-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.astronomy-value .wind-direction-icon {
    width: 16px;
    height: 16px;
}

.astronomy-value .wind-direction-icon svg {
    width: 16px;
    height: 16px;
}

.astronomy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    opacity: 0.9;
}

.astronomy-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Forecast Section */
.open-meteo-weather-forecast {
    background: #f8f9fb;
    border-radius: 12px;
    padding: 16px;
    color: #333;
}

.forecast-title {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #667eea;
}

.forecast-grid {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.forecast-item {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: #fff;
    border-radius: 8px;
    font-size: 12px;
}

.forecast-date {
    font-weight: 600;
    margin-bottom: 8px;
    color: #667eea;
}

.forecast-icon {
    width: 28px;
    height: 28px;
    margin: 8px 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.forecast-icon .weather-icon-emoji {
    width: 28px;
    height: 28px;
}

.forecast-icon .weather-icon-emoji svg {
    width: 28px;
    height: 28px;
}

.forecast-temps {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    margin-top: 8px;
}

.forecast-temps .high {
    font-weight: 600;
    color: #764ba2;
}

.forecast-temps .low {
    opacity: 0.6;
    color: #666;
}

/* Error Message */
.open-meteo-weather-error {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin: 0;
    border-left: 4px solid #c33;
}

/* Responsive Design */
@media (max-width: 480px) {
    .open-meteo-weather-card {
        padding: 16px;
    }

    .open-meteo-weather-main {
        gap: 10px;
    }

    .open-meteo-weather-icon {
        text-align: center;
    }

    .temp-value {
        font-size: 42px;
    }

    .open-meteo-weather-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .open-meteo-weather-details {
        gap: 8px;
    }

    .forecast-grid {
        gap: 4px;
    }

    .forecast-item {
        padding: 8px 4px;
        font-size: 11px;
    }

    .forecast-icon {
        font-size: 24px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .open-meteo-weather-forecast {
        background: #2a2a2a;
        color: #f0f0f0;
    }

    .forecast-item {
        background: #1a1a1a;
        color: #e0e0e0;
    }

    .open-meteo-weather-credit a {
        color: #f0f0f0;
    }
}

/* Accessibility */
.open-meteo-weather-container {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Print Styles */
@media print {
    .open-meteo-weather-card {
        box-shadow: none;
        page-break-inside: avoid;
    }
}
