/**
 * Comprehensive Property Tax Calculator Styles
 * 종합부동산세 계산기 전용 스타일
 *
 * @package Zipper
 */

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

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

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

/* ===== 공통 섹션 ===== */
.cpt-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;
}

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

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

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

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

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

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

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

.cpt-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;
}

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

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

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

.cpt-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;
}

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

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

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

.cpt-input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.cpt-input-with-unit .cpt-input {
    padding-right: 32px;
}

.cpt-input-unit {
    position: absolute;
    right: 12px;
    font-size: 13px;
    color: #7a756d;
    pointer-events: none;
}

.cpt-hint {
    font-size: 11px;
    color: #9e9a96;
    margin-top: 4px;
}

/* ===== 라디오 버튼 (주택 유형 - 4개이므로 grid 사용) ===== */
.cpt-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 4px;
}

.cpt-radio-item {
    position: relative;
}

.cpt-radio-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cpt-radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.cpt-radio-input:checked + .cpt-radio-label {
    background: #fff;
    color: #d4af37;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.15);
}

.cpt-radio-label:hover {
    color: #2d2a26;
}

/* ===== 체크박스 ===== */
.cpt-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cpt-checkbox-item {
    position: relative;
}

.cpt-checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

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

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

.cpt-checkbox-label::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #d4af37;
    border-radius: 3px;
    background: #fff;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cpt-checkbox-input:checked + .cpt-checkbox-label {
    border-color: #d4af37;
    background: #fdfbf5;
    color: #2d2a26;
    font-weight: 500;
}

.cpt-checkbox-input:checked + .cpt-checkbox-label::before {
    background: #d4af37;
    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 6l3 3 5-6' stroke='%23fff' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* ===== 조건부 표시 ===== */
.cpt-conditional {
    display: none;
}

.cpt-conditional.cpt-show {
    display: block;
}

/* ===== 버튼 ===== */
.cpt-btn-group {
    display: flex;
    gap: 8px;
}

.cpt-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);
}

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

.cpt-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;
}

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

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

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

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

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

.cpt-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.cpt-summary-label {
    font-size: 13px;
    color: #7a756d;
}

.cpt-summary-main {
    font-size: 32px;
    font-weight: 700;
    color: #d4af37;
    margin: 4px 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.cpt-summary-sub {
    font-size: 12px;
    color: #9e9a96;
    margin-top: 4px;
}

.cpt-summary-detail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e8e4dc;
}

.cpt-detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cpt-detail-label {
    font-size: 11px;
    color: #7a756d;
}

.cpt-detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
}

.cpt-detail-highlight {
    color: #d4af37;
}

/* ===== 결과 - 계산 흐름 ===== */
.cpt-flow-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

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

.cpt-flow-title i {
    color: #d4af37;
}

.cpt-flow-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cpt-flow-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.cpt-flow-step:nth-child(odd) {
    background: #faf9f7;
}

.cpt-flow-label {
    color: #5f5a56;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cpt-flow-value {
    font-weight: 600;
    color: #2d2a26;
    text-align: right;
}

.cpt-flow-arrow {
    display: flex;
    justify-content: center;
    padding: 4px 0;
    font-size: 12px;
    color: #d4af37;
}

.cpt-flow-highlight {
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
}

.cpt-flow-highlight .cpt-flow-value {
    color: #d4af37;
    font-size: 15px;
}

/* ===== 결과 - 부부 공동명의 비교 ===== */
.cpt-compare-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

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

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

.cpt-compare-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.cpt-compare-card {
    padding: 14px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    text-align: center;
    transition: all 0.2s;
}

.cpt-compare-card.cpt-compare-best {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 2px solid #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.15);
}

.cpt-compare-card-title {
    font-size: 12px;
    color: #7a756d;
    margin-bottom: 8px;
}

.cpt-compare-card.cpt-compare-best .cpt-compare-card-title {
    color: #d4af37;
    font-weight: 600;
}

.cpt-compare-amount {
    font-size: 18px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 4px;
}

.cpt-compare-card.cpt-compare-best .cpt-compare-amount {
    color: #d4af37;
}

.cpt-compare-detail {
    font-size: 11px;
    color: #9e9a96;
    margin-top: 4px;
}

.cpt-compare-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    color: #d4af37;
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
    border-radius: 4px;
    margin-top: 4px;
}

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

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

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

.cpt-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

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

.cpt-bar-wrap {
    position: relative;
    width: 100%;
    height: 200px;
}

.cpt-bar-wrap canvas {
    max-height: 200px;
}

.cpt-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

.cpt-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #5f5a56;
}

.cpt-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.cpt-legend-text {
    flex: 1;
}

/* ===== 세부담 상한 ===== */
.cpt-burden-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.cpt-burden-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 1px solid #e8dfc0;
    border-radius: 8px;
    margin-top: 12px;
}

.cpt-burden-label {
    font-size: 13px;
    color: #5f5a56;
}

.cpt-burden-value {
    font-size: 16px;
    font-weight: 700;
    color: #d4af37;
}

.cpt-burden-exceeded {
    font-size: 11px;
    color: #e74c3c;
    margin-top: 6px;
}

/* ===== 정보 배지 ===== */
.cpt-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    color: #d4af37;
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
    border-radius: 4px;
    margin-left: 6px;
}

/* ===== 면책 조항 ===== */
.cpt-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;
}

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

.cpt-disclaimer-title {
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 4px;
}

.cpt-disclaimer-text {
    margin: 0;
}

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

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

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

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

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

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

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

    .cpt-summary-main {
        font-size: 26px;
    }

    .cpt-summary-detail {
        grid-template-columns: 1fr;
    }

    .cpt-compare-grid {
        grid-template-columns: 1fr;
    }

    .cpt-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tool-section,
    .tool-layout-split,
    .tool-layout-input,
    .tool-layout-result {
        max-width: 100%;
        overflow-x: hidden;
    }

    .cpt-section {
        padding: 12px;
    }

    .cpt-result-summary {
        padding: 16px;
    }

    .cpt-summary-main {
        font-size: 22px;
    }

    .cpt-radio-group {
        grid-template-columns: 1fr;
    }

    .cpt-checkbox-group {
        flex-direction: column;
    }
}
