/* main/assets/css/pages/water.css */

/* ═══════════════════════════════════════════════════
   용수 요약 아코디언 (price.css 에서 분리된 독립 스타일)
   ═══════════════════════════════════════════════════ */

.water-insight-card .card-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 10px;
}

.water-analysis-container {
    position: relative;
    padding: 0 0 4px;
}

.water-analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    transition: all 0.3s ease;
}

/* 접힌 상태: 선택된 버튼만 1열로 */
.water-analysis-container.is-collapsed {
    margin-bottom: 20px;
}

.water-analysis-container.is-collapsed .water-analysis-grid {
    grid-template-columns: 1fr;
    margin-bottom: 10px;
}

.water-analysis-container.is-collapsed .water-mini-card:not(.active) {
    display: none;
}

.water-analysis-container.is-collapsed .water-mini-card.active {
    border: 2px solid var(--brown, #8c5e3c);
    box-shadow: 0 4px 12px rgba(87, 69, 65, 0.1);
}

/* 버튼 카드 */
.water-mini-card {
    background: #ffffff;
    padding: 14px 12px;
    border-radius: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #f1f3f5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    cursor: pointer;
}

.water-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #dee2e6;
}

.water-mini-card-title {
    font-size: 16px;
    color: #333;
    font-weight: 700;
}

/* 상세 분석 펼침 영역 */
.water-analysis-detail {
    background: #fff;
    border-radius: 16px;
    padding: 10px 0 0px;
    animation: fadeInSlide 0.4s ease;
}

/* 안내문 */
.water-analysis-notice {
    font-size: 15px;
    color: #999;
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 상위 항목 리스트 */
.water-analysis-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* Summary Cards Grid */
.water-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.water-summary-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: var(--font-family);
}

.water-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    border-color: #dee2e6;
}

.w-card-title {
    font-size: 14px;
    color: #777;
    margin-bottom: 6px;
    font-weight: 500;
    text-align: center;
    letter-spacing: -0.02em;
}

.w-card-value {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--brown, #8c5e3c);
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin-bottom: 4px;
}

.w-card-sub {
    font-size: 12px;
    color: #aaa;
    text-align: center;
}

/* Ranking Grid (New) */
.water-ranking-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.rank-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f3f5;
    font-family: var(--font-family);
}

.rank-list li:last-child {
    border-bottom: none;
}

.rank-name-group {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #333;
}

.rank-num-danger {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fee2e2;
    color: #ef4444;
    font-weight: bold;
    text-align: center;
    line-height: 24px;
    margin-right: 10px;
    font-size: 13px;
}

.rank-num-safe {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dbeafe;
    color: #3b82f6;
    font-weight: bold;
    text-align: center;
    line-height: 24px;
    margin-right: 10px;
    font-size: 13px;
}

.rank-rate {
    font-weight: 800;
    font-size: 15px;
}

/* Table Area */
.water-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-family: var(--font-family);
}

.water-table th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
    padding: 12px 6px;
    border-top: 1px solid #e8e0db;
    border-bottom: 1px solid #e8e0db;
    font-size: 14px;
}

.water-table td {
    padding: 12px 6px;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
    color: #444;
    font-size: 14px;
}

.water-table tbody tr:hover {
    background-color: #faf8f6;
}

/* Progress Bar */
.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: flex-end;
    padding-right: 10px;
}

.progress-bar-bg {
    width: 60px;
    height: 6px;
    background-color: #f1f3f5;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

.progress-text {
    width: 40px;
    text-align: right;
    font-weight: 700;
    font-size: 14px;
}

/* Status Colors (통일감) */
.status-danger {
    color: #ef4444;
}

.status-warning {
    color: #f59e0b;
}

.status-safe {
    color: #3b82f6;
}

.bg-danger {
    background-color: #ef4444;
}

.bg-warning {
    background-color: #f59e0b;
}

.bg-safe {
    background-color: #3b82f6;
}

/* Status Badges */
.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}