/**
 * Pension Tax Deduction Calculator Styles
 * 연금저축/IRP 세액공제 계산기 전용 스타일
 *
 * @package Zipper
 */

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

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

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

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

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

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

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

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

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

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

.ptdc-label-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #d4af37;
    background: #fef9e7;
    border: 1px solid #f9e79f;
    border-radius: 4px;
    padding: 2px 6px;
    margin-left: 4px;
}

.ptdc-badge-blue {
    color: #2980b9;
    background: #ebf5fb;
    border-color: #aed6f1;
}

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

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

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

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

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

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

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

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

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

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

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

/* ===== Waiting 섹션 ===== */
.ptdc-waiting {
    text-align: center;
    padding: 40px 20px;
    color: #9e9a96;
}

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

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

/* ===== 결과 요약 ===== */
.ptdc-result-summary {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.08);
}

.ptdc-summary-header {
    font-size: 16px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ptdc-summary-header i {
    color: #d4af37;
    font-size: 18px;
}

/* 공제율 카드 */
.ptdc-rate-card {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    margin-bottom: 16px;
}

.ptdc-rate-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(45, 42, 38, 0.8);
    margin-bottom: 6px;
}

.ptdc-rate-value {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ptdc-rate-desc {
    font-size: 11px;
    font-weight: 500;
    color: rgba(45, 42, 38, 0.7);
}

/* 세액공제 그리드 */
.ptdc-deduction-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.ptdc-deduction-item {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    padding: 12px;
}

.ptdc-deduction-label {
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ptdc-deduction-label i {
    color: #d4af37;
    font-size: 13px;
}

.ptdc-deduction-value {
    font-size: 20px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 4px;
}

.ptdc-deduction-desc {
    font-size: 11px;
    color: #9e9a96;
}

.ptdc-isa-item {
    background: #ebf5fb;
    border-color: #aed6f1;
}

.ptdc-isa-item .ptdc-deduction-label i {
    color: #2980b9;
}

/* 총계 박스 */
.ptdc-total-box {
    background: #fef9e7;
    border: 2px solid #f9e79f;
    border-radius: 10px;
    padding: 14px;
}

.ptdc-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #f9e79f;
    margin-bottom: 12px;
}

.ptdc-total-label {
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
}

.ptdc-total-value {
    font-size: 18px;
    font-weight: 700;
    color: #d4af37;
}

.ptdc-refund-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ptdc-refund-label {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
}

.ptdc-refund-value {
    font-size: 24px;
    font-weight: 800;
    color: #27ae60;
}

/* 경고 박스 */
.ptdc-warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #856404;
    line-height: 1.5;
}

.ptdc-warning-box i {
    font-size: 16px;
    color: #ffc107;
    flex-shrink: 0;
}

/* ===== 상세 설명 ===== */
.ptdc-detail-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
}

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

.ptdc-detail-header i {
    color: #d4af37;
    font-size: 15px;
}

.ptdc-detail-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ptdc-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    margin: 0;
}

.ptdc-detail-label {
    font-size: 12px;
    font-weight: 500;
    color: #7a756d;
}

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

.ptdc-detail-divider {
    height: 1px;
    background: #e8e4dc;
    margin: 4px 0;
}

/* ===== 면책 고지 ===== */
.ptdc-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;
}

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

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

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

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

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

    /* Rule 24: 모바일 input overflow 방지 */
    .ptdc-input-col,
    .ptdc-result-col {
        max-width: 100%;
        overflow: hidden;
    }

    .ptdc-amount-input {
        width: 100% !important;
        max-width: 100% !important;
    }

    .ptdc-calculate-btn,
    .ptdc-reset-btn {
        width: 100%;
    }

    .ptdc-calculate-btn:hover {
        transform: none !important;
    }

    .ptdc-rate-value {
        font-size: 24px;
    }

    .ptdc-deduction-value {
        font-size: 18px;
    }

    .ptdc-refund-value {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .ptdc-section,
    .ptdc-result-summary,
    .ptdc-detail-section {
        max-width: 100%;
        overflow-x: hidden;
    }

    .ptdc-summary-header {
        font-size: 15px;
    }

    .ptdc-rate-value {
        font-size: 22px;
    }

    .ptdc-total-value {
        font-size: 16px;
    }

    .ptdc-refund-value {
        font-size: 18px;
    }
}
