/**
 * Student Loan Calculator Styles
 * 학자금대출 상환 계산기 전용 스타일
 *
 * @package Zipper
 */

/* ===== 2컬럼 자체 그리드 레이아웃 ===== */
/* gift-tax-calculator 패턴 참고: 380px 1fr */
.slc-main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
}

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

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

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

.slc-section + .slc-section {
    margin-top: 14px;
}

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

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

/* ===== 탭 (일반상환/ICL) - 2개이므로 flex OK ===== */
.slc-tabs {
    display: flex;
    gap: 4px;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 3px;
}

.slc-tab {
    flex: 1;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #7a756d;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}

.slc-tab:hover {
    color: #2d2a26;
    background: rgba(255,255,255,0.5);
}

.slc-tab.active {
    color: #fff;
    background: #d4af37;
    box-shadow: 0 2px 4px rgba(212,175,55,0.3);
}

.slc-tab-content {
    display: none;
}

.slc-tab-content.active {
    display: block;
}

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

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

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

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

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

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

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

.slc-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
    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='%235f5a56' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

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

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

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

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

/* 간편 금액 버튼 */
.slc-quick-btns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-width: 100%;
}

.slc-quick-btn {
    padding: 8px 6px;
    font-size: 12px;
    font-weight: 500;
    color: #5f5a56;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.slc-quick-btn:hover {
    border-color: #d4af37;
    background: #fff;
    color: #d4af37;
}

/* 상환 방식 라디오 */
.slc-repay-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slc-repay-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.slc-repay-option:hover {
    border-color: #d4af37;
    background: #fff;
}

.slc-repay-option.active {
    border-color: #d4af37;
    background: rgba(212,175,55,0.08);
}

.slc-repay-option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #d4af37;
    cursor: pointer;
    flex-shrink: 0;
}

