/* =====================================================
   weather.css — 실시간 기상정보 위젯 (지도 좌측 하단)
   독립 모듈 — weather.js와 함께 사용
   ===================================================== */

#weather-card {
    position: absolute;
    bottom: 52px;
    left: 10px;
    z-index: 30;
    min-width: 220px;
    max-width: 280px;
    background: #16213ecc;
    border: 1px solid #0a84ff44;
    border-radius: 10px;
    padding: 8px 10px;
    color: #e8eefc;
    font-size: 11px;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.wc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.wc-icon { font-size: 24px; line-height: 1; flex-shrink: 0; }

.wc-main { flex: 1; min-width: 0; }

.wc-temp { font-size: 16px; font-weight: 700; line-height: 1.2; }

.wc-desc { font-size: 10px; font-weight: 400; color: #9fb4d8; margin-left: 3px; }

.wc-sub { font-size: 10px; color: #8fa3c8; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wc-chev { color: #8fa3c8; font-size: 12px; flex-shrink: 0; display: none; }

.wc-demo { color: #fcc419; font-size: 9px; letter-spacing: .5px; }

.wc-refresh {
    background: none;
    border: 1px solid #0a84ff44;
    color: #4fc3f7;
    border-radius: 5px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 12px;
    flex-shrink: 0;
    transition: all .2s;
}
.wc-refresh:hover { background: #0a84ff33; }

/* 위험 경보 배지 */
.wc-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

.wc-badge {
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    white-space: nowrap;
}
.wc-badge.warning { background: #f59e0b2b; color: #fbbf24; border: 1px solid #f59e0b66; }
.wc-badge.danger  { background: #ef44442b; color: #f87171; border: 1px solid #ef444466; animation: wcPulse 1.2s infinite; }

@keyframes wcPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .6; }
}

/* 6시간 예보 */
.wc-forecast {
    display: flex;
    justify-content: space-between;
    gap: 3px;
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px solid #0a84ff22;
}

.wc-fcst { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; }

.wc-f-time { font-size: 9px; color: #8fa3c8; }

.wc-f-icon { font-size: 13px; line-height: 1; }

.wc-f-tmp { font-size: 10px; font-weight: 600; color: #dbe6ff; }

/* 오류/로딩 상태 */
.wc-err {
    font-size: 11px;
    color: #9fb4d8;
    text-align: center;
    padding: 6px 4px;
    line-height: 1.5;
}
.wc-err small { color: #66788f; font-size: 9px; }

/* ── 모바일 (768px 이하): 컴팩트 요약 → 탭으로 상세 펼침 ── */
@media (max-width: 768px) {
    #weather-card {
        bottom: 76px;
        left: 8px;
        right: auto;
        min-width: 168px;
        max-width: 210px;
        padding: 5px 7px;
    }
    .wc-icon { font-size: 20px; }
    .wc-temp { font-size: 14px; }
    .wc-chev { display: inline; }
    .wc-refresh { width: 19px; height: 19px; font-size: 10px; }
    /* 접힘 상태: 아이콘 + 온도 + 하늘상태만 (상용맵류 한 줄 스타일) */
    #weather-card:not(.expanded) .wc-detail,
    #weather-card:not(.expanded) .wc-sub { display: none; }
    #weather-card:not(.expanded) { padding: 4px 7px; }
    #weather-card:not(.expanded) .wc-temp { font-size: 13px; }
    .wc-fcst:nth-child(n+5) { display: none; }   /* 펼칠 때도 4시간만 */
}
