/* 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;
}

/* 레이어 Popup */
#hd_pop {
    z-index: 1000;
    position: relative;
    margin: 0 auto;
    width: auto;
    height: 0
}

#hd_pop h2 {
    position:absolute;
    font-size: 0;
    line-height: 0;
    overflow: hidden
}

.hd_pops {
    position: absolute;
    border: 1px solid #e9e9e9;
    background:#fff;
}

.hd_pops img{
    max-width: 100%
}

.hd_pops_footer {
    padding: 0;
    background: #000;
    color: #fff;
    text-align: left;
    position: relative;
}

.hd_pops_footer:after {
    display: block;
    visibility: hidden;
    clear: both;
    content: ""

}
.hd_pops_footer button {
    padding: 10px;
    border: 0;
    color: #fff
}

.hd_pops_footer .hd_pops_reject{
    background: #000;
    text-align: left
}

.hd_pops_footer .hd_pops_close{
    background: #393939;
    position: absolute;
    top: 0;
    right: 0
}

.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;
}

/* 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;
    }
}

/* Sidebar Menu Styles */
.nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    border-radius: 0.375rem;
}

.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: 56px;
    z-index: 1050;
    margin-left: 280px;
    transition: margin-left 0.3s ease-in-out;
}

.app-header .header-menu-width {
    width: 280px;
}

/* Sidebar Styles */
#sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    overflow-y: auto;
    background-color: #f8f9fa;
    border-left: 1px solid #dee2e6;
    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;
}

#sidebar hr {
    margin: 0.5rem -0.75rem;
}

/* Main Content Styles */
#main-content {
    margin-left: 280px;
    margin-top: 56px;
    flex: 1;
    transition: margin-left 0.3s ease-in-out;
}

/* 모바일 반응형 사이드바 */
@media (max-width: 991.98px) {
    .app-header {
        margin-left: 0 !important;
    }
    
    #sidebar {
        transform: translateX(100%);
        z-index: 1040;
        border-left: 1px solid #dee2e6;
        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 #dee2e6;
        border-left: none;
    }
}