/**
 * Sidebar Component Styles
 * Shared styles for the navigation sidebar across all pages
 */

/* Navigation Sidebar */
.nav-sidebar {
    position: fixed;
    top: 70px;
    left: -500px;
    width: 500px;
    z-index: 99999;
    border-radius: 0 20px 20px 0;
  
    transition: all 0.1s ease-in-out;
    overflow-y: auto;
    transform: translateX(0);
}

/* Single column mode (not logged in) */
.nav-sidebar-single-column {
    width: 280px;
    left: -280px;
}

/* Two column mode (logged in) */
.nav-sidebar-two-columns {
    width: 500px;
    left: -500px;
}

.nav-sidebar.open {
    top: 70px;
    left: 1vw;
    transform: translateX(0) scale(1);
}

.nav-sidebar:not(.open) {
    transform: translateX(-10px) scale(0.98);
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.close-nav {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-nav:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.nav-menu {
    padding: 0px 0;
    display: flex;
    flex-direction: row;
    gap: 0;
}

.nav-column {
    display: flex;
    flex-direction: column;
    width: 250px;
}

.nav-column-secondary {
    margin-left: 10px;
    padding-left: 10px;
}

/* Hide second column when user is not authenticated */
.nav-column-secondary-hidden {
    display: none !important;
}

/* Show second column when user is authenticated */
.nav-column-secondary-visible {
    display: flex !important;
}

.nav-margin-bottom{
    background: rgba(255, 255, 255, 0.9);
    margin-bottom: 5px!important;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: all 0.2s;

    margin: 0 ;
    background: rgba(255, 255, 255, 0.9);
}

.nav-item:hover {
    background: -webkit-linear-gradient(left, rgb(232, 94, 83), rgb(142, 49, 187), rgb(102, 173, 214));
    border-left-color: #000000;
    color: #FFFFFF;
}

.nav-item.active {
    background: -webkit-linear-gradient(left, rgb(232, 94, 83), rgb(142, 49, 187), rgb(102, 173, 214));
    border-left-color: #000000;
    color: #FFFFFF;
}

.nav-icon {
    margin-right: 15px !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.nav-icon i {
    font-size: 20px;
    color: inherit;
}

.nav-text {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 1px;
}

.nav-text2 {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #666;
    margin-top: 2px;
}
/* Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998; /* Below sidebar (99999) and global header (99999), above content */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.nav-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Hamburger Menu */
.hamburger-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 15px;
    height: 15px;
    z-index: 10;
    cursor: pointer;
}

.hamburger-menu .line {
    width: 100%;
    height: 2px;
    background: black;
    margin: 3px 0;
    border-radius: 1px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-sidebar {
        width: 280px;
        left: -280px;
    }

    .nav-sidebar.open {
        left: 0;
    }

    .hamburger-menu {
        top: 15px;
        left: 15px;
    }

    /* Stack columns vertically on mobile */
    .nav-menu {
        flex-direction: column;
    }

    .nav-column-secondary {
        border-left: none;
        margin-left: 0;
        padding-left: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        margin-top: 10px;
        padding-top: 10px;
        width: 220px;
    }
}

@media (max-width: 480px) {
    .nav-sidebar {
        width: 100vw;
        left: -100vw;
        border-radius: 0;
    }
    
    .nav-sidebar.open {
        left: 0;
    }
}
