/* Custom styles for UrbanFoods */

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode Styles */
[data-bs-theme="dark"] {
    --bs-body-bg: #121212;
    --bs-body-color: #e9ecef;
}

[data-bs-theme="dark"] body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .navbar {
    background-color: #1a1a1a !important;
    border-bottom: 1px solid #333;
}

[data-bs-theme="dark"] .navbar-brand {
    color: #28a745 !important;
}

[data-bs-theme="dark"] .navbar-nav .nav-link {
    color: #e9ecef !important;
}

[data-bs-theme="dark"] .navbar-nav .nav-link:hover {
    color: #28a745 !important;
}

[data-bs-theme="dark"] .card {
    background-color: #1e1e1e;
    border-color: #333;
    color: #e9ecef;
}

[data-bs-theme="dark"] .card-header {
    background-color: #28a745 !important;
    border-color: #28a745;
}

[data-bs-theme="dark"] .table {
    background-color: #1e1e1e;
    color: #e9ecef;
}

[data-bs-theme="dark"] .table thead th {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

[data-bs-theme="dark"] .table tbody tr {
    border-color: #333;
}

[data-bs-theme="dark"] .form-control {
    background-color: #2a2a2a;
    border-color: #444;
    color: #e9ecef;
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: #2a2a2a;
    border-color: #28a745;
    color: #e9ecef;
}

[data-bs-theme="dark"] .btn-outline-secondary {
    border-color: #666;
    color: #e9ecef;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: #666;
    border-color: #666;
}

[data-bs-theme="dark"] .alert {
    background-color: #2a2a2a;
    border-color: #444;
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #1e1e1e;
    border-color: #333;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e9ecef;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #333;
    color: #28a745;
}

[data-bs-theme="dark"] .modal-content {
    background-color: #1e1e1e;
    color: #e9ecef;
}

[data-bs-theme="dark"] .modal-header {
    background-color: #28a745;
    border-color: #28a745;
}

.navbar-brand {
    font-weight: bold;
    color: #28a745 !important;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background-color: #28a745;
    color: white;
    border-radius: 10px 10px 0 0 !important;
}

/* Button Styles */
.btn-primary {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-primary:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Food Item Cards */
.food-item-card {
    height: 100%;
}

.food-item-card .card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.food-item-card .card-body {
    padding: 1rem;
}

.food-item-card .card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.food-item-card .card-text {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Cart Styles */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
}

/* Order Status */
.status-pending {
    color: #ffc107;
}

.status-preparing {
    color: #17a2b8;
}

.status-ready {
    color: #28a745;
}

.status-delivered {
    color: #6c757d;
}

.status-cancelled {
    color: #dc3545;
}

/* Admin Dashboard */
.admin-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.admin-card .card-body {
    padding: 2rem;
}

.admin-card h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.admin-card p {
    opacity: 0.9;
}

/* Analytics Charts */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 992px) {
    .navbar-nav {
        text-align: center;
    }

    .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
    }

    .cart-sidebar {
        width: 90% !important;
    }
}

@media (max-width: 768px) {
    .food-item-card .card-img-top {
        height: 150px;
    }

    .admin-card .card-body {
        padding: 1.5rem;
    }

    .admin-card h3 {
        font-size: 2rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .card-body {
        padding: 1rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

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

    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .food-item-card .card-img-top {
        height: 120px;
    }

    .food-item-card .card-title {
        font-size: 1rem;
    }

    .food-item-card .card-text {
        font-size: 0.8rem;
    }

    .table-responsive {
        font-size: 0.8rem;
    }

    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.4rem;
    }

    .alert {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .modal-content {
        border-radius: 10px;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 1rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0.25rem;
        font-size: 0.9rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    h5 {
        font-size: 1rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-text {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
    }
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
}

/* Form Styles */
.form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Table Styles */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background-color: #28a745;
    color: white;
    border: none;
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background-color: #28a745;
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

/* Badge Styles */
.badge {
    font-size: 0.75em;
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}