.slc-repay-option > label {
    flex: 1;
    font-size: 13px;
    color: #2d2a26;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.slc-repay-option .slc-repay-badge {
    font-size: 11px;
    font-weight: 600;
    color: #7a756d;
    background: rgba(122,117,109,0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ===== 버튼 ===== */
.slc-btn-group {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

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

.slc-calculate-btn:hover {
    background: linear-gradient(135deg, #c9a030, #b8922a);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(212,175,55,0.3);
}

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

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

/* ===== 결과 - 대기 영역 ===== */
.slc-waiting {
    text-align: center;
    padding: 40px 20px;
    color: #9e9a96;
}

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

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

/* ===== 결과 - 요약 카드 ===== */
.slc-result-summary {
    background: #fdfbf5;
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.slc-summary-title {
    font-size: 12px;
    color: #7a756d;
    margin-bottom: 8px;
}

.slc-summary-main {
    font-size: 36px;
    font-weight: 700;
    color: #d4af37;
    line-height: 1.2;
    margin-bottom: 4px;
}

.slc-summary-main .slc-unit {
    font-size: 18px;
    font-weight: 600;
}

.slc-summary-label {
    font-size: 13px;
    color: #5f5a56;
    margin-bottom: 16px;
}

.slc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid #e8e4dc;
    font-size: 13px;
}

.slc-summary-row-label {
    color: #7a756d;
}

.slc-summary-row-value {
    font-weight: 600;
    color: #2d2a26;
}

/* ===== 상세 카드 ===== */
.slc-detail-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.slc-detail-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
}

.slc-detail-card:hover {
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212,175,55,0.12);
}

.slc-detail-label {
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.slc-detail-label i {
    color: #d4af37;
}

.slc-detail-value {
    font-size: 24px;
    font-weight: 700;
    color: #2d2a26;
}

.slc-detail-value .slc-unit {
    font-size: 14px;
    font-weight: 500;
    color: #7a756d;
}

.slc-detail-card.highlight {
    background: linear-gradient(135deg, rgba(231,76,60,0.08) 0%, rgba(231,76,60,0.02) 100%);
    border-color: rgba(231,76,60,0.35);
}

.slc-detail-card.highlight .slc-detail-label {
    color: #e74c3c;
}

.slc-detail-card.highlight .slc-detail-label i {
    color: #e74c3c;
}

.slc-detail-card.highlight .slc-detail-value {
    color: #e74c3c;
}

/* ===== 조기상환 섹션 ===== */
.slc-prepay-section {
    background: linear-gradient(135deg, rgba(46,204,113,0.08) 0%, rgba(46,204,113,0.02) 100%);
    border: 1px solid rgba(46,204,113,0.25);
    border-radius: 12px;
    padding: 16px;
}

.slc-prepay-section .slc-section-title {
    color: #27ae60;
}

.slc-prepay-section .slc-section-title i {
    color: #27ae60;
}

.slc-prepay-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.slc-prepay-input {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slc-prepay-input label {
    font-size: 12px;
    color: #5f5a56;
}

.slc-prepay-input input {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    background: #fff;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.slc-prepay-input input:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 2px rgba(46,204,113,0.1);
}

.slc-prepay-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(46,204,113,0.1);
    border-radius: 8px;
}

.slc-prepay-label {
    font-size: 13px;
    color: #27ae60;
    font-weight: 600;
}

.slc-prepay-value {
    font-size: 20px;
    font-weight: 700;
    color: #27ae60;
}

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

.slc-donut-wrap {
    max-width: 220px;
    margin: 0 auto;
}

.slc-chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 12px;
    font-size: 13px;
    color: #5a5650;
}

.slc-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.slc-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.slc-dot-principal {
    background: #2563eb;
}

.slc-dot-interest {
    background: #dc2626;
}

/* ===== 상환 스케줄 ===== */
.slc-schedule-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

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

.slc-schedule-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.slc-download-btn:hover {
    background: #1a5c38;
}

.slc-schedule-toggle {
    font-size: 12px;
    color: #d4af37;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.slc-schedule-toggle:hover {
    background: rgba(212,175,55,0.1);
}

.slc-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 400px;
    max-width: 100%;
}

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

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

.slc-schedule-table th {
    background: #faf9f7;
    font-weight: 600;
    color: #5f5a56;
    position: sticky;
    top: 0;
    z-index: 1;
}

.slc-schedule-table th:first-child,
.slc-schedule-table td:first-child {
    text-align: center;
}

.slc-schedule-table td {
    color: #2d2a26;
}

.slc-schedule-table .total-row td {
    border-bottom: none;
    font-weight: 600;
    background: rgba(212,175,55,0.08);
    color: #d4af37;
}

.slc-schedule-table tr:hover:not(.total-row) {
    background: #faf9f7;
}

.slc-schedule-table .slc-grace-row {
    color: #a09a94;
    font-style: italic;
}

/* ===== ICL 결과 섹션 ===== */
.slc-icl-status {
    padding: 14px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.slc-icl-status i {
    font-size: 20px;
}

.slc-icl-status.slc-status-above {
    background: linear-gradient(135deg, rgba(231,76,60,0.08), rgba(231,76,60,0.02));
    border: 1px solid rgba(231,76,60,0.3);
    color: #e74c3c;
}

.slc-icl-status.slc-status-below {
    background: linear-gradient(135deg, rgba(46,204,113,0.08), rgba(46,204,113,0.02));
    border: 1px solid rgba(46,204,113,0.3);
    color: #27ae60;
}

.slc-icl-result-summary {
    background: #fdfbf5;
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.slc-icl-main-label {
    font-size: 12px;
    color: #7a756d;
    margin-bottom: 8px;
}

.slc-icl-main-value {
    font-size: 36px;
    font-weight: 700;
    color: #d4af37;
    line-height: 1.2;
    margin-bottom: 4px;
}

.slc-icl-main-value .slc-unit {
    font-size: 18px;
    font-weight: 600;
}

.slc-icl-sub-value {
    font-size: 14px;
    color: #5f5a56;
    margin-bottom: 16px;
}

.slc-icl-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid #e8e4dc;
    font-size: 13px;
}

.slc-icl-info-label {
    color: #7a756d;
}

.slc-icl-info-value {
    font-weight: 600;
    color: #2d2a26;
}

/* ICL 상환율 테이블 */
.slc-icl-rate-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
}

.slc-icl-rate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.slc-icl-rate-table th,
.slc-icl-rate-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #f0ede8;
}

.slc-icl-rate-table th {
    background: #faf9f7;
    font-weight: 600;
    color: #5f5a56;
}

.slc-icl-rate-table td {
    color: #2d2a26;
}

.slc-icl-rate-table tr.slc-current-bracket {
    background: rgba(212,175,55,0.08);
}

.slc-icl-rate-table tr.slc-current-bracket td {
    font-weight: 600;
    color: #d4af37;
}

/* ICL 상환 예상 */
.slc-icl-projection {
    background: linear-gradient(135deg, rgba(52,152,219,0.08), rgba(52,152,219,0.02));
    border: 1px solid rgba(52,152,219,0.25);
    border-radius: 12px;
    padding: 16px;
}

