/* Right Side Navigation Styles */
#rightSideNav {
    position: fixed;
    right: 0;
    top: var(--header-top-position, 60px); /* Use a CSS variable to account for notification bar */
    z-index: 1000;
    width: 280px;
    padding: 0;
    background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 0 0 16px;
    max-height: calc(100vh - var(--header-top-position, 60px));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Add overlay background when side nav is active */
#rightSideNav.show::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: opacity 0.3s ease;
}

#rightSideNav::-webkit-scrollbar {
    width: 8px;
}

#rightSideNav::-webkit-scrollbar-track {
    background: transparent;
}

#rightSideNav::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

#rightSideNav::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

#rightSideNav:not(.show) {
    display: block !important;
    transform: translateX(100%);
}

#rightSideNav.show {
    transform: translateX(0);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

#rightSideNav .card {
    border: none;
    background: transparent;
    height: 100%;
}

#rightSideNav .card-header {
    display: none;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem;
}

.side-nav .nav-link {
    padding: 0.75rem 1rem;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    margin: 0;
    transition: all 0.2s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
}

.side-nav .nav-link::after {
    content: attr(data-count);
    background: rgba(255, 255, 255, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.85em;
    min-width: 2rem;
    text-align: center;
}

.side-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.side-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ===================
   NAVIGATION STYLES - ARROWS & SUBCATEGORIES
===================== */

/* Arrow styling for parent categories */
.nav-link.has-children {
    position: relative;
    padding-right: 35px;
}

/* Arrow indicator for parent categories */
.nav-link.has-children::after {
    content: '▼';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1em; /* Larger arrow */
    /* Removed transition */
    opacity: 0.9; /* More visible */
    color: #ffcc00; /* Bright gold color for high visibility */
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5); /* Add shadow for contrast */
}

/* Flipped arrow for expanded state - no animation */
.nav-link.has-children[aria-expanded="true"]::after {
    content: '▲'; /* Using up arrow instead of rotation */
    transform: translateY(-50%);
}

/* Hover state - no animation */
.nav-link.has-children:hover {
    background-color: rgba(255, 255, 255, 0.1);
    /* Removed box-shadow animation */
}

.nav-link.has-children:hover::after {
    color: #ffdd33; /* Brighter gold on hover */
    opacity: 1;
    /* No transition */
}

/* Simple subcategory styling */
.collapse[id^='collapse-'] {
    width: 95%;
    margin: 0 auto;
}

.collapse[id^='collapse-'] .nav-link.sub-category {
    font-size: 0.85em;
    padding: 0.25rem 0.5rem;
    text-align: center;
    font-weight: normal;
    max-width: 95%;
    margin: 0.25rem auto;
}

/* Simple hover color change for subcategories - no animation */
.collapse[id^='collapse-'] .nav-link.sub-category:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Animation overrides specific to right side navigation */
.rightSideNav-collapse {
    transition: none !important;
    animation: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    height: auto !important;
    transform: none !important;
}

/* Override for right side nav collapses */
#rightSideNav .collapse, 
#rightSideNav .collapse.show,
.collapse[id^='collapse-'],
.collapse[id^='collapse-'].show {
    transition: none !important;
    animation: none !important;
    display: none;
}

#rightSideNav .collapse.show,
.collapse[id^='collapse-'].show {
    display: block;
}

@media (max-width: 768px) {
    #rightSideNav {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .side-nav .nav-link:hover {
        transform: none;
    }
}

.btn-sidenav {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
