/* =========================================================================================
 *   Main Custom common
 * =========================================================================================*/

.login-page .login-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.login-page .form-row {
    margin-bottom: 15px;
}

.login-page label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.login-page .form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.login-page .btn-check-duplicate {
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    flex-grow: 1;
    background: #3d3d3d;
    outline: none;
    border: none;
    color: #fff;
}

.login-page .btn-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    background-color: #337ab7;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.login-page .btn-submit:hover {
    background-color: #286090;
}

.login-page .form-check {
    display: flex;
    align-items: center;
}

.login-page .form-check-input {
    margin-right: 10px;
}

/* Modal Styles */
.modal-open {
    overflow: auto !important; /* open 시 스크롤 제어 */
}
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    padding-top: 60px; /* Location of the box */
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 90%; /* Could be more or less, depending on screen size */
    max-width: 800px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    animation-name: animatetop;
    animation-duration: 0.4s
}

.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.terms-content {
    height: 400px;
    overflow-y: scroll;
    border: 1px solid #ccc;
    padding: 15px;
    margin-top: 15px;
    /*white-space: pre-wrap;*/
}

.btn-link {
    background: none;
    border: none;
    color: #337ab7;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.required {
    color: red;
    margin-left: 5px;
}

#idCheckResult {
    margin-top: 5px;
    font-size: 14px;
}

.login-page .input-with-icon {
    position: relative;
}

.login-page .input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.login-page .input-with-icon .form-control {
    padding-left: 40px;
}

@media (max-width: 768px) {
    .login-page .login-container {
        margin: 20px auto;
        padding: 20px;
        border: none; /* 모바일에서는 테두리 제거 */
    }


}

/* 오시는 길*/
.brand-section{
    overflow: hidden;
    position: relative;
    padding-top: 10rem;
    padding-bottom: 8rem;
}
.location-section{
    overflow: hidden;
    position: relative;
    padding-top: 8rem;
    padding-bottom: 8rem;
}
.location-section .map-area {
    width: 100%;
    margin-bottom: 8rem;
}
.location-section .map-area iframe {
    width: 100%;
    height: 50rem;
}
.location-section .wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    align-items: center;
}
.location-section .wrap::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 0.1rem;
    height: 100%;
    min-height: 8rem;
    background-color: #e5e5ec;
}
.location-section .item:first-child {
    padding-right: 6rem;
}
.location-section .item {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.location-section .item+.item {
    padding-left: 6rem;
}
.location-section .thumb {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    background-color: var(--primary);
}
.location-section .thumb img {
    width: 4rem;
    height: 4rem;
    vertical-align: middle;
}
address {
    font-style: normal;
    line-height: inherit;
}
.location-section .addr span {
    font-weight: var(--fw-regular);
}
.location-section .desc+.desc {
    margin-top: 0.8rem;
}

.location-section .desc {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem 2.4rem;
}
.location-section dt {
    font-weight: bold;
}

@media (max-width: 992px) {
    .location-section{
        padding-top: 5rem;
        padding-bottom: 10rem;
    }
    .location-section .map-area {
        margin-bottom: 4rem;
    }
    .location-section .map-area iframe {
        height: 24rem;
    }
    .location-section .wrap {
        display: block;
    }
    .location-section .item:first-child {
        padding: 0;
    }
    .location-section .thumb {
        width: 6rem;
        height: 6rem;
    }
    .location-section .thumb img {
        width: 3.2rem;
        height: 3.2rem;
    }

    .location-section .item+.item {
        margin-top: 1.6rem;
        padding: 0;
    }
    .location-section .desc {
        gap: 0.4rem 1.6rem;
    }
    .location-section .desc+.desc {
        margin-top: 0.4rem;
    }

    .location-section .wrap::before {
        display: none;
    }


}


/* Add Animation */
@-webkit-keyframes animatetop {
    from {top:-300px; opacity:0}
    to {top:0; opacity:1}
}

@keyframes animatetop {
    from {top:-300px; opacity:0}
    to {top:0; opacity:1}
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 10px;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

#modalBody {
    padding-top: 10px;
}



/* 메인화면 팝업 공지 /s/ */
.layer-popup {
    position: fixed;
    min-width: 360px;
    /*width: 360px;*/
    /*width: 600px;*/
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    border: 1px solid #eee;
    z-index: 1000;
    overflow: hidden;
    user-select: none; /* 드래그 중 텍스트 선택 방지 */
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #111827;
    color: white;
    cursor: move; /* 드래그 가능한 영역 표시 */
}

.popup-header strong { font-size: 15px; }

.popup-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
}

.popup-body {
    padding: 14px;
    font-size: 14px;
    color: #222;
    line-height: 1.5;
    user-select: text; /* 본문은 선택 가능 */
}

.popup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f9fafb;
    border-top: 1px solid #eee;
    font-size: 13px;
}

.today-hide {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #444;
}