.slc-icl-projection .slc-section-title {
    color: #3498db;
}

.slc-icl-projection .slc-section-title i {
    color: #3498db;
}

.slc-icl-proj-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.slc-icl-proj-card {
    text-align: center;
    padding: 12px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
}

.slc-icl-proj-label {
    font-size: 12px;
    color: #5f5a56;
    margin-bottom: 4px;
}

.slc-icl-proj-value {
    font-size: 22px;
    font-weight: 700;
    color: #3498db;
}

.slc-icl-proj-value .slc-unit {
    font-size: 13px;
    font-weight: 500;
}

/* ICL 자발적 상환 비교 */
.slc-icl-voluntary {
    background: linear-gradient(135deg, rgba(46,204,113,0.08), rgba(46,204,113,0.02));
    border: 1px solid rgba(46,204,113,0.25);
    border-radius: 12px;
    padding: 16px;
}

.slc-icl-voluntary .slc-section-title {
    color: #27ae60;
}

.slc-icl-voluntary .slc-section-title i {
    color: #27ae60;
}

.slc-icl-vol-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.slc-icl-vol-card {
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.slc-icl-vol-card.slc-icl-vol-before {
    background: rgba(231,76,60,0.06);
    border: 1px solid rgba(231,76,60,0.2);
}

.slc-icl-vol-card.slc-icl-vol-after {
    background: rgba(46,204,113,0.06);
    border: 1px solid rgba(46,204,113,0.2);
}

.slc-icl-vol-label {
    font-size: 12px;
    color: #5f5a56;
    margin-bottom: 4px;
}

.slc-icl-vol-value {
    font-size: 18px;
    font-weight: 700;
}

.slc-icl-vol-before .slc-icl-vol-value {
    color: #e74c3c;
}

.slc-icl-vol-after .slc-icl-vol-value {
    color: #27ae60;
}

.slc-icl-vol-savings {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(46,204,113,0.1);
    border-radius: 8px;
}

.slc-icl-vol-savings-label {
    font-size: 13px;
    color: #27ae60;
    font-weight: 600;
}

.slc-icl-vol-savings-value {
    font-size: 18px;
    font-weight: 700;
    color: #27ae60;
}

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

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

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

/* ===== 반응형 - 태블릿 ===== */
@media (max-width: 900px) {
    .slc-main-layout {
        grid-template-columns: 1fr;
    }

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

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

    .tool-layout-input {
        max-width: 100%;
        overflow: hidden;
    }

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

    .slc-prepay-input input {
        width: 100% !important;
        max-width: 100% !important;
    }

    .slc-prepay-inputs {
        grid-template-columns: 1fr;
    }

    .slc-icl-proj-cards,
    .slc-icl-vol-comparison {
        grid-template-columns: 1fr 1fr;
    }

    .slc-summary-main,
    .slc-icl-main-value {
        font-size: 28px;
    }
}

/* ===== 반응형 - 모바일 ===== */
@media (max-width: 768px) {
    .slc-result-summary,
    .slc-icl-result-summary {
        padding: 20px 16px;
    }

    .slc-summary-main,
    .slc-icl-main-value {
        font-size: 28px;
    }

    .slc-detail-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .slc-detail-card {
        padding: 14px 10px;
    }

    .slc-detail-value {
        font-size: 20px;
    }
}

/* ===== 반응형 - 작은 모바일 ===== */
@media (max-width: 480px) {
    .tool-section,
    .tool-layout-split,
    .tool-layout-input,
    .tool-layout-result {
        max-width: 100%;
        overflow-x: hidden;
    }

    .slc-section {
        padding: 12px;
    }

    .slc-input-row {
        grid-template-columns: 1fr;
    }

    .slc-quick-btns {
        grid-template-columns: repeat(2, 1fr);
    }

    .slc-summary-main,
    .slc-icl-main-value {
        font-size: 24px;
    }

    .slc-detail-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .slc-detail-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        padding: 14px;
    }

    .slc-detail-label {
        justify-content: flex-start;
        margin-bottom: 0;
    }

    .slc-detail-value {
        font-size: 22px;
    }

    .slc-schedule-table {
        font-size: 11px;
    }

    .slc-schedule-table th,
    .slc-schedule-table td {
        padding: 8px 4px;
    }

    .slc-icl-proj-cards {
        grid-template-columns: 1fr;
    }

    .slc-icl-vol-comparison {
        grid-template-columns: 1fr;
    }

    .slc-icl-rate-table {
        font-size: 11px;
    }
}

/* 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;
}

