/**
 * 국민내일배움카드 자비부담금 계산기 (F2 / V3)
 */

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

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

.nbc-input-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    position: sticky;
    top: 20px;
}

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

.nbc-section,
.nbc-result-summary,
.nbc-chart-section,
.nbc-table-section,
.nbc-apply-section {
    border: 1px solid #e7e2dd;
    border-radius: 12px;
    background: #ffffff;
    padding: 18px;
    box-shadow: 0 1px 5px rgba(31, 24, 18, 0.06);
}

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

.nbc-section-title i,
.nbc-block-title i {
    color: #d67e5d;
}

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

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

.nbc-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #60574f;
}

.nbc-select,
.nbc-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd5cc;
    border-radius: 8px;
    background: #fcfbf9;
    color: #2d2a26;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nbc-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 10px 34px 10px 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%236b635b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.nbc-input {
    padding: 10px 12px;
}

.nbc-input[type="number"] {
    text-align: right;
}

#nbcTrainingCost,
#nbcUsedAmount {
    text-align: right;
    font-weight: 700;
}

.nbc-select:hover,
.nbc-input:hover {
    border-color: #d7a18b;
}

.nbc-select:focus,
.nbc-input:focus {
    outline: none;
    border-color: #cf7c5a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(207, 124, 90, 0.13);
}

.nbc-radio-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.nbc-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ddd5cc;
    border-radius: 8px;
    padding: 10px 12px;
    background: #faf8f5;
    font-size: 13px;
    color: #4f4841;
    cursor: pointer;
}

.nbc-radio-label:has(input:checked) {
    border-color: #cf7c5a;
    background: #fff3ed;
    color: #7f452e;
}

.nbc-radio-label input {
    margin: 0;
}

.nbc-mode-hint,
.nbc-hint,
.nbc-summary-note,
.nbc-block-sub,
.nbc-apply-section p {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.55;
    color: #7a7068;
}

.nbc-amount-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.nbc-unit-badge {
    position: static;
    white-space: nowrap;
    font-size: 12px;
    color: #93887f;
}

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

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

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

.nbc-btn {
    border: 0;
    border-radius: 10px;
    padding: 12px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nbc-btn-primary {
    flex: 1;
    color: #ffffff;
    background: linear-gradient(135deg, #e89574 0%, #d9734e 100%);
    box-shadow: 0 2px 8px rgba(210, 113, 77, 0.28);
}

.nbc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(210, 113, 77, 0.35);
}

.nbc-btn-ghost {
    color: #5b544d;
    background: #f5f1ec;
    border: 1px solid #ddd5cc;
}

.nbc-btn-ghost:hover {
    background: #ffffff;
    border-color: #ceb8ab;
}

.nbc-waiting {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    color: #8a695a;
    font-size: 13px;
}

.nbc-waiting i {
    color: #d67e5d;
    font-size: 18px;
    flex-shrink: 0;
}

.nbc-waiting p {
    margin: 0;
    line-height: 1.5;
}

.nbc-result-summary {
    background: linear-gradient(135deg, #fff9f6 0%, #fff1eb 100%);
}

.nbc-mode-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(213, 118, 84, 0.18);
    color: #8b4b34;
    font-size: 12px;
    font-weight: 700;
}

.nbc-summary-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.45;
    color: #2d2a26;
}

.nbc-summary-note {
    margin-top: 8px;
}

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

.nbc-summary-card {
    margin: 0;
    border: 1px solid #efdacf;
    border-radius: 10px;
    padding: 12px;
    background: #ffffff;
}

.nbc-summary-card h3 {
    margin: 0;
    font-size: 11px;
    color: #7b6f67;
    font-weight: 600;
}

.nbc-summary-card p {
    margin: 6px 0 0;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #2d2a26;
}

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

.nbc-block-sub {
    margin: 0;
}

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

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

.nbc-chart-fallback {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 12px;
    color: #8a6b5f;
}

.nbc-chart-fallback-table-wrap {
    margin-top: 10px;
}

.nbc-mini-table,
.nbc-table {
    width: 100%;
    border-collapse: collapse;
}

.nbc-mini-table th,
.nbc-mini-table td,
.nbc-table th,
.nbc-table td {
    border: 1px solid #ece3dc;
    padding: 9px 10px;
    font-size: 12px;
    line-height: 1.45;
    vertical-align: top;
}

.nbc-mini-table th,
.nbc-table th {
    background: #f7f3ef;
    color: #4f4740;
    font-weight: 700;
}

.nbc-mini-table td:last-child,
.nbc-table td:last-child {
    text-align: right;
    font-weight: 700;
    color: #2d2a26;
}

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

.nbc-table {
    min-width: 680px;
}

.nbc-empty-row td {
    text-align: center !important;
    color: #8b7f76;
    font-weight: 500;
}

.nbc-download-btn {
    white-space: nowrap;
}

.tool-btn.tool-btn-excel {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #4f9f70;
    background: #59ab79;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(79, 159, 112, 0.25);
}

.tool-btn.tool-btn-excel:hover {
    background: #4f9f70;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 159, 112, 0.32);
}

.tool-btn.tool-btn-excel:disabled,
.nbc-download-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.nbc-apply-list {
    margin: 10px 0 0;
    padding-left: 18px;
    display: grid;
    gap: 7px;
}

.nbc-apply-list a {
    color: #2f6fab;
    text-decoration: none;
}

.nbc-apply-list a:hover {
    text-decoration: underline;
}

.nbc-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #f0ddd2;
    background: #fff8f3;
    color: #7d6256;
    font-size: 12px;
    line-height: 1.55;
}

.nbc-disclaimer i {
    color: #cb7a58;
    margin-top: 1px;
}

.nbc-date-notice {
    margin: 8px 0 12px;
    padding: 10px 12px;
    border-left: 4px solid #cf7c5a;
    background: #fff4ee;
    color: #6c564b;
    font-size: 12px;
    line-height: 1.6;
}

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

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

    .nbc-table {
        min-width: 620px;
    }
}

@media (max-width: 768px) {
    .nbc-section,
    .nbc-result-summary,
    .nbc-chart-section,
    .nbc-table-section,
    .nbc-apply-section {
        padding: 15px;
        border-radius: 10px;
    }

    .nbc-radio-group,
    .nbc-grid-2,
    .nbc-summary-grid {
        grid-template-columns: 1fr;
    }

    .nbc-summary-card p {
        font-size: 18px;
    }

    .nbc-chart-wrap {
        height: 250px;
    }

    .nbc-chart-wrap canvas {
        max-height: 250px;
    }

    .nbc-table {
        min-width: 560px;
    }
}

@media (max-width: 480px) {
    .nbc-main-layout {
        gap: 14px;
    }

    .nbc-section,
    .nbc-result-summary,
    .nbc-chart-section,
    .nbc-table-section,
    .nbc-apply-section {
        padding: 13px;
    }

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

    .nbc-btn {
        width: 100%;
    }

    .nbc-summary-title {
        font-size: 16px;
    }

    .nbc-summary-card p {
        font-size: 17px;
    }

    .nbc-chart-wrap {
        height: 220px;
    }

    .nbc-chart-wrap canvas {
        max-height: 220px;
    }

    .nbc-block-head {
        align-items: flex-start;
    }

    .nbc-table {
        min-width: 500px;
    }

    .tool-btn.tool-btn-excel {
        width: 100%;
        justify-content: center;
    }
}
