/* Mobile Navigation Styles */

/* Mobile header (if created dynamically) */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0 20px;
    align-items: center;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1001;
}

.mobile-menu-btn .menu-line {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    margin: 5px auto;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive styles */
@media (max-width: 768px) {
    /* Show mobile elements */
    .mobile-header {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* Adjust main content for fixed header */
    body {
        padding-top: 60px;
    }
    
    /* Hide desktop sidebar by default */
    .sidebar,
    .nav-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -280px !important;
        width: 280px !important;
        height: 100vh !important;
        z-index: 999 !important;
        transition: left 0.3s ease !important;
        overflow-y: auto !important;
    }
    
    /* Show sidebar when mobile menu is open */
    .sidebar.mobile-open,
    .nav-sidebar.mobile-open {
        left: 0 !important;
    }
    
    /* Adjust main content */
    main,
    .main-content,
    .dashboard-main {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Adjust any fixed headers in main content */
    .main-header,
    .dashboard-header {
        left: 0 !important;
        padding-left: 60px !important; /* Space for menu button */
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar,
    .nav-sidebar {
        width: 70px !important;
    }
    
    .sidebar .nav-label,
    .nav-sidebar .nav-label {
        display: none;
    }
    
    .sidebar .logo-text,
    .nav-sidebar .logo-text {
        display: none;
    }
    
    main,
    .main-content,
    .dashboard-main {
        margin-left: 70px !important;
    }
}

/* Ensure proper stacking on mobile */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .insights-grid {
        grid-template-columns: 1fr !important;
    }
    
    .vendor-grid {
        grid-template-columns: 1fr !important;
    }
    
    .rfq-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
}