/* STATIC SIDEBAR - NO HOVER EFFECTS OR TRANSITIONS */

/* Sidebar base styling */
.sidebar {
    width: 320px;
    min-height: 100vh;
    height: 100vh;
    position: relative;
    z-index: 50;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    background-color: white !important;
    background: white !important;
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Mobile responsive behavior */
@media (max-width: 1024px) {
    .sidebar {
        width: 300px;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        overflow-x: hidden;
        overflow-y: auto;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Smooth transitions for swipe gestures */
    .sidebar.swiping {
        transition: transform 0.1s ease-out;
    }
    
    /* Overlay for mobile */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }
    
    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* Ensure main content doesn't get squished */
    .flex-1 {
        width: 100%;
        min-width: 0;
    }
    
    /* Touch swipe zone indicators */
    .swipe-zone {
        position: fixed;
        left: 0;
        top: 0;
        width: 20px;
        height: 100vh;
        z-index: 998;
        background: transparent;
    }
}

/* Laptop screen optimizations */
@media (min-width: 1024px) and (max-width: 1366px) {
    .sidebar {
        width: 300px;
    }
    
    /* Ensure table headers are readable on laptop screens */
    .table th {
        font-size: 0.875rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    /* Ensure topbar content fits properly */
    .topbar-content {
        min-width: 0;
        flex-shrink: 1;
    }
}

/* Tablet responsive behavior */
@media (min-width: 768px) and (max-width: 1024px) {
    .sidebar {
        width: 280px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .sidebar {
        width: 100vw;
        max-width: 100vw;
    }
}

/* Large desktop screens */
@media (min-width: 1920px) {
    .sidebar {
        width: 360px;
    }
}

/* Extra large screens */
@media (min-width: 2560px) {
    .sidebar {
        width: 400px;
    }
}

/* Navigation text styling - always visible */
.nav-text {
    white-space: nowrap;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    width: auto;
    overflow: visible;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Enhanced navigation spacing */
.nav-link {
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.nav-link:hover {
    background-color: #f3f4f6;
}

/* Responsive navigation text */
@media (max-width: 768px) {
    .nav-text {
        font-size: 0.875rem;
    }
    
    .nav-link {
        padding: 0.625rem 0.875rem;
    }
}

@media (min-width: 1920px) {
    .nav-text {
        font-size: 1rem;
    }
    
    .nav-link {
        padding: 0.875rem 1.25rem;
    }
}

/* Navigation item styling - static */
.nav-link,
.nav-dropdown-toggle,
.nav-sub-link {
    background-color: transparent !important;
    color: #1f2937 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.875rem !important;
    min-height: 2.5rem;
    border: none !important;
    box-shadow: none !important;
}

/* Icon styling - consistent size and color */
.nav-link img,
.nav-dropdown-toggle img,
.nav-sub-link img {
    width: 1.5rem !important;
    height: 1.5rem !important;
    object-fit: cover;
    filter: brightness(0) saturate(100%) invert(0%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0%) contrast(100%) !important;
    flex-shrink: 0;
}

/* Responsive icon sizing */
@media (min-width: 1920px) {
    .nav-link img,
    .nav-dropdown-toggle img,
    .nav-sub-link img {
        width: 1.625rem !important;
        height: 1.625rem !important;
    }
}

.nav-sub-link img {
    width: 1.25rem !important;
    height: 1.25rem !important;
}

/* Exception for RBA Logo - Keep original colors and enforce 100px size */
.sidebar.bg-white img[src*="rba logo"],
.sidebar.bg-white img[src*="rba-logo"],
.sidebar.bg-white img[alt*="RBA Logo"] {
    filter: none !important;
    width: 100px !important;
    height: 100px !important;
    max-width: 100px !important;
    max-height: 100px !important;
}

/* Exception for RBA Logo in Member Sidebar - Keep original colors and enforce 100px size */
.sidebar.bg-gray-900 img[src*="rba logo"],
.sidebar.bg-gray-900 img[src*="rba-logo"],
.sidebar.bg-gray-900 img[alt*="RBA Logo"] {
    filter: none !important;
    width: 100px !important;
    height: 100px !important;
    max-width: 100px !important;
    max-height: 100px !important;
}

/* Text colors for different sidebar types */
.sidebar.bg-white .nav-item-text,
.sidebar.bg-white .nav-text span {
    color: #1f2937 !important;
}

.sidebar.bg-gray-900 .nav-item-text,
.sidebar.bg-gray-900 .nav-text span {
    color: #ffffff !important;
}

/* Focus states for accessibility - minimal */
.nav-link:focus,
.nav-dropdown-toggle:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Dropdown content styling */
.nav-dropdown-content {
    background-color: transparent;
    border-radius: 0;
    margin-top: 0.25rem;
    overflow: hidden;
    box-shadow: none;
    position: relative;
    z-index: 60;
    border: none;
}

.nav-dropdown-content a {
    text-decoration: none;
    color: inherit;
}

/* Ensure dropdown content is visible when not hidden */
.nav-dropdown-content:not(.hidden) {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Legacy dropdown content support */
.dropdown-content:not(.hidden) {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Dropdown arrow styling */
.dropdown-arrow {
    filter: none !important;
}

/* Ensure dropdown content stays above other elements */
.nav-dropdown-item,
.dropdown-item {
    position: relative;
    z-index: 10;
}

.nav-dropdown-content,
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
}