/*
 * Custom CSS for Shopping Cart
 * 
 * CUSTOMIZING BOOTSTRAP COLORS:
 * 
 * Bootstrap uses CSS variables (custom properties) that can be overridden.
 * The primary way to customize colors is to override these variables in :root
 * 
 * Default Bootstrap Colors:
 * --bs-primary: #0d6efd (blue)
 * --bs-secondary: #6c757d (gray)
 * --bs-success: #198754 (green)
 * --bs-danger: #dc3545 (red)
 * --bs-warning: #ffc107 (yellow)
 * --bs-info: #0dcaf0 (cyan)
 * --bs-light: #f8f9fa (light gray)
 * --bs-dark: #212529 (dark gray)
 *
 * To customize, uncomment and modify the section below:
 */

 @media DISABLED {
    :root {
        /* Primary brand color - affects buttons, links, navbar */
        --bs-primary: #0d6efd;
        --bs-primary-rgb: 13, 110, 253;
        
        /* Secondary color */
        --bs-secondary: #6c757d;
        --bs-secondary-rgb: 108, 117, 125;
        
        /* Success color - for success messages, badges */
        --bs-success: #198754;
        --bs-success-rgb: 25, 135, 84;
        
        /* Danger/Error color */
        --bs-danger: #dc3545;
        --bs-danger-rgb: 220, 53, 69;
        
        /* Warning color */
        --bs-warning: #ffc107;
        --bs-warning-rgb: 255, 193, 7;
        
        /* Info color */
        --bs-info: #0dcaf0;
        --bs-info-rgb: 13, 202, 240;
    }
}

/* ============================================
 * ACCESSIBILITY UTILITIES
 * ============================================ */

/* Skip navigation link for keyboard users */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    font-weight: bold;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Enhanced focus indicators for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
}

body.high-contrast a:focus,
body.high-contrast button:focus,
body.high-contrast input:focus,
body.high-contrast select:focus,
body.high-contrast textarea:focus {
    outline: 3px solid #FFFF00;
    outline-offset: 2px;
}

/* 
 * CUSTOM COLOR SCHEMES:
 */

 /* NATURE */
 @media DISABLED {
    :root {
        /* Primary brand color - affects buttons, links, navbar */
        --bs-primary: #0F2143;
        --bs-primary-rgb: 15, 33, 67;
        
        /* Secondary color */
        --bs-secondary: #6c757d;
        --bs-secondary-rgb: 108, 117, 125;
        
        /* Success color - for success messages, badges */
        --bs-success: #43572E;
        --bs-success-rgb: 67, 87, 46;
        
        /* Danger/Error color */
        --bs-danger: #dc3545;
        --bs-danger-rgb: 220, 53, 69;
        
        /* Warning color */
        --bs-warning: #8B6212;
        --bs-warning-rgb: 139, 98, 18;
        
        /* Info color */
        --bs-info: #354E56;
        --bs-info-rgb: 53, 78, 86;
    }
}

 /* BLUES */
:root {
    /* Primary brand color - affects buttons, links, navbar */
    --bs-primary: #023E8A;
    --bs-primary-rgb: 2, 62, 138;
    
    /* Secondary color */
    --bs-secondary: #6c757d;
    --bs-secondary-rgb: 108, 117, 125;
    
    /* Success color - for success messages, badges */
    --bs-success: #0077B6;
    --bs-success-rgb: 0, 119, 182;
    
    /* Danger/Error color */
    --bs-danger: #dc3545;
    --bs-danger-rgb: 220, 53, 69;
    
    /* Warning color */
    --bs-warning: #ffc107;
    --bs-warning-rgb: 255, 193, 7;
    
    /* Info color */
    --bs-info: #90E0EF;
    --bs-info-rgb: 144, 224, 239;
}

/* ============================================
 * CUSTOM COMPONENT STYLES
 * ============================================ */

/* Product Cards */
.product-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: none;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.product-card img {
    transition: opacity 0.2s ease-in-out;
}

.product-card:hover img {
    opacity: 0.9;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
}

.nav-link   {
    font-weight: 500;
    font-size: 1.25rem;
    color: white !important;
}

.navbar-cart-link {
    margin-left: auto;
    margin-right: 0;
    white-space: nowrap;
}

