/**
 * Common Header Styles
 * Shared styles for sidebar navigation and mobile menu toggle
 * @version 1.0.0
 */

/* Elegant sidebar navigation improvements */
.sidebar-menu li a {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 4px 8px;
    padding: 12px 16px !important;
    position: relative;
    overflow: hidden;
}

.sidebar-menu li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar-menu li a:hover::before,
.sidebar-menu li.active a::before {
    transform: scaleY(1);
}

.sidebar-menu li a:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.sidebar-menu li a i {
    margin-right: 10px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* User section styling */
#sidebar-user-section a {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

#sidebar-user-section a:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

/* Navigation divider */
.nav-divider a {
    font-size: 12px !important;
    opacity: 0.7;
    padding: 8px 16px !important;
}

.nav-divider a:hover {
    opacity: 1;
}

/* How it works panel */
#how-it-works-panel {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Mobile Menu Toggle Button - Floating hamburger for narrow screens */
.mobile-menu-toggle {
    display: none;
    position: fixed !important;
    top: 15px;
    left: 15px;
    z-index: 9999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Centering properties for when display: flex is applied */
    align-items: center;
    justify-content: center;
    /* Text centering fallback */
    text-align: center;
    line-height: 44px;
    /* Ensure fixed positioning works even with transforms on parent */
    transform: translateZ(0);
    will-change: transform;
}

.mobile-menu-toggle:hover {
    transform: translateZ(0) scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.mobile-menu-toggle:active {
    transform: translateZ(0) scale(0.95);
}

/* Show on narrow screens (same breakpoint as sidebar collapse) */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Hide when sidebar is open */
.sidebar-open .mobile-menu-toggle {
    display: none !important;
}
