/* Sidebar custom styles */

/* Custom scrollbar for sidebar */
.scrollbar-thin {
    scrollbar-width: thin;
}

.scrollbar-track-slate-800 {
    scrollbar-color: #334155 #1e293b;
}

.scrollbar-thumb-slate-600 {
    scrollbar-color: #475569 #334155;
}

/* Webkit browsers */
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
}

.scrollbar-track-slate-800::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 3px;
}

.scrollbar-thumb-slate-600::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

.scrollbar-thumb-slate-600::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Sidebar animation improvements */
.sidebar-transition {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Menu item hover effects */
.menu-item-hover {
    position: relative;
    overflow: hidden;
}

.menu-item-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.menu-item-hover:hover::before {
    left: 100%;
}

/* Submenu slide animation */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.submenu:not(.hidden) {
    max-height: 500px;
}

/* Role badge glow effect */
.role-badge-glow {
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    animation: subtle-pulse 3s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    }
}

/* Mobile responsive adjustments */
@media (max-width: 1023px) {
    .sidebar-mobile {
        position: fixed !important;
        z-index: 50;
    }

    .main-content-mobile {
        margin-left: 0 !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sidebar {
        border-right: 2px solid #64748b;
    }

    .menu-item {
        border: 1px solid transparent;
    }

    .menu-item:hover,
    .menu-item:focus {
        border-color: #64748b;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .sidebar-transition,
    .submenu,
    .menu-item-hover::before {
        transition: none;
    }

    .role-badge-glow {
        animation: none;
    }
}
