:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.app-main {
    width: 100%;
}

.card {
    transition: transform 0.2s;
}

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

.table th {
    font-weight: 600;
}

.btn {
    transition: all 0.2s;
}

.btn:hover {
    transform: scale(1.05);
}

/* Scanner Styles */
#scanner {
    position: relative;
    overflow: hidden;
}

#scanner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meal-scanner {
    width: 100%;
    height: 260px;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.meal-scanner video,
.meal-scanner canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meal-search-results {
    max-height: 420px;
    overflow-y: auto;
}

.meal-result-item {
    text-align: left;
}

.selected-food-actions {
    min-width: 220px;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.9rem;
    }
}

/* DatePicker Styling */
#calendarDatePicker {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}

#calendarDatePicker:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Mobile Adjustments */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 70px; /* Space for bottom nav */
    }
}

.nav-link.active {
    color: var(--primary-color) !important;
}

.bi {
    line-height: 1;
}

.fixed-bottom .nav-link {
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.list-group-item {
    border-color: rgba(0, 0, 0, 0.08);
}

@media (max-width: 767.98px) {
    .card:hover,
    .btn:hover {
        transform: none;
    }

    h1,
    .h1 {
        font-size: 1.55rem;
    }

    .table-responsive table {
        min-width: 640px;
    }

    .meal-search-group {
        flex-direction: column;
    }

    .meal-search-group > .form-control,
    .meal-search-group > .btn {
        width: 100%;
        border-radius: var(--bs-border-radius) !important;
    }

    .selected-food-actions {
        width: 100%;
        min-width: 0;
    }

    .selected-food-actions .btn {
        width: 100%;
    }
}
