/**
 * Divorce Property Division Calculator Styles
 * 이혼 재산분할 계산기 전용 스타일
 *
 * @package Zipper
 */

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

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

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

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

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

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

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

/* ===== 탭 그룹 ===== */
.dpd-tab-group {
    display: flex;
    gap: 4px;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 3px;
}

.dpd-tab {
    flex: 1;
    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;
}

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

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

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

.dpd-tab-content.active {
    display: contents;
}

/* 탭 내부 섹션 간 간격 (Rule 44) */
.dpd-tab-content .dpd-section + .dpd-section {
    margin-top: 14px;
}

.dpd-tab-content .dpd-btn-group {
    margin-top: 14px;
}

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

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

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

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

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

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

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

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

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

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

/* ===== 라디오 버튼 ===== */
.dpd-radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

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

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

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

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

/* ===== 체크박스 ===== */
.dpd-checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.dpd-checkbox-row:last-child {
    margin-bottom: 0;
}

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

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

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

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

/* ===== 퇴직금 기간 입력 ===== */
.dpd-period-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.dpd-period-field {
    flex: 1;
}

.dpd-period-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dpd-period-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 8px 10px;
    font-size: 14px;
    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;
    -moz-appearance: textfield;
}

.dpd-period-input::-webkit-outer-spin-button,
.dpd-period-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

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

.dpd-period-unit {
    font-size: 13px;
    color: #7a756d;
    font-weight: 500;
    flex-shrink: 0;
}

.dpd-retirement-calc-hint {
    font-size: 11px;
    color: #d4af37;
    margin-top: 6px;
    min-height: 16px;
    line-height: 1.5;
}

/* ===== 슬라이더 ===== */
.dpd-slider-wrap {
    padding: 4px 0;
}

.dpd-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e8e4dc;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.dpd-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #d4af37;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(212, 175, 55, 0.3);
    cursor: pointer;
}

.dpd-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #d4af37;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(212, 175, 55, 0.3);
    cursor: pointer;
}

.dpd-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.dpd-slider-value {
    font-size: 13px;
    font-weight: 600;
    color: #d4af37;
}

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

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

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

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

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

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

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

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

/* ===== 결과 - 요약 카드 ===== */
.dpd-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);
}

.dpd-summary-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 16px;
}

.dpd-summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.dpd-summary-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.dpd-summary-card-label {
    font-size: 11px;
    color: #7a756d;
    margin-bottom: 4px;
}

.dpd-summary-card-value {
    font-size: 16px;
    font-weight: 700;
    color: #2d2a26;
    letter-spacing: -0.02em;
}

.dpd-summary-card-value.dpd-negative {
    color: #e74c3c;
}

.dpd-summary-card-value.dpd-gold {
    color: #d4af37;
}

.dpd-card-highlight {
    border-color: #d4af37;
    background: #fdfbf5;
}

.dpd-summary-divider {
    height: 1px;
    background: #e8e4dc;
    margin-bottom: 12px;
}

.dpd-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid #e8e4dc;
    font-size: 13px;
}

.dpd-summary-row:first-of-type {
    border-top: none;
}

.dpd-summary-row-label {
    color: #7a756d;
}

.dpd-summary-row-value {
    font-weight: 600;
    color: #2d2a26;
}

.dpd-summary-row-value.dpd-gold {
    color: #d4af37;
    font-size: 15px;
}

.dpd-settlement-row {
    background: #fdfbf5;
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 4px;
}

/* ===== 결과 - 재산 유형별 내역 ===== */
.dpd-detail-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

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

.dpd-detail-title i {
    color: #d4af37;
}

.dpd-chart-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    margin-bottom: 16px;
}

.dpd-chart-wrap canvas {
    max-height: 260px;
}

.dpd-detail-table-wrap {
    overflow-x: auto;
}

.dpd-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.dpd-detail-table th {
    padding: 8px 10px;
    background: #faf9f7;
    border-bottom: 1px solid #e8e4dc;
    font-weight: 600;
    color: #5f5a56;
    text-align: center;
}

.dpd-detail-table th:first-child {
    text-align: left;
}

.dpd-detail-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0ede8;
    text-align: center;
    color: #2d2a26;
}

.dpd-detail-table tbody tr:hover td {
    background: #faf9f7;
}

.dpd-detail-table td:first-child {
    text-align: left;
    color: #5f5a56;
}

.dpd-detail-table tr:last-child td {
    border-bottom: none;
    font-weight: 600;
}

/* ===== 결과 - 세금/시효 ===== */
.dpd-tax-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

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

.dpd-tax-title i {
    color: #d4af37;
}

.dpd-tax-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dpd-tax-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #faf9f7;
    border-radius: 8px;
    font-size: 12px;
    color: #5f5a56;
    line-height: 1.5;
}

/* ===== 가이드 스타일 (탭2) ===== */
.dpd-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.dpd-compare-table th {
    padding: 8px 10px;
    background: #faf9f7;
    border-bottom: 1px solid #e8e4dc;
    font-weight: 600;
    color: #5f5a56;
    text-align: center;
}

.dpd-compare-table th:first-child {
    text-align: left;
}

.dpd-compare-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0ede8;
    text-align: center;
    color: #2d2a26;
    font-size: 12px;
    line-height: 1.5;
}

.dpd-compare-table td:first-child {
    text-align: left;
    font-weight: 500;
    color: #5f5a56;
}

.dpd-guide-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fdf5e6;
    border: 1px solid #f0e0b0;
    border-radius: 8px;
}

.dpd-guide-icon {
    font-size: 20px;
    color: #d4af37;
    flex-shrink: 0;
    margin-top: 2px;
}

.dpd-guide-text {
    font-size: 13px;
    color: #5f5a56;
    line-height: 1.6;
}

.dpd-guide-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dpd-guide-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #faf9f7;
    border-radius: 8px;
    font-size: 12px;
    color: #5f5a56;
    line-height: 1.5;
}

.dpd-guide-badge {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.dpd-badge-safe {
    background: #e8f5e9;
    color: #2e7d32;
}

.dpd-badge-warn {
    background: #fff3e0;
    color: #e65100;
}

.dpd-link-card {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #5f5a56;
    text-decoration: none;
    transition: color 0.2s;
    width: 100%;
}

.dpd-link-card:hover {
    color: #d4af37;
}

.dpd-link-card i {
    color: #d4af37;
    font-size: 16px;
    flex-shrink: 0;
}

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

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

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

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

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

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

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

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

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

    .dpd-summary-cards {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .dpd-summary-card-value {
        font-size: 18px;
    }

    .dpd-detail-table {
        font-size: 11px;
    }

    .dpd-detail-table th,
    .dpd-detail-table td {
        padding: 6px 6px;
    }
}

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

    .dpd-section {
        padding: 12px;
    }

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

    .dpd-chart-wrap {
        height: 200px;
    }

    .dpd-chart-wrap canvas {
        max-height: 200px;
    }

    .dpd-checkbox-row {
        flex-direction: column;
    }

    .dpd-compare-table {
        font-size: 11px;
    }

    .dpd-compare-table th,
    .dpd-compare-table td {
        padding: 6px 6px;
    }
}
