/* Salary Calculator Specific Styles */

/* Slider tooltip positioning */
#monthly-tooltip,
#annual-tooltip {
    left: 30%;
}

/* Hide annual salary group by default */
#annual-salary-group {
    display: none;
}

/* Show annual salary group when annual is selected */
.salary-type-annual #annual-salary-group {
    display: block;
}

.salary-type-annual #monthly-salary-group {
    display: none;
}

/* Stepper tooltip centered */
.calc-stepper-container {
    position: relative;
    padding-top: 40px;
}

.calc-stepper-tooltip {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* ========================================
   RESULT SECTION - Info Card
   ======================================== */
.salary-result-info-card {
    background: #F8FAF9;
    border: 1px solid #E8E8E8;
}

.salary-result-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.salary-result-info-icon {
    color: #319C80;
    font-size: 20px;
    line-height: 1;
}

.salary-result-info-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.salary-result-info-title {
    font-size: 15px;
    font-weight: 600;
    color: #319C80;
}

.salary-result-info-desc {
    font-size: 14px;
    color: #666;
}

/* ========================================
   RESULT SECTION - Summary Grid
   ======================================== */
.salary-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 600px) {
    .salary-summary-grid {
        grid-template-columns: 1fr;
    }
}

.salary-summary-column {
    padding: 20px;
    border: 1px solid #E8E8E8;
    border-radius: 8px;
}

.salary-summary-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #E8E8E8;
}

.salary-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.salary-summary-row-highlight {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #E8E8E8;
}

.salary-summary-label {
    font-size: 14px;
    color: #666;
}

.salary-summary-label-green {
    color: #319C80;
    font-weight: 600;
}

.salary-summary-value {
    font-size: 14px;
    color: #333;
    text-align: right;
}

.salary-summary-value-bold {
    font-weight: 700;
}

.salary-summary-value-red {
    color: #E74C3C;
    font-weight: 600;
}

.salary-summary-value-green {
    color: #319C80;
    font-weight: 700;
    font-size: 16px;
}

/* ========================================
   RESULT SECTION - Deduction Table
   ======================================== */
.salary-deduction-table-wrapper {
    overflow-x: auto;
}

.salary-deduction-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.salary-deduction-table th,
.salary-deduction-table td {
    padding: 14px 12px;
    text-align: right;
    border-bottom: 1px solid #F0F0F0;
}

.salary-deduction-table th:first-child,
.salary-deduction-table td:first-child {
    text-align: left;
}

.salary-deduction-table thead th {
    font-weight: 600;
    color: #666;
    font-size: 13px;
    background: #FAFAFA;
}

.salary-deduction-table tbody td {
    color: #333;
}

.salary-deduction-table tbody td:first-child {
    color: #555;
}

.salary-deduction-total-row {
    background: #F8FAF9;
}

.salary-deduction-total-row td {
    font-weight: 700;
    color: #222 !important;
    border-bottom: none;
}

/* ========================================
   RESULT SECTION - Chart
   ======================================== */
.salary-chart-container {
    padding: 8px 0;
}

.salary-chart-bar {
    display: flex;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.salary-chart-segment {
    min-width: 2px;
}

.salary-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.salary-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
}

.salary-chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* ========================================
   NON-TAXABLE PANEL
   ======================================== */
.non-taxable-panel {
    margin-top: 16px;
    border: 1px solid #E8E8E8;
    border-radius: 8px;
    background: #FAFAFA;
    padding: 20px;
}

.non-taxable-header {
    margin-bottom: 16px;
}

.non-taxable-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.non-taxable-item {
    margin-bottom: 16px;
}

.non-taxable-item:last-child {
    margin-bottom: 0;
}

.non-taxable-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.non-taxable-item-value {
    font-size: 14px;
    font-weight: 600;
    color: #319C80;
}

.non-taxable-input {
    background: #fff;
}

.non-taxable-input:disabled {
    background: #F0F0F0;
    color: #999;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */
@media (max-width: 768px) {
    /* 비과세 패널 모바일 */
    .non-taxable-panel {
        padding: 16px;
    }

    .non-taxable-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .non-taxable-input {
        width: 100%;
    }

    /* 급여 요약 그리드 모바일 */
    .salary-summary-column {
        padding: 16px;
    }

    .salary-summary-title {
        font-size: 15px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .salary-summary-label {
        font-size: 13px;
    }

    .salary-summary-value {
        font-size: 13px;
    }

    .salary-summary-value-green {
        font-size: 15px;
    }

    /* 공제 테이블 모바일 */
    .salary-deduction-table-wrapper {
        margin: 0 -20px;
        padding: 0 20px;
    }

    .salary-deduction-table {
        min-width: 480px;
        font-size: 13px;
    }

    .salary-deduction-table th,
    .salary-deduction-table td {
        padding: 10px 8px;
    }

    .salary-deduction-table thead th {
        font-size: 12px;
    }

    /* 차트 모바일 */
    .salary-chart-legend {
        gap: 10px;
    }

    .salary-chart-legend-item {
        font-size: 12px;
    }

    .salary-chart-legend-color {
        width: 10px;
        height: 10px;
    }

    /* 결과 정보 카드 모바일 */
    .salary-result-info {
        gap: 10px;
    }

    .salary-result-info-title {
        font-size: 14px;
    }

    .salary-result-info-desc {
        font-size: 13px;
    }
}
