/**
 * Health Insurance Calculator Styles
 * 건강보험료 계산기 전용 스타일
 *
 * @package Zipper
 */

/* ===== 2컬럼 자체 그리드 레이아웃 (Rule 38) ===== */
.hic-main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: start;
}

.hic-input-col {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hic-result-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== 공통 섹션 (Rule 49) ===== */
.hic-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    transition: box-shadow 0.2s ease;
}

.hic-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

.hic-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hic-section-title i {
    color: #d4af37;
    font-size: 14px;
}

/* ===== Hidden ===== */
.hic-hidden {
    display: none !important;
}

/* ===== 탭 (2탭 → flex) ===== */
.hic-tabs {
    display: flex;
    gap: 4px;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 4px;
}

.hic-tab {
    flex: 1;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: #7a756d;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.hic-tab:hover {
    color: #2d2a26;
}

.hic-tab.active {
    background: #fff;
    color: #2d2a26;
    box-shadow: 0 1px 3px rgba(45, 42, 38, 0.12);
}

/* ===== 탭 콘텐츠 ===== */
.hic-tab-content {
    display: none;
}

.hic-tab-content.active {
    display: block;
}

/* Rule 44: 탭 래퍼 내부 요소 간격 */
.hic-tab-content .hic-section + .hic-section {
    margin-top: 14px;
}

/* ===== 입력 영역 (Rule 24/33) ===== */
.hic-input-section {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.hic-input-group {
    margin-bottom: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

.hic-input-group:last-child {
    margin-bottom: 0;
}

.hic-input-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #5f5a56;
    margin-bottom: 6px;
}

.hic-label-hint {
    font-weight: 400;
    color: #9e9a96;
    margin-left: 4px;
}

.hic-input-help {
    font-size: 11px;
    color: #a09a94;
    margin-top: 4px;
    line-height: 1.4;
}

/* ===== 금액 입력 (Rule 49: focus glow) ===== */
.hic-amount-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 600;
    text-align: right;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hic-amount-input:hover {
    border-color: #d4c67a;
}

.hic-amount-input:focus {
    outline: none;
    border-color: #d4af37;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.hic-amount-input::placeholder {
    font-weight: 400;
    color: #c4c0bc;
}

.hic-korean-amount {
    font-size: 11px;
    color: #d4af37;
    margin-top: 4px;
    text-align: right;
    min-height: 16px;
}

/* ===== 버튼 그룹 (Rule 49: gold shadow) ===== */
.hic-btn-group {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.hic-calculate-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

.hic-calculate-btn:hover {
    background: linear-gradient(135deg, #e0c060, #d4af37);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.hic-reset-btn {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #7a756d;
    background: transparent;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.hic-reset-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
}

/* ===== 대기 섹션 ===== */
.hic-waiting {
    text-align: center;
    padding: 40px 20px;
}

.hic-waiting-icon {
    font-size: 48px;
    color: #e8e4dc;
    margin-bottom: 16px;
}

.hic-waiting-text {
    font-size: 14px;
    color: #a09a94;
}

/* ===== 결과 요약 카드 (Rule 49: gradient + shadow) ===== */
.hic-result-summary {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.12);
}

.hic-summary-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 12px;
}

.hic-summary-header i {
    color: #d4af37;
    font-size: 14px;
}

.hic-summary-total {
    text-align: center;
    margin-bottom: 16px;
}

.hic-summary-total-label {
    font-size: 12px;
    color: #7a756d;
    margin-bottom: 4px;
}

.hic-summary-total-amount {
    font-size: 32px;
    font-weight: 700;
    color: #2d2a26;
    letter-spacing: -0.02em;
}

.hic-summary-total-amount .hic-unit {
    font-size: 16px;
    font-weight: 500;
    color: #7a756d;
}

.hic-summary-total-sub {
    font-size: 12px;
    color: #a09a94;
    margin-top: 4px;
}

/* 본인/사업주 분할 카드 */
.hic-summary-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.hic-split-card {
    text-align: center;
    padding: 14px 12px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
}

.hic-split-label {
    font-size: 11px;
    font-weight: 600;
    color: #7a756d;
    margin-bottom: 6px;
}

.hic-split-amount {
    font-size: 20px;
    font-weight: 700;
    color: #2d2a26;
}

.hic-split-amount .hic-unit {
    font-size: 12px;
    font-weight: 500;
    color: #7a756d;
}

.hic-split-card-employee {
    border-color: rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.04);
}

