/* Analytics Engineering LMS - Mobile Styles */

/* Mobile Menu Toggle */
.ae-lms-mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ae-lms-mobile-menu-toggle:hover {
    background: #f7fafc;
}

.ae-lms-mobile-menu-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    background: #667eea;
    margin: 3px auto;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.ae-lms-mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.ae-lms-mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.ae-lms-mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Sidebar Overlay */
.ae-lms-sidebar-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;
}

.ae-lms-sidebar-overlay.active {
    opacity: 1;
}

/* Mobile Responsive Breakpoints */
@media (max-width: 1024px) {
    .ae-lms-sidebar {
        width: 260px;
    }
    
    .ae-lms-main-content {
        margin-left: 260px;
    }
    
    .ae-lms-dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .ae-lms-mobile-menu-toggle {
        display: block;
    }
    
    /* Hide desktop sidebar */
    .ae-lms-sidebar {
        transform: translateX(-100%);
        width: 100%;
        max-width: 300px;
        transition: transform 0.3s ease;
    }
    
    .ae-lms-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    /* Adjust main content */
    .ae-lms-main-content {
        margin-left: 0;
        padding: 20px 15px;
    }
    
    /* Adjust banner */
    .ae-lms-banner-container {
        padding: 0 15px;
    }
    
    .ae-lms-banner-left {
        gap: 10px;
    }
    
    .ae-lms-page-title {
        font-size: 16px;
    }
    
    .ae-lms-user-stats {
        display: none;
    }
    
    .ae-lms-user-name {
        display: none;
    }
    
    /* Grid adjustments */
    .ae-lms-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ae-lms-modules-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ae-lms-projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Card adjustments */
    .ae-lms-dashboard-card {
        padding: 15px;
    }
    
    .ae-lms-module-card {
        padding: 15px;
    }
    
    .ae-lms-project-card {
        padding: 15px;
    }
    
    /* Typography adjustments */
    .ae-lms-dashboard-title {
        font-size: 24px;
    }
    
    .ae-lms-dashboard-subtitle {
        font-size: 14px;
    }
    
    .ae-lms-card-title {
        font-size: 15px;
    }
    
    .ae-lms-module-title {
        font-size: 15px;
    }
    
    /* Practice hub tabs */
    .ae-lms-practice-tabs {
        flex-direction: column;
        gap: 4px;
    }
    
    .ae-lms-practice-tab {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    /* Profile adjustments */
    .ae-lms-profile-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .ae-lms-profile-name {
        font-size: 20px;
    }
    
    .ae-lms-profile-title {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .ae-lms-main-content {
        padding: 15px 10px;
    }
    
    .ae-lms-banner-container {
        padding: 0 10px;
    }
    
    .ae-lms-dashboard-card,
    .ae-lms-module-card,
    .ae-lms-project-card {
        padding: 12px;
    }
    
    .ae-lms-dashboard-title {
        font-size: 20px;
    }
    
    .ae-lms-dashboard-subtitle {
        font-size: 13px;
    }
    
    .ae-lms-card-title {
        font-size: 14px;
    }
    
    .ae-lms-module-title {
        font-size: 14px;
    }
    
    .ae-lms-profile-avatar {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .ae-lms-profile-name {
        font-size: 18px;
    }
    
    .ae-lms-profile-title {
        font-size: 12px;
    }
    
    .ae-lms-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .ae-lms-nav-link {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .ae-lms-nav-icon {
        font-size: 14px;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .ae-lms-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .ae-lms-nav-link {
        min-height: 44px;
    }
    
    .ae-lms-mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .ae-lms-dashboard-card:hover,
    .ae-lms-module-card:hover,
    .ae-lms-project-card:hover {
        transform: none;
    }
    
    .ae-lms-btn:hover {
        transform: none;
    }
    
    .ae-lms-nav-link:hover {
        transform: none;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .ae-lms-sidebar {
        width: 280px;
        max-width: 50vw;
    }
    
    .ae-lms-main-content {
        padding: 15px 20px;
    }
    
    .ae-lms-dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .ae-lms-logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .ae-lms-dashboard-card,
    .ae-lms-module-card,
    .ae-lms-project-card {
        transition: none;
    }
    
    .ae-lms-progress-fill {
        transition: none;
    }
    
    .ae-lms-btn {
        transition: none;
    }
    
    .ae-lms-sidebar {
        transition: none;
    }
    
    .ae-lms-sidebar-overlay {
        transition: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ae-lms-page {
        background: #1a202c !important;
        color: #e2e8f0 !important;
    }
    
    .ae-lms-top-banner {
        background: #2d3748;
        border-bottom-color: #4a5568;
    }
    
    .ae-lms-sidebar {
        background: #2d3748;
        border-right-color: #4a5568;
    }
    
    .ae-lms-dashboard-card,
    .ae-lms-module-card,
    .ae-lms-project-card,
    .ae-lms-practice-content {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .ae-lms-page-title {
        color: #e2e8f0;
    }
    
    .ae-lms-sidebar-title {
        color: #e2e8f0;
    }
    
    .ae-lms-sidebar-subtitle {
        color: #a0aec0;
    }
    
    .ae-lms-nav-link {
        color: #a0aec0;
    }
    
    .ae-lms-nav-link:hover {
        color: #667eea;
    }
    
    .ae-lms-user-name {
        color: #e2e8f0;
    }
    
    .ae-lms-card-title,
    .ae-lms-module-title {
        color: #e2e8f0;
    }
    
    .ae-lms-card-content,
    .ae-lms-module-description {
        color: #a0aec0;
    }
}

/* Print styles */
@media print {
    .ae-lms-sidebar,
    .ae-lms-top-banner,
    .ae-lms-mobile-menu-toggle,
    .ae-lms-sidebar-overlay {
        display: none !important;
    }
    
    .ae-lms-main-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
        padding: 0 !important;
    }
    
    .ae-lms-dashboard-card,
    .ae-lms-module-card,
    .ae-lms-project-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }
}