/**
 * Housing Point Calculator Styles
 * 주택청약 가점 계산기 전용 스타일
 *
 * @package Zipper
 */

/* ===== 2컬럼 레이아웃 (데스크탑) ===== */
.hpc-main-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    align-items: start;
}

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

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

/* ===== 탭 UI ===== */
.hpc-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 3px;
}

.hpc-tab {
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9e9a96;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.hpc-tab:hover {
    color: #5f5a56;
}

.hpc-tab.active {
    background: #fff;
    color: #d4af37;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.15);
}

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

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

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

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

.hpc-section + .hpc-section {
    margin-top: 16px;
}

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

.hpc-section-title i {
    color: #d4af37;
    font-size: 15px;
}

/* ===== 입력 그룹 ===== */
.hpc-input-group {
    margin-bottom: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

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

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

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

.hpc-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

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

.hpc-input::placeholder {
    color: #c4c0bc;
}

.hpc-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%235f5a56' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.hpc-select:hover {
    border-color: #d4c67a;
}

.hpc-select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.hpc-hint {
    font-size: 11px;
    color: #9e9a96;
    margin-top: 4px;
    line-height: 1.4;
}

.hpc-hint i {
    color: #d4af37;
    margin-right: 2px;
}

/* ===== 라디오 그룹 ===== */
.hpc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hpc-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 13px;
    color: #5f5a56;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    cursor: pointer;
    transition: all 0.2s;
}

.hpc-radio-label:hover {
    border-color: #d4af37;
}

.hpc-radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #d4af37;
    flex-shrink: 0;
}

.hpc-radio-label.active {
    border-color: #d4af37;
    background: #fdfbf5;
    color: #2d2a26;
    font-weight: 500;
}

.hpc-radio-desc {
    font-size: 11px;
    color: #9e9a96;
    margin-left: auto;
}

/* ===== 체크박스 ===== */
.hpc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 13px;
    color: #5f5a56;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    cursor: pointer;
    transition: all 0.2s;
}

.hpc-checkbox-label:hover {
    border-color: #d4af37;
}

.hpc-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #d4af37;
    flex-shrink: 0;
}

.hpc-checkbox-label.active {
    border-color: #d4af37;
    background: #fdfbf5;
    color: #2d2a26;
    font-weight: 500;
}

/* ===== 배우자 입력 영역 ===== */
.hpc-spouse-area {
    margin-top: 8px;
    padding: 12px;
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
    border-radius: 8px;
}

/* ===== 버튼 ===== */
.hpc-btn-group {
    margin-top: 14px;
    display: flex;
    gap: 8px;
}

.hpc-calculate-btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #d4af37, #c9a030);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

.hpc-calculate-btn:hover {
    background: linear-gradient(135deg, #c9a030, #b8922a);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.hpc-reset-btn {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    background: #f5f3f0;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.hpc-reset-btn:hover {
    background: #eae7e3;
}

.hpc-load-btn {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #3498db;
    background: #eaf4fd;
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.hpc-load-btn:hover {
    background: #d5eafb;
    border-color: #3498db;
}

/* ===== 대기 영역 ===== */
.hpc-waiting {
    text-align: center;
    padding: 40px 20px;
    color: #9e9a96;
}

.hpc-waiting i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    color: #d4af37;
    opacity: 0.4;
}

.hpc-waiting p {
    font-size: 13px;
    margin: 0;
}

/* ===== 결과 요약 카드 ===== */
.hpc-result-summary {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.12);
}

.hpc-summary-title {
    font-size: 12px;
    color: #7a756d;
    margin-bottom: 8px;
}

.hpc-summary-main {
    font-size: 48px;
    font-weight: 700;
    color: #d4af37;
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.hpc-summary-main .hpc-max {
    font-size: 20px;
    font-weight: 500;
    color: #b8860b;
    margin-left: 4px;
}

.hpc-rank-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}

.hpc-rank-badge.excellent {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    color: #fff;
}

.hpc-rank-badge.good {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
}

.hpc-rank-badge.average {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
    color: #fff;
}

.hpc-rank-badge.low {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
}

/* ===== 항목별 점수 카드 ===== */
.hpc-score-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.hpc-score-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    transition: box-shadow 0.2s ease;
}

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

.hpc-score-icon {
    font-size: 20px;
    color: #d4af37;
    margin-bottom: 6px;
}

