/* Mobile Responsive Styles */

/* Mobile First Approach */
@media (max-width: 768px) {
    /* Sidebar adjustments */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1050;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .page-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Header adjustments */
    .header {
        padding: 0 15px;
    }
    
    .header-left a {
        font-size: 16px;
        padding: 10px 0;
    }
    
    /* Table responsiveness */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 600px;
    }
    
    /* Form adjustments */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn-group .btn {
        width: auto;
        margin-bottom: 0;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: 20px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* Timetable grid adjustments */
    .schedule-item {
        font-size: 0.7rem;
        padding: 5px;
        margin-bottom: 5px;
    }
    
    /* Filter forms */
    .row.g-3 > div {
        margin-bottom: 10px;
    }
    
    /* Pagination */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .page-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* Dashboard cards */
    .dash-widget {
        margin-bottom: 20px;
    }
    
    /* User menu */
    .user-menu {
        margin-right: 0;
    }
    
    .user-text h6 {
        font-size: 14px;
    }
    
    .user-text p {
        font-size: 12px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    
    .page-wrapper {
        margin-left: 200px;
    }
    
    .table {
        font-size: 14px;
    }
    
    .schedule-item {
        font-size: 0.75rem;
    }
}

/* Mobile menu toggle */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

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

/* Responsive utilities */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    .mobile-hide {
        display: none !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
}

/* Timetable specific mobile styles */
@media (max-width: 768px) {
    .timetable-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .timetable-table {
        min-width: 800px;
    }
    
    .timetable-table th,
    .timetable-table td {
        min-width: 100px;
        font-size: 12px;
        padding: 8px 4px;
    }
    
    .schedule-item {
        font-size: 10px;
        line-height: 1.2;
        padding: 3px;
    }
    
    /* Mobile timetable view switcher */
    .mobile-view-switcher {
        display: block;
        margin-bottom: 15px;
    }
    
    .mobile-view-switcher .btn {
        width: auto;
        margin-right: 10px;
        margin-bottom: 5px;
    }
}

/* Print styles for mobile */
@media print {
    .sidebar,
    .header,
    .mobile_btn,
    .btn,
    .pagination {
        display: none !important;
    }
    
    .page-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .table {
        font-size: 10px;
    }
}