/* 팝업 기본 크기/최대높이 */
.layer-popup {
    /*width: 600px;          !* 기존 유지 *!*/
    max-height: 70vh;      /* 화면 높이의 70%까지만 커지게 */
    display: flex;
    flex-direction: column;
}

/* 헤더/푸터는 고정, 본문만 늘어나도록 */
.popup-header,
.popup-footer {
    flex: 0 0 auto;
}

/* 내용이 넘치면 본문에 스크롤 생성 */
.popup-body {
    flex: 1 1 auto;        /* 남는 높이를 본문이 차지 */
    overflow-y: auto;      /* 세로 스크롤 */
    overflow-x: hidden;    /* 가로는 숨김(필요시 auto로) */
    max-height: 100%;      /* popup max-height 안에서만 */
}


/* 태블릿 이하 */
@media (max-width: 1024px) {
    .layer-popup {
        width: 320px;
    }
}

/* 모바일 */
@media (max-width: 768px) {
    .layer-popup {
        width: calc(100vw - 24px);   /* 좌우 여백 12px */
        max-width: 420px;
        left: 12px !important;      /* inline left 무시하고 강제 */
        right: 12px;
        top: auto !important;
        bottom: calc(12px + env(safe-area-inset-bottom)); /* 아이폰 하단 safe-area */
        border-radius: 16px;
    }

    .popup-header {
        padding: 14px 16px;
        font-size: 16px;
        cursor: grab;           /* 모바일에서도 잡는 느낌 */
        touch-action: none;     /* 드래그 시 스크롤 충돌 방지(드래그 JS와 궁합) */
    }
    .popup-header:active {
        cursor: grabbing;
    }

    .popup-body {
        padding: 14px 16px;
        font-size: 15px;
        max-height: 55vh;       /* 화면 절반 좀 넘게 */
        overflow-y: auto;       /* 내용 길면 내부 스크롤 */
        -webkit-overflow-scrolling: touch; /* iOS 부드러운 스크롤 */
    }

    .popup-footer {
        padding: 12px 16px;
        font-size: 14px;
        gap: 8px;
    }

    .popup-close {
        font-size: 20px;
    }

    /* 여러 개 뜰 때 겹치면 살짝 띄우는 느낌(선택) */
    .layer-popup + .layer-popup {
        margin-bottom: 10px;
    }

    /* 페이징 */
    .hwork-pagination-wrapper .pagiset.pagiset-circ div{
        max-width: 30px;
    }
    .hwork-pagination-wrapper .pagiset.pagiset-circ div:nth-child(3){
        /*display: none;*/
        max-width:160px;
    }
}

/* 아주 작은 모바일 (아이폰 SE급) */
@media (max-width: 360px) {
    .layer-popup {
        width: calc(100vw - 16px);
        left: 8px !important;
        right: 8px;
        bottom: calc(8px + env(safe-area-inset-bottom));
    }

    .popup-body {
        max-height: 50vh;
        font-size: 14px;
    }
}

/* 메인화면 팝업 공지 /e/ */

/* text 설명 alert */
.text-alert {
    position: relative;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #052c65;
    background-color: #cfe2ff;
    /*border: var(--bs-alert-border);*/
    border: 1px solid #9ec5fe;
    border-radius: 0.375rem;
    font-size: 1.5rem;
}

/* 팝업목록 관리버튼 */
.manage-btn {
    padding: 8px 16px; /* Slightly larger buttons */
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    font-size: 15px;
}


/* 조회기준일 관리 카드 */
.setting-cards {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    /*border-top: 4px solid #4caf50;*/
    border-left: 4px solid #4caf50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.setting-cards .card-content{
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    border: 1px solid #6aaa73;
}
.setting-cards .card-rem{
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    margin-top: 10px;
    flex-direction: column;
    font-size: 1.5rem;
    /*border-left: 4px solid #8eb0ff;*/
}
.setting-cards .card-column-name{
    margin-right: 10px;
    width: 100px;
}
.card-input-box{
    width: 150px;
}
.card-btn-box{
    padding-left: 20px;
    width: 300px;
    height: 37px;
}
.card-btn-box button {
    margin-left: 20px;
    padding:2px 15px;
    border: 1px solid #407ec7;
    height: 100%;
    width: 100px !important;
}

span.dot {
    height: 5px;
    width: 5px;
    margin: 10px;
    border: 1px solid black;
    border-radius: 100%;
    background-color: black;
}

.bs-msg{
    margin-top:.5rem;
    display:flex; gap:.5rem; align-items:flex-start;
    padding:.5rem .65rem;
    border-radius:12px;
    border:1px solid transparent;
    line-height:1.35;
    font-size: 1.5rem;
}
.bs-msg i{ margin-top:.15rem; }
.bs-msg.info{
    color:#1f4d7a;
    background:#eef6ff;
    border-color:#d7e9ff;
}
.bs-msg.success{
    color:#2c5b3a;
    background:#eef7f1;
    border-color:#d6eddd;
}
.bs-msg.error{
    color:#7a2430;
    background:#fff1f2;
    border-color:#ffd6db;
}