.hpc-score-label {
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 8px;
}

.hpc-score-value {
    font-size: 28px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 2px;
}

.hpc-score-value .hpc-max {
    font-size: 14px;
    font-weight: 500;
    color: #a09a94;
}

.hpc-score-detail {
    font-size: 11px;
    color: #a09a94;
}

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

.hpc-chart-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hpc-chart-title i {
    color: #d4af37;
}

.hpc-chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: center;
}

.hpc-donut-wrap {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    position: relative;
}

.hpc-bar-wrap {
    position: relative;
    width: 100%;
    height: 220px;
}

.hpc-bar-wrap canvas {
    max-height: 220px;
}

/* ===== 가점 향상 전략 ===== */
.hpc-strategy-section {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.08) 0%, rgba(52, 152, 219, 0.02) 100%);
    border: 1px solid rgba(52, 152, 219, 0.25);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.hpc-strategy-title {
    font-size: 14px;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hpc-strategy-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hpc-strategy-item {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #5f5a56;
}

.hpc-strategy-item i {
    color: #3498db;
    flex-shrink: 0;
    margin-top: 2px;
}

.hpc-strategy-item strong {
    color: #2d2a26;
}

.hpc-strategy-badge {
    display: inline-block;
    padding: 1px 6px;
    background: #eaf4fd;
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #3498db;
    margin-left: 4px;
}

/* ===== 시뮬레이션 비교 카드 ===== */
.hpc-sim-compare {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.hpc-sim-compare-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hpc-sim-compare-title i {
    color: #d4af37;
}

.hpc-sim-compare-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.hpc-sim-score-box {
    text-align: center;
    flex: 1;
    padding: 14px;
    background: #faf9f7;
    border-radius: 10px;
    border: 1px solid #e8e4dc;
}

.hpc-sim-score-box.future {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border-color: #d4af37;
}

.hpc-sim-score-label {
    font-size: 11px;
    color: #9e9a96;
    margin-bottom: 4px;
}

.hpc-sim-score-value {
    font-size: 32px;
    font-weight: 700;
    color: #2d2a26;
}

.hpc-sim-score-box.future .hpc-sim-score-value {
    color: #d4af37;
}

.hpc-sim-arrow {
    font-size: 20px;
    color: #d4af37;
    flex-shrink: 0;
}

.hpc-sim-diff {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.hpc-sim-diff.positive {
    background: #e8f5e9;
    color: #27ae60;
}

.hpc-sim-diff.neutral {
    background: #f5f3f0;
    color: #9e9a96;
}

/* ===== 시뮬레이션 항목별 비교 ===== */
.hpc-sim-breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e8e4dc;
}

.hpc-sim-breakdown-row {
    display: grid;
    grid-template-columns: 100px 1fr 24px 1fr;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 6px;
}

.hpc-sim-breakdown-row:hover {
    background: #faf9f7;
}

.hpc-sim-breakdown-label {
    color: #5f5a56;
    font-weight: 500;
}

.hpc-sim-breakdown-now {
    text-align: center;
    color: #9e9a96;
}

.hpc-sim-breakdown-arrow {
    text-align: center;
    color: #d4af37;
    font-size: 12px;
}

.hpc-sim-breakdown-future {
    text-align: center;
    font-weight: 600;
    color: #2d2a26;
}

/* ===== 시뮬레이션 차트 ===== */
.hpc-sim-chart-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.hpc-sim-chart-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hpc-sim-chart-title i {
    color: #d4af37;
}

.hpc-sim-chart-wrap {
    position: relative;
    width: 100%;
    height: 280px;
}

.hpc-sim-chart-wrap canvas {
    max-height: 280px;
}

/* ===== 시뮬레이션 로드맵 ===== */
.hpc-sim-roadmap {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.08) 0%, rgba(39, 174, 96, 0.02) 100%);
    border: 1px solid rgba(39, 174, 96, 0.25);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.hpc-sim-roadmap-title {
    font-size: 14px;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hpc-sim-roadmap-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hpc-sim-milestone {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    font-size: 13px;
}

.hpc-sim-milestone i {
    font-size: 18px;
    flex-shrink: 0;
}

.hpc-sim-milestone.reached i {
    color: #27ae60;
}

.hpc-sim-milestone.pending i {
    color: #f39c12;
}

.hpc-sim-milestone.far i {
    color: #bdc3c7;
}

.hpc-sim-milestone-info {
    flex: 1;
}

.hpc-sim-milestone-target {
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 2px;
}

.hpc-sim-milestone-time {
    font-size: 12px;
    color: #7a756d;
}

.hpc-sim-milestone.reached .hpc-sim-milestone-time {
    color: #27ae60;
    font-weight: 600;
}

/* ===== 면책 조항 ===== */
.hpc-disclaimer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    font-size: 11px;
    color: #9e9a96;
    line-height: 1.5;
}

.hpc-disclaimer i {
    color: #d4af37;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ===== 유틸리티 ===== */
.hpc-hidden {
    display: none !important;
}

/* ===== 모션 감소 접근성 ===== */
@media (prefers-reduced-motion: reduce) {
    .hpc-section,
    .hpc-input,
    .hpc-select,
    .hpc-calculate-btn,
    .hpc-score-card,
    .hpc-tab {
        transition: none !important;
    }
    .hpc-section:hover,
    .hpc-score-card:hover,
    .hpc-calculate-btn:hover {
        transform: none !important;
    }
}

/* ===== 반응형 - 태블릿 ===== */
@media (max-width: 900px) {
    .hpc-main-layout {
        grid-template-columns: 1fr;
    }

    .hpc-input-col {
        position: static;
        width: 100%;
    }

    .hpc-result-col {
        width: 100%;
    }

    .tool-layout-input {
        max-width: 100%;
        overflow: hidden;
    }

    .hpc-input-group input:not([type="radio"]):not([type="checkbox"]),
    .hpc-input-group select {
        width: 100% !important;
        max-width: 100% !important;
    }

    .hpc-score-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .hpc-score-value {
        font-size: 24px;
    }

    .hpc-chart-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hpc-summary-main {
        font-size: 40px;
    }

    .hpc-sim-compare-main {
        gap: 10px;
    }

    .hpc-sim-score-value {
        font-size: 26px;
    }
}

/* ===== 반응형 - 모바일 ===== */
@media (max-width: 768px) {
    .hpc-result-summary {
        padding: 18px;
    }

    .hpc-summary-main {
        font-size: 36px;
    }

    .hpc-score-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .hpc-score-card {
        padding: 12px 8px;
    }

    .hpc-score-value {
        font-size: 22px;
    }

    .hpc-score-label {
        font-size: 11px;
    }

    .hpc-score-detail {
        font-size: 10px;
    }

    .hpc-sim-breakdown-row {
        grid-template-columns: 80px 1fr 20px 1fr;
        font-size: 12px;
    }
}

/* ===== 반응형 - 작은 모바일 ===== */
@media (max-width: 480px) {
    .tool-section,
    .tool-layout-split,
    .tool-layout-input,
    .tool-layout-result {
        max-width: 100%;
        overflow-x: hidden;
    }

    .hpc-input-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hpc-section {
        padding: 14px;
    }

    .hpc-summary-main {
        font-size: 32px;
    }

    .hpc-rank-badge {
        font-size: 12px;
        padding: 5px 12px;
    }

    .hpc-score-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hpc-score-card {
        display: flex;
        align-items: center;
        gap: 14px;
        text-align: left;
        padding: 14px;
    }

    .hpc-score-icon {
        font-size: 22px;
        margin-bottom: 0;
        min-width: 30px;
        text-align: center;
    }

    .hpc-score-label {
        margin-bottom: 0;
    }

    .hpc-score-value {
        font-size: 24px;
        margin-left: auto;
        margin-bottom: 0;
    }

    .hpc-score-detail {
        display: none;
    }

    .hpc-sim-compare-main {
        flex-direction: column;
        gap: 8px;
    }

    .hpc-sim-arrow {
        transform: rotate(90deg);
    }

    .hpc-sim-score-value {
        font-size: 28px;
    }

    .hpc-sim-breakdown-row {
        grid-template-columns: 70px 1fr 16px 1fr;
        font-size: 11px;
        gap: 4px;
    }

    .hpc-sim-chart-wrap {
        height: 220px;
    }

    .hpc-sim-chart-wrap canvas {
        max-height: 220px;
    }

    .hpc-bar-wrap {
        height: 180px;
    }

    .hpc-bar-wrap canvas {
        max-height: 180px;
    }
}
