/* ===== Menu Icon ===== */

.menu-icon {
    position: absolute;
    top: 30px;
    left: 35px;
    font-size: 25px;
    cursor: pointer;
    z-index: 999;
    color: #000000;
    transition: all 0.3s ease;
}

.menu-icon:hover {
    color: #7a13da;
}

.menu-icon:active {
    color: #7a13da;
}

@media (hover: none) and (pointer: coarse) {
    .menu-icon:hover {
        color: #000000;
    }

    .menu-icon:active {
        transform: scale(0.9);
        color: #000000;
    }
}


.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px;
    padding: 10px 14px;
    background: #FFF;
    transition: all 0.3s ease;
    z-index: 1002;
    font-family: 'Poppins', sans-serif;
    overflow-y: auto; 
    scrollbar-width: none; 

}

.sidebar::-webkit-scrollbar {
    width: 0px;
    display: none;
}


.sidebar.close {
    width: 0;
    overflow: hidden;
    padding: 0;
}

/* Overlay Effect */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00000099;
    z-index: 1001;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}



.sidebar header .toggle {
    top: 20px;
    position: absolute;
    z-index: 1005;
    color: #000000;
    border-radius: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.1s ease;
}

.sidebar header .toggle:hover {
    background-color: #695CFE;
    color: white;
}

@media (hover: none) and (pointer: coarse) {
    .sidebar header .toggle:hover {
        background-color: transparent;
        color: black;
    }
}


.sidebar .menu {
    margin-top: 45px;
}

.sidebar li {
    height: 50px;
    list-style: none;
    display: flex;
    align-items: center;
    margin-top: 10px;
    font-family: 'Poppins', sans-serif;
}

.sidebar .icon {
    min-width: 60px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #000000;
    transition: all 0.2s ease;
}

.sidebar .text {
    font-size: 1.09rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 1;
    color: #000000;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.sidebar.close .text .icon {
    opacity: 0;
}

.sidebar li a {
    list-style: none;
    height: 100%;
    background-color: transparent;
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar li a:hover {
    background-color: #695CFE;
}

.sidebar li a:hover .icon,
.sidebar li a:hover .text {
    color: white;
}

@media (hover: none) and (pointer: coarse) {
    .sidebar li a:hover {
        background-color: transparent;
    }

    .sidebar li a:hover .icon,
    .sidebar li a:hover .text {
        color: black;
    }

}


/* ====== Menu and Submenu Styles ====== */
.sidebar .menu-links {
    margin-top: 20px;
    margin-bottom: 30px;
}

.sidebar .submenu {
    display: none;
    list-style: none;
    margin-top: 10px;
    transition: all 2s ease;

}

/* Adjust font size for submenu items */
.sidebar .submenu .nav-text {
    font-size: 1.09rem; 
}

.sidebar .submenu .backToMain .nav-text {
font-size: 1.185rem;  

}

.sidebar .submenu.active {
    display: block;
    transition: all 2s ease;
}

/* Hide main menu when submenu is active */
.hidden {
    display: none !important;
}


@media (min-width: 730px) {

.sidebar .icon {
    font-size: 1.3rem;
}


.sidebar .text {
    font-size: 1.03rem;
}

/* Adjust font size for submenu items */
.sidebar .submenu .nav-text {
    font-size: 1.03rem; 
    
}

.sidebar .submenu .backToMain .nav-text {
font-size: 1.12rem;
}

}


/* ==== Bottom Content Styling ==== */

.bottom-content {
    position: sticky;
    bottom: 0px;
    width: 100%;
    padding: 0px 0px;
    background: #FFF;

    /* Match sidebar background */
    border-top: 1px solid #ebebeb;
    transition: all 0.3s ease;
}

.sidebar .menu-bar {
    height: calc(100% - 5px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: 'Poppins', sans-serif;

}

.menu-bar::-webkit-scrollbar {
    display: none;
}

.menu-bar .bottom-content .toggle-switch {
    position: absolute;
    right: 0;
    height: 100%;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
}


.sidebar .menu-bar .mode {
    border-radius: 6px;
    background-color: #F6F5FF;
    position: relative;
    transition: all 0.3s ease;
}

.menu-bar .mode .sun-moon {
    height: 50px;
    width: 60px;
}

.mode .sun-moon i {
    position: absolute;
    rotate: -45deg;

}

.mode .sun-moon i.sun {
    opacity: 0;
}

.toggle-switch .switch {
    position: relative;
    height: 22px;
    width: 40px;
    border-radius: 25px;
    background-color: #DDD;
    transition: all 0.3s ease;
}

.switch::before {
    content: '';
    position: absolute;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    background-color: #FFF;
    transition: all 0.3s ease;
}



/* ===== Dark Theme ===== */

html.dark .menu-icon {
    color: #fff;
}

html.dark .menu-icon:hover,
html.dark .menu-icon:active {
    color: #c17eff;
}

@media (hover: none) and (pointer: coarse) {
    html.dark .menu-icon:hover,
    html.dark .menu-icon:active {
        color: #fff;
    }
}

html.dark .sidebar {
    background-color: #242526;
}

html.dark .sidebar header .toggle {
    color: #fff;
}

html.dark .sidebar header .toggle:hover {
    background-color: #3a3b3c;
}

@media (hover: none) and (pointer: coarse) {
    html.dark .sidebar header .toggle:hover {
        background-color: transparent;
        color: #fff;
    }
}

html.dark .sidebar .icon,
html.dark .sidebar .text {
    color: #fff;
}

html.dark .sidebar li a:hover {
    background-color: #3a3b3c;
}

html.dark .sidebar li a:hover .icon,
html.dark .sidebar li a:hover .text {
    color: #fff;
}

@media (hover: none) and (pointer: coarse) {
    html.dark .sidebar li a:hover {
        background-color: transparent;
    }

    html.dark .sidebar li a:hover .icon,
    html.dark .sidebar li a:hover .text {
        color: rgb(255, 255, 255);
    }
}

html.dark .bottom-content {
    background: #242526;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


html.dark .menu-bar .mode {
    background-color: #3a3b3c;
}

html.dark .switch::before {
    left: 20px;
}

html.dark .toggle-switch .switch {
    background-color: #695CFE;
}