/* ===== 상세 내역 ===== */
.hic-detail-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.hic-detail-table {
    width: 100%;
}

.hic-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0ece6;
}

.hic-detail-row:last-child {
    border-bottom: none;
}

.hic-detail-label {
    font-size: 13px;
    color: #5f5a56;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hic-detail-label i {
    color: #d4af37;
    font-size: 12px;
}

.hic-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
    text-align: right;
}

.hic-detail-divider {
    border: none;
    border-top: 2px solid #e8e4dc;
    margin: 4px 0;
}

.hic-detail-row-total {
    border-bottom: none;
    padding-top: 8px;
}

.hic-detail-row-total .hic-detail-label {
    font-weight: 700;
    color: #2d2a26;
}

.hic-detail-row-total .hic-detail-value {
    font-size: 16px;
    font-weight: 700;
    color: #d4af37;
}

/* ===== 연간 예상액 ===== */
.hic-annual-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.hic-annual-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.hic-annual-card {
    text-align: center;
    padding: 14px;
    background: #faf9f7;
    border-radius: 10px;
}

.hic-annual-label {
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 6px;
}

.hic-annual-value {
    font-size: 20px;
    font-weight: 700;
    color: #2d2a26;
}

.hic-annual-value .hic-unit {
    font-size: 12px;
    font-weight: 500;
    color: #7a756d;
}

.hic-annual-card-total {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(184, 134, 11, 0.03) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.hic-annual-card-total .hic-annual-value {
    font-size: 24px;
    color: #d4af37;
}

/* ===== 차트 섹션 (Rule 45) ===== */
.hic-chart-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.hic-chart-container {
    position: relative;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
}

.hic-chart-container canvas {
    max-height: 260px;
}

.hic-chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
    font-size: 12px;
    color: #5f5a56;
}

.hic-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hic-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== 요율 정보 ===== */
.hic-rate-info {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 14px 16px;
}

.hic-rate-title {
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hic-rate-title i {
    color: #d4af37;
}

.hic-rate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.hic-rate-item {
    font-size: 12px;
    color: #7a756d;
}

.hic-rate-item strong {
    color: #2d2a26;
    font-weight: 600;
}

/* ===== 면책 조항 ===== */
.hic-disclaimer {
    padding: 14px 16px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    font-size: 12px;
    color: #a09a94;
    line-height: 1.6;
}

.hic-disclaimer strong {
    color: #7a756d;
    font-weight: 600;
}

/* ===== prefers-reduced-motion (Rule 49) ===== */
@media (prefers-reduced-motion: reduce) {
    .hic-section,
    .hic-amount-input,
    .hic-calculate-btn,
    .hic-tab {
        transition: none !important;
    }
    .hic-section:hover,
    .hic-calculate-btn:hover {
        transform: none !important;
    }
}

/* ===== 반응형 (900px 이하) ===== */
@media (max-width: 900px) {
    .hic-main-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hic-input-col {
        position: static;
    }

    /* Rule 32: radio/checkbox 제외 */
    .hic-input-group input:not([type="radio"]):not([type="checkbox"]),
    .hic-input-group select {
        width: 100% !important;
        max-width: 100% !important;
    }

    .hic-summary-split {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ===== 반응형 (480px 이하) ===== */
@media (max-width: 480px) {
    .hic-main-layout,
    .hic-input-col,
    .hic-result-col {
        max-width: 100%;
        overflow-x: hidden;
    }

    .hic-summary-total-amount {
        font-size: 26px;
    }

    .hic-split-amount {
        font-size: 16px;
    }

    .hic-annual-cards {
        grid-template-columns: 1fr;
    }

    .hic-annual-card-total {
        grid-column: auto;
    }

    .hic-annual-value {
        font-size: 16px;
    }

    .hic-annual-card-total .hic-annual-value {
        font-size: 20px;
    }

    .hic-detail-value {
        font-size: 13px;
    }

    .hic-rate-grid {
        grid-template-columns: 1fr;
    }

    .hic-btn-group {
        grid-template-columns: 1fr;
    }
}
