/**
 * Retirement Pension Early Withdrawal Tax Calculator Styles
 * 퇴직연금(IRP·DC·DB) 중도인출 세금 계산기
 */

.rpetc-tool-intro {
    margin-bottom: 18px;
}

.rpetc-tool-lead {
    margin: 8px 0 0;
    color: #625b53;
    font-size: 14px;
    line-height: 1.6;
}

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

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

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

.rpetc-section,
.rpetc-result-hero {
    background: #fff;
    border: 1px solid #e8e2d7;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.05);
}

.rpetc-result-hero {
    background: linear-gradient(180deg, #fffefc 0%, #fbf7ef 100%);
}

.rpetc-input-section,
.rpetc-table-section,
.rpetc-warning-section {
    min-width: 0;
}

.rpetc-section-title,
.rpetc-support-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #2d2a26;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.rpetc-section-title i,
.rpetc-support-title i {
    color: #c79d2f;
}

.rpetc-input-group {
    margin-bottom: 12px;
}

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

.rpetc-input-row,
.rpetc-conditional-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.rpetc-input-label {
    display: block;
    margin-bottom: 6px;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.rpetc-label-hint {
    color: #958c82;
    font-weight: 500;
    font-size: 11px;
}

.rpetc-input-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0;
    border: 1px solid #ddd7cb;
    border-radius: 10px;
    background: #fbfaf7;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.rpetc-input-flow:hover {
    border-color: #d3c06b;
}

.rpetc-input-flow:focus-within {
    border-color: #c79d2f;
    box-shadow: 0 0 0 3px rgba(199, 157, 47, 0.12);
    background: #fff;
}

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

.rpetc-amount-input,
.rpetc-number-input {
    text-align: right;
    font-weight: 700;
}

.rpetc-input-flow .rpetc-amount-input,
.rpetc-input-flow .rpetc-number-input {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.rpetc-select {
    font-weight: 500;
}

.rpetc-select:focus,
.rpetc-amount-input:focus,
.rpetc-number-input:focus {
    outline: none;
    border-color: #c79d2f;
    box-shadow: 0 0 0 3px rgba(199, 157, 47, 0.12);
    background: #fff;
}

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

.rpetc-unit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 44px;
    padding: 0 12px;
    border-left: 1px solid #e5dece;
    background: linear-gradient(180deg, #fdfbf7 0%, #f1ece0 100%);
    color: #776f64;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

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

.rpetc-hint,
.rpetc-support-body {
    margin: 0;
    color: #73695f;
    font-size: 12px;
    line-height: 1.6;
}

.rpetc-hint-box {
    border-radius: 10px;
    background: #faf5e9;
    color: #6f624d;
    padding: 11px 12px;
    font-size: 12px;
    line-height: 1.55;
}

.rpetc-check-row {
    display: flex;
    gap: 8px;
    margin: 4px 0 10px;
}

.rpetc-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #5f5a56;
    font-size: 12px;
    line-height: 1.5;
}

.rpetc-checkbox input {
    margin-top: 2px;
}

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

.rpetc-calc-btn,
.rpetc-reset-btn {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.rpetc-calc-btn {
    flex: 1;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #caa43c 0%, #af8424 100%);
    box-shadow: 0 6px 18px rgba(175, 132, 36, 0.24);
}

.rpetc-calc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(175, 132, 36, 0.28);
}

.rpetc-reset-btn {
    min-width: 96px;
    border: 1px solid #ddd7cb;
    color: #5d5751;
    background: #f3f0eb;
}

.rpetc-reset-btn:hover {
    background: #ebe5db;
}

.rpetc-waiting-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rpetc-waiting-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fbf5e5;
    color: #c79d2f;
    font-size: 24px;
    flex-shrink: 0;
}

.rpetc-waiting-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rpetc-waiting-copy strong {
    color: #2d2a26;
    font-size: 14px;
}

.rpetc-waiting-copy p {
    margin: 0;
    color: #70665e;
    font-size: 13px;
    line-height: 1.55;
}

.rpetc-hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.rpetc-hero-title-wrap {
    min-width: 0;
    flex: 1;
}

.rpetc-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f2ecdf;
    color: #7e6731;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.rpetc-status-pill.is-ok {
    background: #ecf6ef;
    color: #216547;
}

