/**
 * features/weather.css — 날씨 그리드 / 주간 예보 전용 스타일
 * weather_card.css 내용에서 components/ 로 이동된 항목 제외:
 *   - .advice-badge → components/badge.css
 *   - .card-advice, .advice-text → components/card.css
 */

/* =========================================
   1. 카드 Wrapper
   ========================================= */

.weather-card-v2 {
    background: var(--white);
    margin-bottom: 0;
}


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

.weather-card-v2 .weather-header--no-divider {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.weather-card-v2 .card-timestamp-row {
    margin-top: 8px;
    margin-bottom: 16px;
}

/* =========================================
   2. 날씨 그리드 컨테이너
   ========================================= */

.weather-grid-container {
    background-color: var(--white);
    padding: 16px 0;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.weather-col-group {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.weather-col-group .weather-grid-item {
    flex: 1;
}

.weather-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 4px;
}

.grid-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    padding: 20px 0;
}

.grid-divider {
    height: 1px;
    background-color: #eee;
    margin: 20px 0;
}

/* =========================================
   3. 그리드 아이템 레이블 / 값
   ========================================= */

.grid-label {
    font-size: 17px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.weather-col-group .weather-grid-item .grid-label {
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    margin-top: 10px;
    margin-bottom: 0;
}

.weather-col-group .weather-grid-item:last-child .grid-content {
    padding: 4px 0;
}

.weather-col-group .weather-grid-item:last-child .grid-label {
    margin-top: 4px;
    padding-top: 5px;
}

.grid-value {
    font-size: 30px;
    font-weight: 900;
    color: var(--brown);
    line-height: 1.2;
}

.grid-temp-value {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    margin-top: 4px;
}

.grid-weather-text {
    font-size: 15px;
    color: #666;
    font-weight: 500;
    margin-bottom: 2px;
}

.live-section-title {
    font-size: 17px;
    color: #333;
    font-weight: 600;
    margin-bottom: 14px;
    text-align: left;
}

.grid-value-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.grid-sub-value {
    font-size: 12px;
    margin-top: 2px;
}

.grid-sub-value--rain {
    color: var(--info);
    font-weight: bold;
}

.grid-sub-info {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.grid-detail-box {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #f0f0f0;
    width: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-title {
    font-size: 11px;
    color: #b0b0b0;
    margin-bottom: 2px;
}

.detail-text {
    font-size: 12px;
    color: #555;
    font-weight: 500;
}

.weather-label-extra {
    font-size: 13px;
    color: #666;
    opacity: 0.6;
    margin-top: 2px;
}

.weather-label-extra--night {
    font-size: 0.75em;
    color: #e67e22;
    font-weight: 600;
    margin-top: 2px;
    opacity: 1;
}

.weather-extra-sm {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
}

/* =========================================
   4. 날씨 아이콘
   ========================================= */

.grid-icon {
    margin-bottom: 3px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.live-icon {
    margin-bottom: 6px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 52px;
}

.grid-icon img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.weather-overlay-icon {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 18px !important;
    height: 18px !important;
}

.weather-icon-wrapper {
    position: relative;
}

.weather-overlay-icon-sm {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
}

.weather-label-text {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 800;
}

.grid-icon img.weather-icon-composite {
    transform: scale(1.25);
    transform-origin: center;
}

.weather-icon-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    vertical-align: middle;
    filter: drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.15));
}

.weather-icon-img.weather-icon-composite {
    transform: scale(1.25);
    transform-origin: center;
}

/* =========================================
   5. 주간 예보
   ========================================= */

.weekly-list {
    display: flex;
    flex-direction: column;
}

.weekly-row {
    display: flex;
    align-items: center;
    padding: 20px 10px;
    margin-bottom: 2px;
    transition: background-color 0.2s;
    width: 100%;
}

.weekly-row.row-today {
    background-color: #f7ebdb;
    border-left: 5px solid var(--brown);
}

.weekly-row:nth-child(odd) {
    background-color: var(--white);
}

.weekly-row:nth-child(even) {
    background-color: var(--bg-card);
}

.col-date {
    flex: 1 1 0%;
    font-size: 17px;
    font-weight: 600;
    color: #333;
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.col-date .date-num {
    font-weight: 800;
    font-size: 18px;
    color: var(--brown);
}

.col-date .day-name {
    font-size: 16px;
    color: #999;
}

.col-weather-split-header {
    flex: 2 1 0%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-weather-label {
    flex: 1;
    text-align: center;
    color: #333;
    font-size: 17px;
    font-weight: 600;
}

.col-weather-split {
    flex: 2 1 0%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-half {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    min-width: 0;
}

.weather-half>div:first-child {
    height: 42px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 8px;
}

.weather-text-sm {
    font-size: 15px;
    color: #333;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.weather-pop-sm {
    font-size: 13px;
    color: var(--info);
    font-weight: 700;
}

.col-temp {
    flex: 2 1 0%;
    text-align: right;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding-right: 10px;
}

/* =========================================
   6. 반응형 (380px 이하)
   ========================================= */

@media (max-width: 380px) {
    .grid-label {
        font-size: 15px;
    }

    .grid-icon img {
        width: 36px;
        height: 36px;
    }

    .advice-text {
        font-size: 15px;
    }

    .col-date {
        font-size: 17px;
    }

    .col-date .date-num {
        font-size: 23px;
    }

    .col-temp {
        font-size: 14px;
    }

    .weather-icon-img {
        width: 44px;
        height: 44px;
    }

    .weather-text-sm {
        font-size: 13px;
    }
}