/**
 * Pension Withdrawal Tax Calculator Styles
 * 연금저축·IRP 연금수령세 계산기
 *
 * @package Zipper
 */

.pwtc-main-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

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

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

.pwtc-section,
.pwtc-result-summary,
.pwtc-chart-section,
.pwtc-detail-section,
.pwtc-warning-section {
    background: #fff;
    border: 1px solid #e8e3d9;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

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

.pwtc-section-title i {
    color: #d4af37;
}

.pwtc-input-section {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.pwtc-input-group {
    margin-bottom: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

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

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

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

.pwtc-amount-wrap,
.pwtc-input-wrap,
.pwtc-input-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    width: 100%;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    overflow: hidden;
    background: #fbfaf8;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.pwtc-amount-wrap:hover,
.pwtc-input-wrap:hover,
.pwtc-input-flow:hover {
    border-color: #d4c67a;
}

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

.pwtc-unit,
.pwtc-unit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 42px;
    padding: 0 10px;
    border-left: 1px solid #e4ddd0;
    background: linear-gradient(180deg, #fcfbf8 0%, #f3efe8 100%);
    color: #7b7467;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.pwtc-label-hint {
    color: #948c83;
    font-weight: 500;
    font-size: 11px;
}

.pwtc-amount-input,
.pwtc-number-input,
.pwtc-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    background: #fbfaf8;
    color: #2d2a26;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.pwtc-amount-input,
.pwtc-number-input {
    text-align: right;
    font-weight: 600;
}

.pwtc-amount-wrap .pwtc-amount-input,
.pwtc-amount-wrap .pwtc-number-input,
.pwtc-input-wrap .pwtc-amount-input,
.pwtc-input-wrap .pwtc-number-input,
.pwtc-input-flow .pwtc-amount-input,
.pwtc-input-flow .pwtc-number-input {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    min-height: 42px;
}

.pwtc-select {
    text-align: left;
    font-weight: 500;
}

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

.pwtc-amount-wrap .pwtc-amount-input:hover,
.pwtc-amount-wrap .pwtc-amount-input:focus,
.pwtc-amount-wrap .pwtc-number-input:hover,
.pwtc-amount-wrap .pwtc-number-input:focus,
.pwtc-input-wrap .pwtc-amount-input:hover,
.pwtc-input-wrap .pwtc-amount-input:focus,
.pwtc-input-wrap .pwtc-number-input:hover,
.pwtc-input-wrap .pwtc-number-input:focus,
.pwtc-input-flow .pwtc-amount-input:hover,
.pwtc-input-flow .pwtc-amount-input:focus,
.pwtc-input-flow .pwtc-number-input:hover,
.pwtc-input-flow .pwtc-number-input:focus {
    border: 0;
    box-shadow: none;
    background: transparent;
}

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

.pwtc-hint {
    margin: 4px 0 0;
    font-size: 11px;
    line-height: 1.45;
    color: #8b847d;
}

.pwtc-btn-group {
    display: flex;
    gap: 8px;
}

.pwtc-calc-btn {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #d4af37 0%, #c69a23 100%);
    cursor: pointer;
    box-shadow: 0 2px 7px rgba(170, 142, 48, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pwtc-calc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(170, 142, 48, 0.32);
}

.pwtc-reset-btn {
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    padding: 12px 14px;
    min-width: 90px;
    font-size: 13px;
    font-weight: 600;
    color: #5d5751;
    background: #f3f1ee;
    cursor: pointer;
}

.pwtc-reset-btn:hover {
    background: #e9e5e0;
}

.pwtc-waiting {
    text-align: center;
    padding: 34px 16px;
    background: #faf9f7;
}

.pwtc-waiting-icon {
    font-size: 26px;
    color: #d4af37;
    margin-bottom: 8px;
}

.pwtc-waiting-title {
    font-size: 15px;
    font-weight: 700;
    color: #3a332c;
    margin-bottom: 6px;
}

.pwtc-waiting-desc {
    margin: 0;
    font-size: 12px;
    color: #7f766d;
    line-height: 1.5;
}

.pwtc-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.pwtc-summary-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #5f4f23;
    background: #f7ecd0;
}

.pwtc-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pwtc-summary-card {
    border: 1px solid #e8e3d9;
    border-radius: 10px;
    padding: 12px;
    background: #fcfbf9;
}

.pwtc-summary-card.is-kpi {
    grid-column: 1 / -1;
    border-color: #d7c28a;
    background: linear-gradient(180deg, #fbf4df 0%, #fcfbf9 100%);
}

.pwtc-card-label {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: #5f5953;
}

.pwtc-card-value {
    margin: 0;
    font-size: 23px;
    font-weight: 800;
    color: #2d2a26;
    line-height: 1.2;
}

.pwtc-summary-card:not(.is-kpi) .pwtc-card-value {
    font-size: 18px;
}

.pwtc-card-desc {
    margin: 6px 0 0;
    font-size: 11px;
    color: #8a837a;
    line-height: 1.4;
}

.pwtc-recommend-box {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f6f2ea;
    border: 1px solid #e8dfca;
}

.pwtc-recommend-box strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: #3c3122;
}

.pwtc-recommend-box p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #6f655b;
}

.pwtc-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.pwtc-download-btn {
    white-space: nowrap;
    font-size: 12px;
}

.pwtc-download-btn.tool-btn-excel {
    background: #59ab79;
    border-color: #59ab79;
    color: #ffffff;
}

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

.pwtc-chart-sub {
    margin: 0 0 10px;
    font-size: 12px;
    color: #7d746a;
}

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

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

.pwtc-chart-fallback {
    margin-top: 10px;
    padding: 12px;
    border: 1px dashed #d6cec0;
    border-radius: 10px;
    background: #faf8f4;
}

.pwtc-chart-fallback p {
    margin: 0 0 8px;
    font-size: 12px;
    color: #6f665e;
}

.pwtc-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.pwtc-detail-table,
.pwtc-fallback-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 12px;
}

.pwtc-detail-table th,
.pwtc-detail-table td,
.pwtc-fallback-table th,
.pwtc-fallback-table td {
    border: 1px solid #e8e3d9;
    padding: 8px;
    text-align: right;
    vertical-align: top;
}

.pwtc-detail-table th:first-child,
.pwtc-detail-table th:nth-child(2),
.pwtc-detail-table td:first-child,
.pwtc-detail-table td:nth-child(2),
.pwtc-fallback-table th:first-child,
.pwtc-fallback-table th:nth-child(2),
.pwtc-fallback-table td:first-child,
.pwtc-fallback-table td:nth-child(2) {
    text-align: center;
}

.pwtc-detail-table th:last-child,
.pwtc-detail-table td:last-child {
    text-align: left;
    min-width: 190px;
}

.pwtc-warning-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pwtc-warning-list li {
    font-size: 12px;
    color: #5c554c;
    line-height: 1.5;
}

.pwtc-disclaimer {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 12px;
    background: #faf9f7;
    border: 1px solid #e8e3d9;
    border-radius: 8px;
    font-size: 11px;
    color: #8a837a;
    line-height: 1.5;
}

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

.pwtc-date-notice {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e8e3d9;
    background: #fbfaf8;
    font-size: 12px;
    line-height: 1.5;
    color: #6e655d;
}

.pwtc-hidden {
    display: none !important;
}

@media (max-width: 900px) {
    .pwtc-main-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

    .pwtc-input-col,
    .pwtc-result-col {
        max-width: 100%;
        overflow: hidden;
    }

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

    .pwtc-chart-wrap {
        height: 260px;
    }

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

    .pwtc-detail-table,
    .pwtc-fallback-table {
        min-width: 620px;
    }
}

@media (max-width: 768px) {
    .pwtc-section,
    .pwtc-result-summary,
    .pwtc-chart-section,
    .pwtc-detail-section,
    .pwtc-warning-section {
        padding: 15px;
    }

    .pwtc-input-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

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

    .pwtc-summary-card.is-kpi {
        grid-column: auto;
    }

    .pwtc-card-value {
        font-size: 21px;
    }

    .pwtc-summary-card:not(.is-kpi) .pwtc-card-value {
        font-size: 17px;
    }

    .pwtc-chart-wrap {
        height: 230px;
    }

    .pwtc-chart-wrap canvas {
        max-height: 230px;
    }
}

@media (max-width: 480px) {
    .pwtc-section,
    .pwtc-result-summary,
    .pwtc-chart-section,
    .pwtc-detail-section,
    .pwtc-warning-section {
        padding: 12px;
    }

    .pwtc-btn-group {
        gap: 6px;
    }

    .pwtc-calc-btn,
    .pwtc-reset-btn {
        padding: 11px 12px;
        font-size: 12px;
    }

    .pwtc-unit,
    .pwtc-unit-chip {
        min-width: 48px;
        height: 40px;
        padding: 0 8px;
        font-size: 11px;
    }

    .pwtc-summary-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .pwtc-card-value,
    .pwtc-summary-card:not(.is-kpi) .pwtc-card-value {
        font-size: 17px;
    }

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

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

    .pwtc-date-notice {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pwtc-calc-btn,
    .pwtc-reset-btn,
    .pwtc-section,
    .pwtc-result-summary,
    .pwtc-chart-section,
    .pwtc-detail-section {
        transition: none !important;
    }

    .pwtc-calc-btn:hover {
        transform: none !important;
    }
}
