/* [2026-10-16 PJW] 최초 작성 - ui.js 프레임워크(ui.dialog .pop2depth / Popup .modal>.popup / 페이징 .paging) 를 FMS 디자인(Bootstrap 5·Pretendard) 에 맞춘 스타일 */

/* ---------- ui.dialog (알림/확인) : 기존 site-dlg 디자인과 동일한 느낌 ---------- */
.pop2depth {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
}
.pop2depth .dim {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(2px);
}
.pop2depth .pop2_wrap {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, calc(100vw - 32px));
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
    overflow: hidden;
    animation: ui-dlg-in .18s ease;
}
@keyframes ui-dlg-in {
    from { opacity: 0; transform: translate(-50%, -46%) scale(.97); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.pop2depth .title_bx h2 {
    margin: 0;
    padding: 16px 22px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: #2563eb;
}
.pop2depth .pop_contents {
    padding: 22px 22px 8px;
}
.pop2depth .question_txt {
    font-size: 14.5px;
    line-height: 1.7;
    color: #1e293b;
    word-break: keep-all;
}
.pop2depth .popup_btn_all {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px 20px;
}
.pop2depth .popup_btn_all button,
.modal:not(.fade) .popup_btn_all button {
    min-width: 88px;
    height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s;
}
.pop2depth .popup_btn_all button:hover,
.modal:not(.fade) .popup_btn_all button:hover { filter: brightness(.94); }
.popup_btn_all .btn_blue  { background: #2563eb; color: #fff; }
.popup_btn_all .btn_pink  { background: #f1f5f9; color: #334155; }
.popup_btn_all .btn_black { background: #e2e8f0; color: #334155; }
.popup_btn_all .btn_red   { background: #ef4444; color: #fff; }

/* ---------- Popup (ui.js) : <div class="modal"> 컨테이너 + /view/<도메인>/*.html 템플릿(.popup) ---------- */
.modal:not(.fade) {
    background: rgba(15, 23, 42, .45);
    overflow-x: hidden;
    overflow-y: auto;
}
.modal:not(.fade) > .popup {
    position: relative;
    width: min(640px, calc(100vw - 32px));
    margin: 48px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
    animation: ui-pop-in .2s ease;
}
.modal:not(.fade) > .popup.popup_lg { width: min(960px, calc(100vw - 32px)); }
.modal:not(.fade) > .popup.popup_xl { width: min(1200px, calc(100vw - 32px)); }
@keyframes ui-pop-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.modal:not(.fade) > .popup > .modal-content { border: 0; box-shadow: none; }
.modal:not(.fade) > .popup .pop_title_box { padding: 18px 24px; border-bottom: 1px solid #e2e8f0; }
.modal:not(.fade) > .popup .pop_title_box .title_line { margin: 0; font-size: 17px; font-weight: 700; color: #0f172a; }
.modal:not(.fade) > .popup .pop_write_box { padding: 20px 24px; }
.modal:not(.fade) > .popup > .popup_btn_all { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px 20px; border-top: 1px solid #e2e8f0; }
@media (max-width: 640px) {
    .modal:not(.fade) > .popup { margin: 12px auto; }
}

/* ---------- pageLink() 페이징 (.paging) : 기존 .pg-list 디자인과 통일 ---------- */
.paging { display: flex; justify-content: center; gap: 4px; margin: 18px 0 4px; }
.paging a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.paging a.on { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 700; }
.paging a.before::before { content: '\F284'; font-family: 'bootstrap-icons'; }
.paging a.after::before  { content: '\F285'; font-family: 'bootstrap-icons'; }

/* 폼 필수값 표시 (checkFormRequires 가 쓰는 requires/message 속성 대상) */
.ic_star { color: #ef4444; margin-left: 2px; font-style: normal; }
