/*
 * Vertical Navbar
 */

.vertical-navbar {
    position: fixed;
    top: 0;
    left: 0;
    /* width: 60px; Minimized width */
    background-color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: width 0.3s ease; /* Animation for width change */
    overflow: auto; /* Allow scrolling if content overflows */

    border-radius: 0px 20px 20px 0px;

    padding: 0px 5px 0px 5px;

    margin-top: 10px;
    margin-bottom: 10px;
    height: calc(100vh - 20px);

    zoom: 1;
}

.vertical-navbar.collapsed {
    width: 60px;
}

.vertical-navbar.expanded,
.vertical-navbar:hover {
    width: 170px; /* Expanded width on hover */
    background-color: #fffffff0;

    border-radius: 0px 40px 40px 0px;
    /* transition: width 0.3s ease, background-color 0.3s ease, border-radius 0.3s ease;  */
}


/* Top section with logo */
.vertical-navbar-top {
    padding: 5px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: center;
    background-color: #ffffff;
}

.vertical-navbar .logo {
    height: 40px;
    height: 100px;
    background-image: url("https://www.ntelio.ai/website/resources/ntelio-turquoise.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    display: block;
    width: 100%;
    transition: background-position 0.3s ease, transform 0.3s ease;
    background-position: center;
    cursor: pointer;
}

/* When navbar is minimized, center the logo and make it 15% wider */
.vertical-navbar:not(:hover):not(.expanded) .logo {
    background-position: center;
    /* height: 100px; */
}

/* Middle section with menu items */
.vertical-navbar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
    /* zoom: 1; */
    max-height: calc(100vh - 200px); /* Ensure there's room for bottom items */
}

/* Basic menu item styling */
.vertical-navbar .menu-item {
    position: relative;
    height: 48px; /* Fixed height for consistency */
    display: flex;
    align-items: center;
    padding: 0 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-sizing: border-box;
    margin-right: 4px;
    margin-left: 4px;
}

.vertical-navbar .menu-item:hover {
    border-radius: 0 20px 20px 20px;
    background-color: var(--color2);
    color: white;
}

.vertical-navbar .menu-item:hover .menu-label {
    color: white;
}

.vertical-navbar .menu-item.active {
    background-color: #e6f7ff;
    border-left: 3px solid var(--color1, #0C7AA3);
}

/* Icon styling */
.vertical-navbar .menu-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: absolute;
    left: 18px; /* Fixed position from left */
    /* transition: all 0.3s ease; */
}

.vertical-navbar .menu-icon svg {
    width: 20px;
    height: 20px;
}

/* Label styling */
.vertical-navbar .menu-label {
    font-family: Lato, sans-serif;
    font-size: 14px;
    color: #333;
    margin-left: 42px; /* Position after icon */
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

/* Collapsed state styling */
.vertical-navbar:not(:hover):not(.expanded) .menu-icon {
    left: 50%;
    transform: translateX(-50%); /* Perfect centering */
}

/* Expanded state styling */
.vertical-navbar:hover .menu-icon,
.vertical-navbar.expanded .menu-icon {
    left: 18px;
    transform: translateX(0);
}

.vertical-navbar:hover .menu-label,
.vertical-navbar.expanded .menu-label {
    opacity: 1;
    transform: translateX(0);
}

/* Separator styling */
.vertical-navbar .menu-separator {
    border: none;
    border-top: 1px solid #eee;
    border-radius: 1px;
    height: 4px;
    margin: 10px 5px;
    width: auto;
    pointer-events: none;
    background: none;
    box-shadow: none;
    opacity: 1;
}

.vertical-navbar:not(:hover):not(.expanded) .menu-separator {
    margin: 10px 5px;
}

/* Bottom section with settings, profile and logout */
.vertical-navbar-bottom {
    position: relative!important;
    top: 0px;
    padding: 15px 0;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    position: sticky;
    bottom: 0;
    background-color: white; /* Ensure it has a background */
    margin-top: auto; /* Push to bottom if there's space */
}

/* Style bottom menu items the same as regular menu items */
.vertical-navbar-bottom .menu-item {
    position: relative;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-sizing: border-box;
}

.vertical-navbar-bottom .menu-item:hover {
    background-color: var(--color2);
    color: white;
}

.vertical-navbar-bottom .menu-item:hover .menu-label {
    color: white;
}


.vertical-navbar-bottom .menu-item.active {
    background-color: #e6f7ff;
    border-left: 3px solid var(--color1, #0C7AA3);
}

/* Icon styling for bottom menu */
.vertical-navbar-bottom .menu-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: absolute;
    left: 18px;
    /* transition: all 0.3s ease; */
}

.vertical-navbar-bottom .menu-icon svg {
    width: 20px;
    height: 20px;
}

/* Label styling for bottom menu */
.vertical-navbar-bottom .menu-label {
    font-family: Lato, sans-serif;
    font-size: 14px;
    color: #333;
    margin-left: 42px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

/* Collapsed state styling for bottom menu */
.vertical-navbar:not(:hover):not(.expanded) .vertical-navbar-bottom .menu-icon {
    left: 50%;
    transform: translateX(-50%);
}

/* Expanded state styling for bottom menu */
.vertical-navbar:hover .vertical-navbar-bottom .menu-icon,
.vertical-navbar.expanded .vertical-navbar-bottom .menu-icon {
    left: 18px;
    transform: translateX(0);
}

.vertical-navbar:hover .vertical-navbar-bottom .menu-label,
.vertical-navbar.expanded .vertical-navbar-bottom .menu-label {
    opacity: 1;
    transform: translateX(0);
}

/* Adjust content margins for the minimized navbar width */
body.with-vertical-navbar #content-wrapper {
    margin-left: 60px; /* Match the minimized navbar width */
    width: calc(100% - 60px);
    transition: margin-left 0.3s ease, width 0.3s ease;
}
