/* 기본 폰트 */
body {
    font-family: 'Noto Sans KR', sans-serif;
}

/* 반응형 테이블 대체 레이아웃 */
.tbl-label {
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    font-weight: 700;
}

.tbl-value {
    padding: 0.5rem 1rem;
}

.tbl-action {
    padding: 0.5rem 1rem;
}

@media (min-width: 768px) {
    .tbl-label {
        flex: 0 0 auto;
        width: 16.66667%;
        border-right: 1px solid #dee2e6;
    }
    .tbl-value {
        flex: 0 0 auto;
        width: 83.33333%;
    }
    .tbl-action {
        flex: 0 0 auto;
        width: 16.66667%;
        text-align: right;
    }
    .tbl-row--with-action .tbl-value {
        width: 66.66667%;
    }
}

/* Loading Screen */
#progress_loading {
    height: 100%;
    left: 0px;
    position: fixed;
    _position: absolute;
    background-color: white;
    top: 0px;
    width: 100%;
    filter: alpha(opacity = 0);
    -moz-opacity: 0.5;
    opacity: 0.5;
}

#loading_img {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 200px;
    margin-top: -75px; 
    margin-left: -75px; 
    z-index: 999999;
}

/* 레이어 팝업 (신규 디자인) */

/* dim 오버레이 */
.hd_pop_dim {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 8999;
}

/* 팝업 전체 래퍼 */
.hd_pop_wrap {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9000;
    pointer-events: all;
}

/* 팝업 상단 바 (PC 전용) */
.hd_pop_topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 0 8px 0;
}

.hd_pop_pc_nav {
    display: flex;
    gap: 8px;
}

.hd_pop_pc_nav_btn {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.7);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.hd_pop_pc_nav_btn i {
    font-size: 2rem;
    line-height: 1;
    display: block;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hd_pop_pc_nav_btn:hover {
    background: rgba(0,0,0,0.65);
}

.hd_pop_pc_nav_btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* 슬라이더 래퍼 (PC: 3개 너비로 overflow:hidden) */
.hd_pop_slider {
    overflow: hidden;
    width: 1376px; /* 452 × 3 + 10 × 2 */
}

/* 팝업 트랙: 가로 나열 + 슬라이드 트랜지션 */
.hd_pop_track {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    padding: 0;
    pointer-events: all;
    transition: transform 0.4s ease;
    will-change: transform;
}

/* 개별 팝업 박스 */
.hd_pop_item {
    width: 452px; /* box-sizing:border-box + border 1px×2 = 이미지 정확히 450px */
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    pointer-events: all;
}

.hd_pop_body a {
    display: block;
}

.hd_pop_body img {
    width: 100%;
    height: auto;
    display: block;
}

/* 팝업 전체 공유 버튼 바 */
.hd_pop_global_footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    padding: 4px 4px 0;
    background : rgba(0, 0, 0, 0.7);
}