.rpetc-status-pill.is-caution {
    background: #fff3e2;
    color: #9b5e0d;
}

.rpetc-status-pill.is-blocked {
    background: #fbe9e7;
    color: #9b3026;
}

.rpetc-hero-title {
    margin: 0;
    color: #2d2a26;
    font-size: 20px;
    line-height: 1.3;
}

.rpetc-hero-desc {
    margin: 6px 0 0;
    color: #70655c;
    font-size: 13px;
    line-height: 1.55;
}

.rpetc-hero-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.rpetc-kpi-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #ebe1cf;
    background: rgba(255, 255, 255, 0.78);
}

.rpetc-kpi-card.is-main {
    background: linear-gradient(180deg, #fff7e6 0%, #fffdfa 100%);
    border-color: #e7d5ad;
}

.rpetc-kpi-label,
.rpetc-kpi-note {
    color: #776c62;
    font-size: 12px;
    line-height: 1.45;
}

.rpetc-kpi-value {
    color: #2d2a26;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
}

.rpetc-support-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rpetc-support-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: 16px;
    border: 1px solid #ece4d7;
    border-radius: 12px;
    background: #fff;
}

.rpetc-breakdown-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rpetc-breakdown-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rpetc-breakdown-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 700;
}

.rpetc-breakdown-bar {
    display: flex;
    gap: 4px;
    min-height: 18px;
    border-radius: 999px;
    background: #f3eee5;
    padding: 4px;
    overflow: hidden;
}

.rpetc-bar-segment {
    min-width: 0;
    border-radius: 999px;
}

.rpetc-bar-taxfree {
    background: #d8cdb8;
}

.rpetc-bar-retirement {
    background: #c89b34;
}

.rpetc-bar-deductible {
    background: #5c88b5;
}

.rpetc-bar-earnings {
    background: #5eaf87;
}

.rpetc-bar-net {
    background: #2f7d57;
}

.rpetc-bar-tax {
    background: #d3644c;
}

.rpetc-breakdown-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.rpetc-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #625a51;
    font-size: 12px;
    line-height: 1.45;
}

.rpetc-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rpetc-legend-text {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.rpetc-table-wrap {
    overflow-x: auto;
}

.rpetc-data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.rpetc-data-table th,
.rpetc-data-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #eee6d9;
    text-align: left;
    vertical-align: top;
    font-size: 12px;
    line-height: 1.55;
}

.rpetc-data-table th {
    color: #5f5a56;
    background: #fbfaf7;
    font-weight: 700;
}

.rpetc-data-table td:last-child {
    min-width: 180px;
}

.rpetc-warning-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
    color: #6a6158;
    font-size: 12px;
    line-height: 1.6;
}

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

@media (max-width: 1080px) {
    .rpetc-main-layout {
        grid-template-columns: 1fr;
    }

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

    .rpetc-hero-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .rpetc-section,
    .rpetc-result-hero {
        padding: 16px;
        border-radius: 12px;
    }

    .rpetc-input-row,
    .rpetc-conditional-row,
    .rpetc-support-grid,
    .rpetc-breakdown-legend,
    .rpetc-hero-grid {
        grid-template-columns: 1fr;
    }

    .rpetc-hero-head,
    .rpetc-breakdown-label-row,
    .rpetc-legend-text {
        align-items: flex-start;
        flex-direction: column;
    }

    .rpetc-kpi-value {
        font-size: 20px;
    }

    .rpetc-btn-group {
        flex-direction: column;
    }

    .rpetc-reset-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .rpetc-tool-lead,
    .rpetc-waiting-copy p,
    .rpetc-hero-desc,
    .rpetc-support-body {
        font-size: 12px;
    }

    .rpetc-section-title,
    .rpetc-support-title {
        font-size: 13px;
    }

    .rpetc-kpi-value {
        font-size: 18px;
    }

    .rpetc-amount-input,
    .rpetc-number-input,
    .rpetc-select,
    .rpetc-calc-btn,
    .rpetc-reset-btn {
        font-size: 13px;
    }

    .rpetc-unit-chip {
        min-width: 50px;
        padding: 0 10px;
    }
}
