/* Mobile Optimization for Aryan University Warehouse Management System */

/* Mobile Navigation - Only for old navbar */
@media (max-width: 768px) {
    .navbar:not(.modern-navbar) .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .navbar:not(.modern-navbar) .navbar-nav .nav-item {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .navbar:not(.modern-navbar) .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}

/* Mobile Dashboard Cards */
@media (max-width: 768px) {
    .dashboard-card {
        margin-bottom: 1rem;
    }
    
    .dashboard-card .card-body {
        padding: 1rem;
    }
    
    .dashboard-card .card-title {
        font-size: 1.1rem;
    }
    
    .dashboard-card .card-text {
        font-size: 0.9rem;
    }
}

/* Mobile Forms */
@media (max-width: 768px) {
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }
}

/* Mobile Tables */
@media (max-width: 768px) {
    .table-responsive {
        border: none;
    }
    
    .table th, .table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .table th {
        background-color: #f8f9fa;
        font-weight: 600;
    }
}

/* Mobile Warehouse Map */
@media (max-width: 768px) {
    #warehouse-map {
        height: 300px;
        touch-action: none;
    }
    
    .map-tools {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1000;
    }
    
    .map-tools .btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        margin-bottom: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
}

/* Mobile Product Cards */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 1rem;
    }
    
    .product-card .card-body {
        padding: 1rem;
    }
    
    .product-card .card-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .product-card .card-text {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
}

/* Mobile Search */
@media (max-width: 768px) {
    .search-form {
        margin-bottom: 1rem;
    }
    
    .search-form .form-control {
        font-size: 16px;
    }
    
    .search-form .btn {
        padding: 0.5rem 1rem;
    }
}

/* Mobile Pagination */
@media (max-width: 768px) {
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination .page-item {
        margin: 0.25rem;
    }
    
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* Mobile Alerts */
@media (max-width: 768px) {
    .alert {
        margin-bottom: 1rem;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .alert .btn {
        margin-top: 0.5rem;
        width: 100%;
    }
}

/* Mobile Modals */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        border-radius: 0.5rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Mobile Print Styles */
@media print and (max-width: 768px) {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* Touch Optimizations */
@media (max-width: 768px) {
    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-check-input {
        width: 20px;
        height: 20px;
    }
    
    .form-check-label {
        padding-left: 0.5rem;
    }
}

/* Mobile Camera Integration */
@media (max-width: 768px) {
    .camera-button {
        position: fixed;
        bottom: 20px;
        left: 20px;
        z-index: 1000;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    
    .camera-preview {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: black;
        z-index: 9999;
    }
    
    .camera-controls {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10000;
    }
}

/* Mobile Quick Actions */
@media (max-width: 768px) {
    .quick-actions {
        position: fixed;
        bottom: 80px;
        right: 20px;
        z-index: 1000;
    }
    
    .quick-actions .btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        margin-bottom: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
}

/* Mobile Status Indicators */
@media (max-width: 768px) {
    .status-indicator {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Mobile Loading States */
@media (max-width: 768px) {
    .loading-spinner {
        width: 30px;
        height: 30px;
    }
    
    .loading-text {
        font-size: 0.9rem;
    }
}

/* Mobile Notifications */
@media (max-width: 768px) {
    .toast-container {
        position: fixed;
        top: 20px;
        left: 20px;
        right: 20px;
        z-index: 9999;
    }
    
    .toast {
        margin-bottom: 0.5rem;
    }
}

/* Mobile Accessibility */
@media (max-width: 768px) {
    .sr-only-mobile {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    
    .focus-visible {
        outline: 2px solid #007bff;
        outline-offset: 2px;
    }
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
    .lazy-load {
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .lazy-load.loaded {
        opacity: 1;
    }
    
    .image-optimized {
        max-width: 100%;
        height: auto;
    }
}