.hd_pop_reject_all {
    background: transparent;
    border: 0;
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 0;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.hd_pop_reject_all:hover {
    color: #fff;
}

.hd_pop_close_all {
    background: transparent;
    border: 0;
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 0;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.hd_pop_close_all:hover {
    color: #fff;
}

/* 모바일 내비게이션 (PC에서 숨김) */
.hd_pop_nav_wrap {
    display: none;
}

/* ================================= */
/* 모바일 반응형 (767px 이하)         */
/* ================================= */
@media (max-width: 767.98px) {
    /* 팝업 래퍼: 모바일 단일 팝업 너비 제한 */
    .hd_pop_wrap {
        width: 90%;
        max-width: 320px;
    }

    /* 상단 바 숨김 */
    .hd_pop_topbar {
        display: none;
    }

    /* 슬라이더 오버플로우 해제 */
    .hd_pop_slider {
        overflow: visible;
        width: auto;
    }

    /* 트랙: 모바일은 block + transition 없음 + transform 초기화 */
    .hd_pop_track {
        display: block;
        transition: none !important;
        transform: none !important;
        padding: 0;
    }

    /* 모든 팝업 아이템 기본 숨김 */
    .hd_pop_item {
        display: none;
        width: 100%;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    /* 활성 팝업만 표시 */
    .hd_pop_item.mobile-active {
        display: block;
    }

    /* 모바일 내비게이션 */
    .hd_pop_nav_wrap {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #111;
        padding: 6px 10px;
    }

    .hd_pop_nav_btn {
        background: transparent;
        border: 0;
        color: #aaa;
        font-size: 15px;
        cursor: pointer;
        padding: 4px 8px;
        line-height: 1;
    }

    .hd_pop_nav_btn:hover {
        color: #fff;
    }

    .hd_pop_indicators {
        display: flex;
        gap: 7px;
        align-items: center;
    }

    .hd_pop_dot {
        width: 8px;
        height: 8px;
        background: #555;
        border-radius: 50%;
        cursor: pointer;
        transition: background 0.2s;
    }

    .hd_pop_dot.active {
        background: #fff;
    }
}

.carousel-item {
    transition: transform 2s ease-in-out;
}

.carousel-item.active.carousel-item-start {
    transform: translateX(-100%);
}

.carousel-item.active.carousel-item-end {
    transform: translateX(100%);
}

.carousel-item-next:not(.carousel-item-start) {
    transform: translateX(100%);
}

.carousel-item-prev:not(.carousel-item-end) {
    transform: translateX(-100%);
}

/* Multi-level dropdown styles */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    display: none;
}

/* Only show submenu when directly hovering over the parent item */
.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.dropdown-submenu > .dropdown-toggle:after {
    transform: rotate(-90deg);
    float: right;
    margin-top: 8px;
}

/* Sidebar Menu Styles */
.nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    border-radius: 0.375rem;
    color : #000000
}

.nav-arrow {
    transition: transform 0.2s ease;
    display: inline-block;
}

.nav-link[aria-expanded="true"] .nav-arrow {
    transform: rotate(90deg);
}

.submenu {
    padding-left: 0;
    margin-top: 4px;
}

.submenu .nav-link {
    padding-left: 2rem;
}

.submenu .submenu {
    margin-top: 4px;
}

.submenu .submenu .nav-link {
    padding-left: 3rem;
}

/* 메뉴 단계별 강조 색상 */
.nav-link.active-level-1 {
    background-color: #0d6efd !important;
    color: white !important;
}

.nav-link.active-level-2 {
    background-color: #6ea8fe !important;
    color: white !important;
}

.nav-link.active-level-3 {
    background-color: #cfe2ff !important;
    color: #084298 !important;
}

/* Header Styles */
.app-header {
    height: 63px;
    z-index: 1050;
    margin-left: 280px;
    transition: margin-left 0.3s ease-in-out;
    background-color: #eeeeee;
}

.app-header .header-menu-width {
    width: 280px;
}

/* Sidebar Styles */
#sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    overflow-y: auto;
    background-color: #efefef;
    border-left: 1px solid #b8b8b8;
    top: 0;
    right: 0;
    transition: transform 0.3s ease-in-out;
}

#sidebar .sidebar-header {
    height: 43px;
    display: flex;
    align-items: center;
    margin: -0.75rem -0.75rem 0 -0.75rem;
    padding: 0 1rem;
}

/* Main Content Styles */
#main-content {

    flex: 1;
    transition: margin-left 0.3s ease-in-out;
    background-color: #eeeeee;
}

body {
    background-color: #eeeeee;
}

.bg-body-tertiary {
    --bs-bg-opacity: 1;
    background-color: #e0e0e0 !important;
}

/* 모바일 반응형 사이드바 */
@media (max-width: 991.98px) {
    .app-header {
        margin-left: 0 !important;
    }
    
    #sidebar {
        transform: translateX(100%);
        z-index: 1040;
        border-left: 1px solid #b8b8b8;
        border-right: none;
    }
    
    #sidebar.show-mobile {
        transform: translateX(0);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    #main-content {
        margin-left: 0 !important;
    }
}

@media (min-width: 992px) {
    #sidebar {
        transform: translateX(0);
        right: auto;
        left: 0;
        border-right: 1px solid #b8b8b8;
        border-left: none;
    }
}

/* Show main dropdown on hover for desktop */
@media (min-width: 768px) {
    .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
    
    /* Hide all submenus by default */
    .dropdown-submenu .dropdown-menu {
        display: none !important;
    }
    
    /* Only show submenu when hovering directly over the submenu parent */
    .dropdown-submenu:hover > .dropdown-menu {
        display: block !important;
    }
}
