/* Tempest Weather Station Embed - Apple Weather Style */

:root {
    --brand-primary: #000164;
    --brand-secondary: #0001a0;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
}

.tempest-weather-container {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 900px;
    margin: 20px auto;
    padding: 0;
}

/* Compact and minimal modes stay at 450px */
.tempest-weather-container[data-display="compact"],
.tempest-weather-container[data-display="minimal"] {
    max-width: 450px;
}

.tempest-weather-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--brand-primary);
    font-size: 16px;
    background: rgba(0, 1, 100, 0.05);
    border-radius: 24px;
}

.tempest-weather-loading .spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 1, 100, 0.2);
    border-top: 3px solid var(--brand-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.tempest-weather-error {
    background-color: #fee;
    border: 1px solid #fcc;
    border-radius: 20px;
    padding: 24px;
    color: #c33;
    text-align: center;
    font-size: 15px;
}

.tempest-weather-widget {
    background: linear-gradient(180deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 1, 100, 0.3);
    color: var(--text-primary);
}

/* Header Section */
.tempest-weather-header {
    padding: 24px 24px 0;
    text-align: center;
}

.tempest-weather-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.tempest-weather-corgi-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    background: white;
}

.tempest-weather-corgi-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tempest-weather-header-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tempest-weather-location {
    font-size: 32px;
    font-weight: 300;
    margin: 0 0 4px 0;
    letter-spacing: -0.5px;
    color: #ffffff !important;
}

.tempest-weather-update-time {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0;
}

/* Current Weather Section - Two Column Compact */
.tempest-weather-current-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 24px;
    gap: 20px;
}

.tempest-weather-current-left {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tempest-weather-temp-huge {
    font-size: 96px;
    font-weight: 200;
    line-height: 1;
    margin: 0 0 8px 0;
    letter-spacing: -3px;
}

.tempest-weather-feels-like {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.tempest-weather-current-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.tempest-weather-icon-medium {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.tempest-weather-conditions-text {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}

/* Details Grid - Tempest Style */
.tempest-weather-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0 16px;
    padding-top: 20px;
}

.tempest-weather-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding: 12px 8px;
}

.tempest-weather-details-grid .tempest-weather-detail-value {
    font-size: 22px;
    font-weight: 500;
    margin: 0;
    color: var(--text-primary);
}

.tempest-weather-details-grid .tempest-weather-detail-label {
    font-size: 13px;
    color: var(--text-tertiary);
    text-transform: lowercase;
    margin: 0;
    font-weight: 400;
}

/* Hourly Forecast */
.tempest-weather-hourly-section {
    margin: 0 16px 20px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px;
}

.tempest-weather-hourly-title {
    font-size: 13px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px 0;
    font-weight: 500;
}

.tempest-weather-hourly-scroll {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tempest-weather-hourly-scroll::-webkit-scrollbar {
    display: none;
}

.tempest-weather-hour-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 60px;
}

.tempest-weather-hour-time {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.tempest-weather-hour-icon {
    width: 36px;
    height: 36px;
}

.tempest-weather-hour-temp {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
}

.tempest-weather-hour-precip {
    font-size: 13px;
    color: #7dd3fc;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* UV Index Color Coding */
.tempest-uv-low { color: #4ade80 !important; }
.tempest-uv-moderate { color: #fbbf24 !important; }
.tempest-uv-high { color: #fb923c !important; }
.tempest-uv-very-high { color: #f87171 !important; }
.tempest-uv-extreme { color: #c084fc !important; }

/* Wind Direction Arrow */
.tempest-wind-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid currentColor;
    margin-right: 6px;
    vertical-align: middle;
}

/* SF Symbols-style Icons using SVG */
.tempest-icon {
    fill: currentColor;
}

/* Compact Display Mode */
.tempest-weather-container[data-display="compact"] .tempest-weather-current {
    padding: 24px;
}

.tempest-weather-container[data-display="compact"] .tempest-weather-icon-large {
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
}

.tempest-weather-container[data-display="compact"] .tempest-weather-temp-large {
    font-size: 60px;
}

.tempest-weather-container[data-display="compact"] .tempest-weather-hourly-section {
    display: none;
}

/* Minimal Display Mode */
.tempest-weather-container[data-display="minimal"] .tempest-weather-current {
    padding: 20px;
}

.tempest-weather-container[data-display="minimal"] .tempest-weather-icon-large {
    width: 60px;
    height: 60px;
    margin-bottom: 8px;
}

.tempest-weather-container[data-display="minimal"] .tempest-weather-temp-large {
    font-size: 48px;
}

.tempest-weather-container[data-display="minimal"] .tempest-weather-details,
.tempest-weather-container[data-display="minimal"] .tempest-weather-hourly-section {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tempest-weather-current-compact {
        flex-direction: column;
        text-align: center;
    }
    
    .tempest-weather-temp-huge {
        font-size: 80px;
    }
    
    .tempest-weather-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .tempest-weather-container {
        max-width: 100%;
    }
    
    .tempest-weather-widget {
        border-radius: 20px;
        margin: 0 8px;
    }
    
    .tempest-weather-temp-huge {
        font-size: 68px;
    }
    
    .tempest-weather-details-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
    
    .tempest-weather-detail-item {
        padding: 10px 4px;
    }
    
    .tempest-weather-temp-large {
        font-size: 68px;
    }
    
    .tempest-weather-details {
        gap: 10px;
    }
    
    .tempest-weather-detail-value {
        font-size: 24px;
    }
}

/* iOS-style Glass Effect */
@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
    .tempest-weather-detail-card,
    .tempest-weather-hourly-section {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* Smooth Animations */
.tempest-weather-widget * {
    transition: all 0.3s ease;
}

.tempest-weather-hour-item:hover {
    transform: scale(1.05);
}

.tempest-weather-detail-card:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Attribution */
.tempest-weather-footer {
    padding: 12px 24px 20px;
    text-align: center;
}

.tempest-weather-attribution {
    font-size: 11px;
    color: var(--text-tertiary);
    margin: 0;
}

.tempest-weather-attribution a {
    color: var(--text-secondary);
    text-decoration: none;
}

.tempest-weather-attribution a:hover {
    color: var(--text-primary);
}
