/* 상여금 계산 페이지 CSS */
body {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
}

.calculator {
    text-align: center;
    margin: 10px auto 0;
    width: 700px;
    border: 1px solid #004b8d;
    border-radius: 10px;
    overflow: hidden;
    background-color: white;
}

.title {
    background: #004b8d;
    width: 100%;
    padding: 20px 0 15px;
}

.calculator h1 {
    color: #fff;
    font-size: 30px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 0;
}

.calculator img {
    width: 150px;
}

.calculator-container {
    padding: 30px;
    text-align: left;
}

.calculator-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0px;
}

.calculator-table td {
    border: 1px solid #ccc;
    padding: 12px;
    vertical-align: middle;
}

.calculator-table .label-cell {
    background-color: #f8f9fa;
    font-size: 18px;
    font-weight: bold;
    width: 180px;
    text-align: center;
}

.calculator-table .input-cell {
    background-color: white;
}

.calculator-table .red-label {
    color: #dc3545;
    background-color: #fff5f5;
}

.calculator-table input[type="text"] {
    width: 55%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 18px;
    text-align: right;
}

.calculator-table input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* 빈 행 스타일 - 테이블 간격을 위함 */
.spacer-row td {
    border: none !important;
    padding: 20px 0 !important;
    background: transparent !important;
}

/* 계산 버튼이 들어갈 행 */
.button-row td {
    border: none !important;
    text-align: center;
    padding: 20px 0;
    background: transparent !important;
}

.calculate-btn {
    background: #004b8d;
    color: white;
    border: none;
    padding: 8px 30px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 20px;
}

.calculate-btn:hover {
    background: #003a6b;
}

/* 자세히 알아보기 버튼 스타일 */
.detail-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 4px 20px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    margin: 5px auto;
    display: block;
    text-decoration: none;
}

.detail-btn:hover {
    background: #218838;
}

/* 안내문구 스타일 */
.info-section {
    text-align: center;
}

.info-title {
    font-size: 14px;
    font-weight: bold;
    color: #495057;
    margin-top: 5px;
}

.info-text {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.5;
    margin: 5px 0;
}

.red_t {
    color: red;
}

.gray_small {
    font-size: 15px; 
    color:#696969;
}

.span {
    font-size: 18px;
}

.amount-span {
    font-size: 18px;
    font-weight: bold;
}

.amount-small {
    font-size: 16px;
}

/* 정보 행 스타일 */
.info-row td {
    border: none !important;
    text-align: center;
    padding: 0px 0;
    background: transparent !important;
}

/* layerPopup - 수정된 버전 */
/* 팝업 컨테이너 - 전체 화면을 덮는 오버레이 */
#content_pop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center; /* 세로 중앙 정렬 */
    justify-content: center; /* 가로 중앙 정렬 */
    padding: 20px;
    box-sizing: border-box;
    margin: 0;
}

/* 팝업 래퍼 */
.popup_wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    margin: 0;
}

/* 팝업이 열렸을 때 래퍼 애니메이션 */
#content_pop.show .popup_wrap {
    transform: translate(-50%, -50%) scale(1);
}

/* 팝업 알림창 */
.pop_alert {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: popupFadeIn 0.3s ease-out;
    overflow: hidden;
}

/* 팝업 애니메이션 */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 레이어팝업 영역 */
.layerpop_area {
    padding: 40px 30px 30px 30px;
    position: relative;
    min-width: 350px;
}

/* 팝업 제목 */
.layerpop_area .title {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    background: #1e4a72;
    margin: -40px -30px 10px -30px;
    padding: 20px 30px;
    text-align: center;
    line-height: 1.3;
}

/* 닫기 버튼 */
.layerpop_close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 28px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    text-decoration: none;
    z-index: 10;
}

.layerpop_close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 팝업 내용 */
.layerpop_area .content {
    font-size: 16px;
    line-height: 1.7;
    color: #495057;
    text-align: center;
    word-break: keep-all;
}

.layerpop_area .content br {
    line-height: 1.8;
}

.layerpop_area .content img {
    max-width: 100%;
    height: auto;
    margin-top: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ⭐ 핵심 수정: 스크롤 방지 제거 - 팝업이 떠도 스크롤 가능 */
/* 기존 html.fix 스타일 주석 처리 또는 제거 */
/*
html.fix {
    overflow: hidden;
    height: 100%;
}

html.fix body {
    overflow: hidden;
    height: 100%;
    position: fixed;
    width: 100%;
}
*/

/* 반응형 처리 */
@media (max-width: 768px) {
    #content_pop {
        padding: 15px;
    }
    
    .layerpop_area {
        min-width: 280px;
        padding: 30px 20px 25px 20px;
    }
    
    .layerpop_area .title {
        font-size: 20px;
        margin: -30px -20px 20px -20px;
        padding: 15px 20px;
    }
    
    .layerpop_area .content {
        font-size: 15px;
    }
    
    .popup_wrap {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .layerpop_area {
        min-width: 260px;
        padding: 25px 15px 20px 15px;
    }
    
    .layerpop_area .title {
        font-size: 18px;
        margin: -25px -15px 15px -15px;
        padding: 12px 15px;
    }
    
    .layerpop_area .content {
        font-size: 14px;
    }
}

/* 팝업 배경 클릭으로 닫기 */
#content_pop {
    cursor: pointer;
}

.popup_wrap {
    cursor: default;
}

/* 부드러운 스크롤바 (webkit 기반 브라우저) */
.popup_wrap::-webkit-scrollbar {
    width: 6px;
}

.popup_wrap::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.popup_wrap::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.popup_wrap::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ***********소득공제 환산액 예시*********** */
/* 소득세율표 헤더 */
.info-header-row td {
    border: none !important;
    text-align: center;
    padding: 10px 0;
    background: transparent !important;
}

.tax-rate-title {
    font-size: 20px;
    font-weight: bold;
    color: #004b8d;
    margin-bottom: 10px;
}

/* 소득세율표 행 */
.tax-rate-row td {
    border: none !important;
    padding: 0 12px 20px 12px;
    background: transparent !important;
}

.tax-rate-container {
    width: 100%;
    overflow-x: auto;
}

/* 소득세율표 테이블 */
.tax-rate-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #004b8d;
    margin: 0 auto;
    font-size: 14px;
}

.tax-rate-table th {
    background-color: #004b8d;
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #004b8d;
    font-size: 16px;
}

.tax-rate-table td {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #ccc;
    background-color: white;
    line-height: 1.4;
    border: 1px solid #eee !important;
}

/* 소득공제 환산액 열 (3번째 열) 배경색 변경 */
.tax-rate-container .tax-rate-table td:nth-child(3) {
    background-color: #cae8f1 !important;
    color: black;
}

.tax-rate-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.tax-rate-table tbody tr:hover {
    background-color: #e3f2fd;
}

/* 반응형 처리 */
@media (max-width: 768px) {
    .tax-rate-table {
        font-size: 12px;
    }
    
    .tax-rate-table th,
    .tax-rate-table td {
        padding: 8px 4px;
    }
    
    .tax-rate-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .tax-rate-table {
        font-size: 11px;
    }
    
    .tax-rate-table th,
    .tax-rate-table td {
        padding: 6px 2px;
    }
}