/**
 * Severance Pay Calculator Styles
 * 퇴직금 계산기 전용 스타일
 *
 * @package Zipper
 */

/* ===== 2컬럼 레이아웃 (데스크탑) ===== */
.spc-main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
}

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

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

/* ===== 탭 (간편/상세) ===== */
.spc-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 14px;
}

.spc-tab {
    padding: 9px 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9e9a96;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.spc-tab:hover {
    color: #5f5a56;
}

.spc-tab.active {
    background: linear-gradient(135deg, #d4af37, #c9a030);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(212, 175, 55, 0.3);
}

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

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

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

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

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

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

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

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

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

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

.spc-date-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

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

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

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

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

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

/* ===== 입력 행 (날짜 나란히 배치) ===== */
.spc-input-row {
    display: flex;
    gap: 10px;
}

.spc-input-row .spc-input-group {
    flex: 1;
    min-width: 0;
}

/* ===== 패널 (탭별 표시/숨김) ===== */
.spc-detail-panel,
.spc-simple-panel {
    /* controlled by JS via spc-hidden class */
}

/* ===== 버튼 ===== */
.spc-btn-group {
    display: flex;
    gap: 8px;
}

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

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

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

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

/* ===== 재직기간 정보 ===== */
.spc-service-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
    border-radius: 8px;
    font-size: 13px;
    color: #5f5a56;
    margin-top: 8px;
}

.spc-service-info i {
    color: #d4af37;
    font-size: 14px;
    flex-shrink: 0;
}

.spc-service-info strong {
    color: #2d2a26;
    font-weight: 600;
}

.spc-service-warning {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #fff5f5;
    border: 1px solid #ffdcdc;
    border-radius: 6px;
    font-size: 11px;
    color: #e74c3c;
    margin-top: 6px;
}

.spc-service-warning i {
    flex-shrink: 0;
}

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

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

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

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

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

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

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

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

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

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

/* ===== 결과 - 계산 흐름 ===== */
.spc-flow-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

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

.spc-flow-title i {
    color: #d4af37;
}

.spc-flow-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.spc-flow-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.spc-flow-step:nth-child(odd) {
    background: #faf9f7;
}

.spc-flow-step-label {
    color: #5f5a56;
    display: flex;
    align-items: center;
    gap: 6px;
}

.spc-flow-step-label .spc-flow-op {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.spc-flow-op-minus {
    background: #fff0f0;
    color: #e74c3c;
}

.spc-flow-op-equals {
    background: #f0f7ff;
    color: #3498db;
}

.spc-flow-op-multiply {
    background: #fdf5e6;
    color: #d4af37;
}

.spc-flow-op-plus {
    background: #f0fff0;
    color: #27ae60;
}

.spc-flow-op-arrow {
    background: #f3f1ee;
    color: #7a756d;
}

.spc-flow-op-divide {
    background: #f5f0ff;
    color: #8e44ad;
}

.spc-flow-step-value {
    font-weight: 600;
    color: #2d2a26;
    text-align: right;
}

.spc-flow-step.spc-flow-highlight {
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
}

.spc-flow-step.spc-flow-highlight .spc-flow-step-value {
    color: #d4af37;
    font-size: 15px;
}

/* ===== 결과 - 세율 구간 시각화 ===== */
.spc-bracket-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

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

.spc-bracket-title i {
    color: #d4af37;
}

.spc-bracket-chart {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.spc-bracket-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spc-bracket-rate {
    width: 36px;
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
    text-align: right;
    flex-shrink: 0;
}

.spc-bracket-bar-wrap {
    flex: 1;
    height: 24px;
    background: #f5f3f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.spc-bracket-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 0;
}

.spc-bracket-range {
    font-size: 10px;
    color: #9e9a96;
    width: 90px;
    flex-shrink: 0;
    text-align: right;
}

.spc-bracket-row.spc-bracket-active .spc-bracket-rate {
    color: #d4af37;
    font-weight: 700;
}

.spc-bracket-row.spc-bracket-active .spc-bracket-fill {
    position: relative;
}

.spc-bracket-row.spc-bracket-active .spc-bracket-fill::after {
    content: '\25C0 \B0B4 \AD6C\AC04';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.spc-bracket-colors-6  { background: #e8f5e9; }
.spc-bracket-colors-15 { background: #c8e6c9; }
.spc-bracket-colors-24 { background: #fff9c4; }
.spc-bracket-colors-35 { background: #ffe0b2; }
.spc-bracket-colors-38 { background: #ffccbc; }
.spc-bracket-colors-40 { background: #ffab91; }
.spc-bracket-colors-42 { background: #ef9a9a; }
.spc-bracket-colors-45 { background: #e57373; }

.spc-effective-rate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 10px 12px;
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
    border-radius: 6px;
}

.spc-effective-rate-label {
    font-size: 13px;
    color: #5f5a56;
}

.spc-effective-rate-value {
    font-size: 18px;
    font-weight: 700;
    color: #d4af37;
}

/* ===== IRP 절세 안내 ===== */
.spc-irp-section {
    background: #f0f7ff;
    border: 1px solid #d0e4f7;
    border-radius: 12px;
    padding: 16px;
}

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

.spc-irp-title i {
    color: #3498db;
}

.spc-irp-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spc-irp-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12px;
    line-height: 1.5;
    color: #5f5a56;
}

.spc-irp-item i {
    font-size: 14px;
    color: #3498db;
    flex-shrink: 0;
    margin-top: 2px;
}

.spc-irp-item strong {
    color: #2d2a26;
}

.spc-irp-highlight {
    margin-top: 10px;
    padding: 10px 12px;
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.spc-irp-highlight-label {
    color: #5f5a56;
    display: flex;
    align-items: center;
    gap: 6px;
}

.spc-irp-highlight-label i {
    color: #d4af37;
}

.spc-irp-highlight-value {
    font-weight: 700;
    color: #d4af37;
    font-size: 16px;
}

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

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

.spc-chart-title i {
    color: #d4af37;
}

.spc-chart-wrap {
    max-height: 300px;
    position: relative;
}

.spc-chart-wrap canvas {
    width: 100% !important;
    max-height: 300px;
}

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

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

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

/* ===== 반응형 (900px 이하) ===== */
@media (max-width: 900px) {
    .spc-main-layout {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .spc-bracket-range {
        width: 70px;
        font-size: 9px;
    }

    .spc-summary-main {
        font-size: 26px;
    }
}

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

    .spc-section {
        padding: 12px;
    }

    .spc-result-summary {
        padding: 16px;
    }

    .spc-summary-main {
        font-size: 22px;
    }

    .spc-bracket-row {
        gap: 4px;
    }

    .spc-bracket-range {
        display: none;
    }

    .spc-input-row {
        flex-direction: column;
    }

    .spc-irp-section {
        padding: 12px;
    }

    .spc-chart-section {
        padding: 12px;
    }

    .spc-flow-section {
        padding: 12px;
    }
}