.cart-badge {
    position: absolute;
    top: 0.25rem;
    right: -0.6rem;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Cards */
.card {
    border-radius: 0.5rem;
    border: none;
}

.card-img-top {
    border-radius: 0.5rem 0.5rem 0 0;
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.5em 0.75em;
}

/* Links */
a {
    transition: color 0.2s ease-in-out;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a:hover {
    color: var(--bs-light) !important;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: none;
}

/* Table */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Pagination */
.pagination .page-link {
    color: var(--bs-primary);
    border: 1px solid #dee2e6;
    margin: 0 0.25rem;
    border-radius: 0.375rem;
}

.pagination .page-link:hover {
    background-color: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

.pagination .page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* Shopping Cart specific */
.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.375rem;
}

/* Loading spinner */
.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Utility classes */
.text-decoration-none:hover {
    text-decoration: underline !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
}

/* Animation classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ============================================
 * HIGH CONTRAST MODE - For Visually Impaired Users
 * ============================================ */

body.high-contrast {
    background-color: #000000 !important;
    color: #FFFF00 !important;
}

body.high-contrast * {
    background-color: #000000 !important;
    color: #FFFF00 !important;
    /* border-color: #FFFF00 !important; */
    border-color: transparent !important;
}

/* Links and buttons in high contrast */
body.high-contrast a {
    color: #FFFF00 !important;
    background-color: #000000 !important;
    /* border: 2px solid #FFFF00 !important; */
    border-color: transparent !important;
    /* text-decoration: underline; */
}

body.high-contrast .btn {
    color: #FFFF00 !important;
    background-color: #000000 !important;
    border: 2px solid #FFFF00 !important;
    /* text-decoration: underline; */
}

body.high-contrast a:hover,
body.high-contrast .btn:hover {
    background-color: #333333 !important;
    color: #FFFFFF !important;
}

/* Navbar in high contrast */
body.high-contrast .navbar {
    background-color: #1a1a1a !important;
    border-bottom: 3px solid #FFFF00 !important;
}

/* Cards in high contrast */
body.high-contrast .card {
    border: 4px solid #FFFF00 !important;
}

/* Form inputs in high contrast */
body.high-contrast input,
body.high-contrast select,
body.high-contrast textarea {
    background-color: #1a1a1a !important;
    color: #FFFF00 !important;
    border: 2px solid #FFFF00 !important;
}

body.high-contrast input:focus,
body.high-contrast select:focus,
body.high-contrast textarea:focus {
    background-color: #2a2a2a !important;
    border-color: #FFFFFF !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 0, 0.25) !important;
}

/* Badges in high contrast */
body.high-contrast .badge {
    background-color: #FFFF00 !important;
    color: #000000 !important;
    border: 2px solid #FFFF00 !important;
}

/* Alerts in high contrast */
body.high-contrast .alert {
    background-color: #1a1a1a !important;
    color: #FFFF00 !important;
    border: 3px solid #FFFF00 !important;
}

/* Footer in high contrast */
body.high-contrast footer {
    background-color: #0a0a0a !important;
    border-top: 3px solid #FFFF00 !important;
}

/* Images - add yellow border for visibility */
body.high-contrast img {
    /* border: 2px solid #FFFF00 !important; */
    border-color: transparent !important;
    opacity: 0.9;
}

/* Contrast toggle button active state */
body.high-contrast #contrastToggle {
    background-color: #FFFF00 !important;
    color: #000000 !important;
    border-color: #FFFF00 !important;
    font-weight: bold;
}

/* ============================================
 * ADMIN DASHBOARD STYLES
 * ============================================ */

/* Admin layout with sidebar */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background-color: #f8f9fa;
    padding: 20px;
    border-right: 1px solid #dee2e6;
}

body.high-contrast .admin-sidebar {
    background-color: #000000 !important;
    border-right: 3px solid #FFFF00 !important;
}

.admin-sidebar .nav-link {
    color: #495057;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    border-radius: 4px;
    margin-bottom: 5px;
    transition: background-color 0.2s;
}

.admin-sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: #212529;
}

.admin-sidebar .nav-link.active {
    background-color: #0d6efd;
    color: white;
    font-weight: 600;
}

body.high-contrast .admin-sidebar .nav-link {
    color: #FFFF00 !important;
}

