/**
 * Force Light Theme for Mobile
 * Override any dark mode settings on mobile devices
 */

/* Force light color scheme */
@media (max-width: 768px) {
    :root {
        color-scheme: light !important;
        --bg-color: #ffffff !important;
        --text-color: #333333 !important;
        --card-bg: #ffffff !important;
        --border-color: #e9ecef !important;
    }
    
    * {
        color-scheme: light !important;
    }
    
    /* Force body to be white */
    body {
        background-color: #ffffff !important;
        color: #333333 !important;
        background-image: none !important;
    }
    
    /* Force main content areas to be white */
    .main-content,
    .container,
    .row,
    .col,
    [class*="col-"] {
        background-color: transparent !important;
        color: inherit !important;
    }
    
    /* Force cards to be white */
    .card,
    .product-card,
    .card-body,
    .card-header,
    .card-footer {
        background-color: #ffffff !important;
        color: #333333 !important;
        border-color: #e9ecef !important;
    }
    
    /* Force buttons to have correct colors */
    .btn-primary {
        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
        color: #ffffff !important;
        border-color: #007bff !important;
    }
    
    .btn-light {
        background-color: #ffffff !important;
        color: #007bff !important;
        border-color: #007bff !important;
    }
    
    .btn-outline-light {
        background-color: transparent !important;
        color: #ffffff !important;
        border-color: #ffffff !important;
    }
    
    .btn-outline-primary {
        background-color: transparent !important;
        color: #007bff !important;
        border-color: #007bff !important;
    }
    
    /* Force text colors */
    .text-primary {
        color: #007bff !important;
    }
    
    .text-secondary {
        color: #6c757d !important;
    }
    
    .text-success {
        color: #28a745 !important;
    }
    
    .text-danger {
        color: #dc3545 !important;
    }
    
    .text-warning {
        color: #ffc107 !important;
    }
    
    .text-info {
        color: #17a2b8 !important;
    }
    
    .text-dark {
        color: #333333 !important;
    }
    
    .text-muted {
        color: #6c757d !important;
    }
    
    /* Override dark backgrounds */
    .bg-dark {
        background-color: #f8f9fa !important;
        color: #333333 !important;
    }
    
    .bg-secondary {
        background-color: #f8f9fa !important;
        color: #333333 !important;
    }
    
    /* Force header to be light */
    .main-header {
        background-color: rgba(255, 255, 255, 0.95) !important;
        color: #333333 !important;
        backdrop-filter: blur(10px) !important;
    }
    
    .navbar-light {
        background-color: #f8f9fa !important;
    }
    
    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.98) !important;
        color: #333333 !important;
    }
    
    /* Force navigation links */
    .nav-link {
        color: #333333 !important;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        color: #007bff !important;
    }
    
    .nav-link.active {
        color: #007bff !important;
    }
    
    /* Force dropdown menus */
    .dropdown-menu {
        background-color: #ffffff !important;
        color: #333333 !important;
        border-color: #e9ecef !important;
    }
    
    .dropdown-item {
        color: #333333 !important;
    }
    
    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: #f8f9fa !important;
        color: #007bff !important;
    }
    
    /* Force forms */
    .form-control {
        background-color: #ffffff !important;
        color: #333333 !important;
        border-color: #e9ecef !important;
    }
    
    .form-control:focus {
        background-color: #ffffff !important;
        color: #333333 !important;
        border-color: #007bff !important;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    }
    
    /* Force alerts */
    .alert {
        color: inherit !important;
    }
    
    .alert-success {
        background-color: #d4edda !important;
        color: #155724 !important;
        border-color: #c3e6cb !important;
    }
    
    .alert-danger {
        background-color: #f8d7da !important;
        color: #721c24 !important;
        border-color: #f5c6cb !important;
    }
    
    .alert-warning {
        background-color: #fff3cd !important;
        color: #856404 !important;
        border-color: #ffeaa7 !important;
    }
    
    .alert-info {
        background-color: #d1ecf1 !important;
        color: #0c5460 !important;
        border-color: #bee5eb !important;
    }
    
    /* Force modals */
    .modal-content {
        background-color: #ffffff !important;
        color: #333333 !important;
    }
    
    .modal-header {
        background-color: #ffffff !important;
        color: #333333 !important;
        border-bottom-color: #e9ecef !important;
    }
    
    .modal-body {
        background-color: #ffffff !important;
        color: #333333 !important;
    }
    
    .modal-footer {
        background-color: #ffffff !important;
        color: #333333 !important;
        border-top-color: #e9ecef !important;
    }
    
    /* Force tables */
    .table {
        color: #333333 !important;
    }
    
    .table th {
        background-color: #f8f9fa !important;
        color: #333333 !important;
        border-color: #e9ecef !important;
    }
    
    .table td {
        border-color: #e9ecef !important;
    }
    
    /* Force badges */
    .badge {
        color: #ffffff !important;
    }
    
    .badge.bg-secondary {
        background-color: #6c757d !important;
    }
    
    /* Force breadcrumbs */
    .breadcrumb {
        background-color: #f8f9fa !important;
    }
    
    .breadcrumb-item a {
        color: #007bff !important;
    }
    
    /* Force pagination */
    .page-link {
        background-color: #ffffff !important;
        color: #007bff !important;
        border-color: #e9ecef !important;
    }
    
    .page-link:hover {
        background-color: #f8f9fa !important;
        color: #0056b3 !important;
    }
    
    .page-item.active .page-link {
        background-color: #007bff !important;
        color: #ffffff !important;
        border-color: #007bff !important;
    }
}

/* Override dark mode completely on mobile */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
    :root {
        color-scheme: light !important;
    }
    
    body {
        background-color: #ffffff !important;
        color: #333333 !important;
    }
    
    * {
        color-scheme: light !important;
    }
}

/* Force light theme class */
.force-light-theme,
.force-light-theme * {
    color-scheme: light !important;
}

.force-light-theme {
    background-color: #ffffff !important;
    color: #333333 !important;
}

/* Mobile device class overrides */
.mobile-device {
    background-color: #ffffff !important;
    color: #333333 !important;
}

.mobile-device .bg-dark {
    background-color: #f8f9fa !important;
    color: #333333 !important;
}

.mobile-device .text-white {
    color: #333333 !important;
}

.mobile-device .text-light {
    color: #666666 !important;
}
