/* ============================================================
   Weather Dashboard - Tesla UI Styling
   ============================================================ */

/* Header Mini Weather Badge */
.header-weather-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    border-radius: 0px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.3;
    margin: 0;
}

.header-weather-badge:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.header-weather-icon {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
}

/* Weather Main Card */
.weather-card {
    background: var(--bg-card);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: 22px 26px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.weather-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #f59e0b, #60a5fa);
    opacity: 0.9;
}

/* Header */
.weather-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.weather-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.weather-avatar {
    width: 44px;
    height: 44px;
    border-radius: 0px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.weather-avatar svg {
    width: 24px;
    height: 24px;
}

.weather-title-group h2 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.weather-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

/* Grid */
.weather-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.6fr;
    gap: 16px;
}

.weather-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 125px;
    position: relative;
    transition: var(--transition);
}

.weather-box:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.35);
}

.weather-box-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.weather-temp-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 8px 0 4px;
}

.weather-temp-huge {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.weather-temp-unit {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 600;
}

.weather-box-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Details List */
.weather-details-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
    font-size: 12px;
}

.weather-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.weather-detail-item span:first-child {
    color: var(--text-muted);
}

.weather-detail-item span:last-child {
    color: #ffffff;
    font-weight: 600;
}

/* Forecast Horizontal Row */
.forecast-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.forecast-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0px;
    padding: 10px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.forecast-day {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.forecast-icon {
    font-size: 20px;
    margin: 2px 0;
}

.forecast-temp {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.forecast-pop {
    font-size: 10px;
    color: #38bdf8;
    font-weight: 600;
}

/* Collapsed State */
.weather-card.collapsed .weather-grid {
    display: none;
}

.weather-card.collapsed .weather-header {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .weather-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 650px) {
    .weather-grid {
        grid-template-columns: 1fr;
    }
    .weather-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
