/**
 * Pension DB vs DC Comparison Calculator Styles
 * 퇴직연금 DB vs DC 비교 계산기 전용 스타일
 *
 * @package Zipper
 */

/* ===== 2컬럼 레이아웃 ===== */
.pdc-main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.pdc-input-row {
    display: flex;
    gap: 10px;
}

.pdc-input-row .pdc-input-group {
    flex: 1;
    min-width: 0;
}

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

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

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

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

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

/* ===== 대기 화면 ===== */
.pdc-waiting {
    text-align: center;
    padding: 40px 20px;
    color: #9e9a96;
}

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

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

/* ===== 비교 요약 카드 ===== */
.pdc-comparison-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pdc-comparison-card {
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.pdc-card-db {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(184, 134, 11, 0.05));
    border: 1px solid rgba(212, 175, 55, 0.35);
}

.pdc-card-dc {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.12), rgba(41, 128, 185, 0.05));
    border: 1px solid rgba(52, 152, 219, 0.35);
}

.pdc-card-icon {
    font-size: 20px;
    margin-bottom: 8px;
    display: block;
}

.pdc-card-db .pdc-card-icon {
    color: #d4af37;
}

.pdc-card-dc .pdc-card-icon {
    color: #3498db;
}

.pdc-card-type {
    font-size: 11px;
    font-weight: 500;
    color: #7a756d;
    margin-bottom: 4px;
}

.pdc-card-amount {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.pdc-card-db .pdc-card-amount {
    color: #d4af37;
}

.pdc-card-dc .pdc-card-amount {
    color: #3498db;
}

.pdc-card-sub {
    font-size: 12px;
    color: #7a756d;
}

.pdc-card-sub strong {
    color: #2d2a26;
    font-weight: 600;
}

/* ===== 차이 표시 ===== */
.pdc-diff-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
    border-radius: 8px;
}

.pdc-diff-label {
    font-size: 13px;
    color: #5f5a56;
}

.pdc-diff-amount {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
}

.pdc-diff-amount .pdc-diff-db {
    color: #d4af37;
    font-weight: 700;
}

.pdc-diff-amount .pdc-diff-dc {
    color: #3498db;
    font-weight: 700;
}

/* ===== 추천 영역 ===== */
.pdc-recommendation {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 10px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
}

.pdc-recommend-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.pdc-recommend-title {
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 4px;
}

.pdc-recommend-desc {
    font-size: 12px;
    color: #5f5a56;
    line-height: 1.5;
}

/* ===== 상세 정보 카드 (2x2 그리드) ===== */
.pdc-detail-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.pdc-detail-card {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.pdc-detail-value {
    font-size: 18px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 4px;
}

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

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

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

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

.pdc-chart-wrap {
    position: relative;
    width: 100%;
    height: 300px;
}

.pdc-chart-wrap canvas {
    width: 100% !important;
    max-height: 300px;
}

/* ===== 테이블 섹션 ===== */
.pdc-table-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.pdc-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pdc-table-title {
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdc-table-title i {
    color: #d4af37;
}

.pdc-excel-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: #217346;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pdc-excel-btn:hover {
    background: #1a5c38;
}

.pdc-excel-btn i {
    font-size: 13px;
}

.pdc-table-wrap {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
}

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

.pdc-data-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.pdc-data-table th {
    background: #f5f3f0;
    padding: 10px 8px;
    font-weight: 600;
    color: #2d2a26;
    text-align: right;
    border-bottom: 2px solid #e8e4dc;
    white-space: nowrap;
}

.pdc-data-table th:first-child {
    text-align: center;
}

.pdc-data-table td {
    padding: 8px;
    text-align: right;
    border-bottom: 1px solid #f0ede9;
    color: #2d2a26;
}

.pdc-data-table td:first-child {
    text-align: center;
    font-weight: 500;
    color: #5f5a56;
}

.pdc-data-table tbody tr:hover {
    background: #fdfbf5;
}

.pdc-table-db-win {
    color: #d4af37;
    font-weight: 600;
}

.pdc-table-dc-win {
    color: #3498db;
    font-weight: 600;
}

.pdc-table-even {
    color: #27ae60;
    font-weight: 500;
}

/* ===== 퇴직소득세 비교 ===== */
.pdc-tax-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

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

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

.pdc-tax-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pdc-tax-card {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    padding: 14px;
}

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

.pdc-tax-card-db .pdc-tax-card-title {
    color: #b8860b;
}

.pdc-tax-card-dc .pdc-tax-card-title {
    color: #2980b9;
}

.pdc-tax-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pdc-tax-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 11px;
}

.pdc-tax-step-label {
    color: #7a756d;
}

.pdc-tax-step-value {
    font-weight: 600;
    color: #2d2a26;
    text-align: right;
}

.pdc-tax-step-highlight {
    padding: 6px 8px;
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
    border-radius: 4px;
    margin-top: 4px;
}

.pdc-tax-step-highlight .pdc-tax-step-value {
    color: #d4af37;
    font-size: 13px;
}

/* ===== IRP 안내 ===== */
.pdc-irp-section {
    background: #f0f7ff;
    border: 1px solid #d0e4f7;
    border-radius: 12px;
    padding: 16px;
}

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

.pdc-irp-title i {
    color: #3498db;
}

.pdc-irp-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pdc-irp-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12px;
    line-height: 1.5;
    color: #5f5a56;
}

.pdc-irp-item i {
    font-size: 14px;
    color: #3498db;
    flex-shrink: 0;
    margin-top: 2px;
}

.pdc-irp-item strong {
    color: #2d2a26;
}

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

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

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

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

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

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

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

    .pdc-card-amount {
        font-size: 20px;
    }

    .pdc-comparison-cards {
        gap: 8px;
    }

    .pdc-tax-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 반응형 (480px 이하) ===== */
@media (max-width: 480px) {
    .pdc-section {
        padding: 12px;
    }

    .pdc-comparison-card {
        padding: 14px;
    }

    .pdc-card-amount {
        font-size: 18px;
    }

    .pdc-detail-cards {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .pdc-detail-card {
        padding: 10px;
    }

    .pdc-detail-value {
        font-size: 15px;
    }

    .pdc-input-row {
        flex-direction: column;
    }

    .pdc-chart-section,
    .pdc-table-section,
    .pdc-tax-section {
        padding: 12px;
    }

    .pdc-irp-section {
        padding: 12px;
    }

    .pdc-data-table {
        font-size: 11px;
    }

    .pdc-data-table th,
    .pdc-data-table td {
        padding: 6px 4px;
    }
}

/* ===== 접근성 ===== */
@media (prefers-reduced-motion: reduce) {
    .pdc-calculate-btn,
    .pdc-reset-btn,
    .pdc-amount-input,
    .pdc-number-input,
    .pdc-excel-btn {
        transition: none;
    }

    .pdc-calculate-btn:hover {
        transform: none;
    }
}

/* Excel button guard */
.tool-btn-excel {
  background: #59ab79;
  border-color: #59ab79;
}

.tool-btn-excel:hover,
.tool-btn-excel:focus-visible {
  background: #4f9f70;
  border-color: #4f9f70;
}

