/**
 * 401(k) Calculator Styles
 * 401(k) 계산기 전용 스타일
 *
 * @package Zipper
 */

.k401c-hidden,
.k401c-waiting[hidden] {
    display: none !important;
}

.k401c-intro {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
}

.k401c-lead {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #5f5a56;
}

.k401c-mode-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-top: 2px;
}

.k401c-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e8e4dc;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.k401c-mode-badge i {
    color: #8a6500;
}

.k401c-mode-badge.is-accent {
    border-color: #eadfb8;
    background: linear-gradient(135deg, #fffaf0 0%, #f8f0d8 100%);
    color: #7a5d18;
    box-shadow: 0 3px 8px rgba(212, 175, 55, 0.10);
}

.k401c-mode-badge.is-accent i {
    color: #d4af37;
}

#k401cCalculator .tool-layout-split {
    grid-template-columns: 350px minmax(0, 1fr);
    margin-top: 0;
}

#k401cCalculator {
    padding: 18px;
}

#k401cCalculator .tool-layout-input {
    gap: 8px;
}

#k401cResultCol {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.k401c-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    transition: box-shadow 0.2s ease;
}

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

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

.k401c-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
}

.k401c-section-title i,
.k401c-assumption-title i {
    color: #d4af37;
}

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

.k401c-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 100%;
    box-sizing: border-box;
}

.k401c-input-label {
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
}

.k401c-inline-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
}

.k401c-money-input,
.k401c-number-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 14px;
    color: #2d2a26;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.k401c-money-input {
    font-weight: 600;
    text-align: right;
}

.k401c-number-input {
    font-weight: 500;
    text-align: center;
}

.k401c-money-input:hover,
.k401c-number-input:hover {
    border-color: #d4c67a;
}

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

.k401c-money-input::placeholder,
.k401c-number-input::placeholder {
    color: #c4c0bc;
}

.k401c-unit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.k401c-money-note,
.k401c-input-hint {
    font-size: 12px;
    line-height: 1.45;
    color: #7a756d;
}

.k401c-money-note {
    color: #b58300;
}

.k401c-assumption-box {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #eadfb8;
    background: #fffaf0;
}

.k401c-assumption-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #7a5d18;
}

.k401c-assumption-list,
.k401c-tip-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    color: #5f5a56;
    font-size: 12px;
    line-height: 1.45;
}

.k401c-preset-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.k401c-preset-btn {
    padding: 7px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 999px;
    background: #fff;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.k401c-preset-btn:hover,
.k401c-preset-btn.is-active {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
    color: #8a6500;
}

.k401c-btn-group {
    display: flex;
    gap: 6px;
}

.k401c-btn-group .tool-btn {
    flex: 1 1 0;
}

.k401c-tip-section {
    background: #fffdf9;
}

.k401c-waiting {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #eadfb8;
    background: #fffaf0;
    color: #7a5d18;
}

.k401c-waiting i {
    color: #d4af37;
    font-size: 18px;
    margin-top: 2px;
}

.k401c-waiting p {
    margin: 0;
    line-height: 1.6;
}

.k401c-result-hero {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #eadfb8;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.14);
}

.k401c-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.k401c-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.k401c-status-badge.is-valid {
    background: rgba(70, 180, 80, 0.12);
    color: #267237;
}

.k401c-status-badge.is-neutral {
    background: rgba(212, 175, 55, 0.14);
    color: #8a6500;
}

.k401c-status-badge.is-warning {
    background: rgba(255, 185, 0, 0.16);
    color: #8a6500;
}

.k401c-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #5f5a56;
    cursor: pointer;
    transition: all 0.2s ease;
}

.k401c-copy-btn:hover {
    border-color: #d4af37;
    color: #8a6500;
    transform: translateY(-1px);
}

.k401c-hero-expression {
    font-size: 14px;
    font-weight: 700;
    color: #8a6500;
}

.k401c-hero-value {
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.05;
    color: #2d2a26;
    word-break: break-word;
}

.k401c-hero-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #7a756d;
    text-transform: uppercase;
}

.k401c-hero-summary {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: #4c4742;
}

.k401c-formula-box {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(212, 175, 55, 0.22);
    font-size: 12px;
    line-height: 1.5;
    color: #5f5a56;
}

.k401c-kpi-grid,
.k401c-cap-grid,
.k401c-composition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.k401c-kpi-card,
.k401c-cap-card,
.k401c-composition-card {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e8e4dc;
    background: #fff;
}

.k401c-kpi-label,
.k401c-cap-label,
.k401c-composition-label {
    font-size: 12px;
    font-weight: 700;
    color: #7a756d;
}

.k401c-kpi-value,
.k401c-cap-value,
.k401c-composition-value {
    font-size: 18px;
    font-weight: 800;
    color: #2d2a26;
    line-height: 1.2;
    word-break: break-word;
}

.k401c-cap-sub {
    font-size: 12px;
    line-height: 1.5;
    color: #7a756d;
}

.k401c-chart-wrap {
    position: relative;
    width: 100%;
    height: 240px;
}

.k401c-chart-wrap--compact {
    height: 210px;
}

.k401c-chart-wrap canvas {
    width: 100% !important;
    max-width: 100%;
}

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

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

.k401c-schedule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

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

.k401c-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 12px;
    color: #2d2a26;
}

.k401c-table th,
.k401c-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee8dd;
    text-align: right;
    white-space: nowrap;
}

.k401c-table th:first-child,
.k401c-table td:first-child {
    text-align: left;
}

.k401c-table thead th {
    position: sticky;
    top: 0;
    background: #faf9f7;
    color: #5f5a56;
    font-weight: 700;
}

.k401c-table-empty {
    text-align: center !important;
    color: #9e9a96;
}

.k401c-table tbody tr:hover {
    background: #fcfaf5;
}

@media (max-width: 900px) {
    .k401c-input-row,
    .k401c-kpi-grid,
    .k401c-cap-grid,
    .k401c-composition-grid {
        grid-template-columns: 1fr;
    }

    .k401c-inline-input {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .k401c-money-input,
    .k401c-number-input {
        width: 100% !important;
        max-width: 100% !important;
    }

    .k401c-schedule-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .k401c-chart-wrap,
    .k401c-chart-wrap--compact {
        height: 220px;
    }

    .k401c-hero-value {
        font-size: 26px;
    }

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

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

    .k401c-section,
    .k401c-result-hero,
    .k401c-kpi-card,
    .k401c-cap-card,
    .k401c-composition-card {
        padding: 16px;
    }

    .k401c-inline-input {
        grid-template-columns: 1fr;
    }

    .k401c-unit-chip {
        justify-self: start;
    }

    .k401c-chart-wrap,
    .k401c-chart-wrap--compact {
        height: 200px;
    }
}