body.high-contrast .admin-sidebar .nav-link:hover {
    background-color: #2a2a2a !important;
}

body.high-contrast .admin-sidebar .nav-link.active {
    background-color: #FFFF00 !important;
    color: #000000 !important;
}

.admin-content {
    flex: 1;
    padding: 30px;
}

/* Statistics Cards */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

body.high-contrast .stat-card {
    background-color: #1a1a1a !important;
    border: 3px solid #FFFF00 !important;
    color: #FFFF00 !important;
}

.stat-card h5 {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

body.high-contrast .stat-card h5 {
    color: #FFFF00 !important;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #0d6efd;
}

body.high-contrast .stat-card .stat-value {
    color: #FFFF00 !important;
}

.stat-card .stat-change {
    font-size: 0.9rem;
    margin-top: 10px;
    color: #6c757d;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.badge-pending {
    background-color: #ffc107;
    color: #000;
}

.badge-processing {
    background-color: #0dcaf0;
    color: #000;
}

.badge-shipped {
    background-color: #198754;
    color: #fff;
}

.badge-delivered {
    background-color: #0d6efd;
    color: #fff;
}

.badge-cancelled {
    background-color: #dc3545;
    color: #fff;
}

body.high-contrast .status-badge {
    background-color: #FFFF00 !important;
    color: #000000 !important;
    border: 2px solid #FFFF00 !important;
}

/* Admin Tables */
.admin-table {
    background: white;
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

body.high-contrast .admin-table {
    background-color: #1a1a1a !important;
    border: 3px solid #FFFF00 !important;
    color: #FFFF00 !important;
}

.admin-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

body.high-contrast .admin-table thead {
    background-color: #2a2a2a !important;
    border-bottom: 3px solid #FFFF00 !important;
}

.admin-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
}

body.high-contrast .admin-table th {
    color: #FFFF00 !important;
}

.admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
}

body.high-contrast .admin-table td {
    border-bottom: 1px solid #666 !important;
    color: #FFFF00 !important;
}

.admin-table tbody tr:hover {
    background-color: #f8f9fa;
}

body.high-contrast .admin-table tbody tr:hover {
    background-color: #2a2a2a !important;
}

/* Form controls in admin */
.admin-form-group {
    margin-bottom: 20px;
}

.admin-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #212529;
}

body.high-contrast .admin-form-group label {
    color: #FFFF00 !important;
}

.admin-form-group input,
.admin-form-group select,
.admin-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.95rem;
}

body.high-contrast .admin-form-group input,
body.high-contrast .admin-form-group select,
body.high-contrast .admin-form-group textarea {
    background-color: #1a1a1a !important;
    border: 2px solid #FFFF00 !important;
    color: #FFFF00 !important;
}

/* Action buttons in admin */
.admin-btn {
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.admin-btn-primary {
    background-color: #0d6efd;
    color: white;
}

.admin-btn-primary:hover {
    background-color: #0d5bde;
    text-decoration: none;
    color: white;
}

.admin-btn-success {
    background-color: #198754;
    color: white;
}

.admin-btn-success:hover {
    background-color: #157347;
    text-decoration: none;
    color: white;
}

.admin-btn-danger {
    background-color: #dc3545;
    color: white;
}

.admin-btn-danger:hover {
    background-color: #c82333;
    text-decoration: none;
    color: white;
}

body.high-contrast .admin-btn {
    background-color: #FFFF00 !important;
    color: #000000 !important;
    border: 3px solid #FFFF00 !important;
}

body.high-contrast .admin-btn:hover {
    background-color: #ffeb3b !important;
    color: #000000 !important;
}

/* Pagination */
.admin-pagination {
    margin-top: 30px;
    text-align: center;
}

.admin-pagination a,
.admin-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    color: #0d6efd;
}

.admin-pagination a:hover {
    background-color: #f8f9fa;
}

.admin-pagination span.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

body.high-contrast .admin-pagination a,
body.high-contrast .admin-pagination span {
    border: 2px solid #FFFF00 !important;
    color: #FFFF00 !important;
}

body.high-contrast .admin-pagination a:hover {
    background-color: #2a2a2a !important;
}

body.high-contrast .admin-pagination span.active {
    background-color: #FFFF00 !important;
    color: #000000 !important;
    border-color: #FFFF00 !important;
}
