/* ============================================================
   NUTRIZUDO™ — Brand Overrides for Tabler
   Neon Yellow (#FFE600) on Pure Black
   ============================================================ */

/* ── Override Tabler Primary Color & Custom Design Variables ── */
:root,
[data-bs-theme="dark"] {
    --tblr-primary: #FFE600;
    --tblr-primary-rgb: 255, 230, 0;
    --tblr-primary-fg: #000000;
    --tblr-link-color: #FFE600;
    --tblr-link-hover-color: #FFF200;

    /* ── Core Palette ── */
    --bg-main: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1c1c1c;

    --text-primary: #ffffff;
    --text-secondary: #cbd5e1; /* high contrast slate-300 */

    --accent-primary: #FFE600;       /* Amarillo Neón */
    --accent-secondary: #D600FF;     /* Púrpura Neón */
    --accent-danger: #FF4444;
    --accent-warning: #FF9800;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-light: rgba(255, 255, 255, 0.15);

    --gradient-brand: linear-gradient(135deg, #FFE600, #D600FF);

    /* ── Element Backgrounds ── */
    --bg-navbar: rgba(0, 0, 0, 0.95);
    --bg-input: rgba(255, 255, 255, 0.04);
    --bg-table-th: rgba(255, 255, 255, 0.03);
    --bg-excel-th: rgba(255, 255, 255, 0.04);
    --bg-img-wrapper: rgba(255, 255, 255, 0.03);
    --bg-grid-header: rgba(255, 230, 0, 0.12);
    --bg-empty-state: rgba(255, 255, 255, 0.01);
    --bg-grid-container: rgba(255, 255, 255, 0.01);
    --bg-img-wrapper-photo: rgba(0, 0, 0, 0.3);
    --bg-detail-img-wrapper: rgba(0, 0, 0, 0.4);
    --bg-detail-desc: rgba(255, 255, 255, 0.02);
    --bg-detail-macro-item: rgba(255, 255, 255, 0.03);
    --bg-detail-elaboration: rgba(255, 255, 255, 0.02);

    /* ── Ambient Gradients ── */
    --bg-gradient-1: rgba(255, 230, 0, 0.04);
    --bg-gradient-2: rgba(214, 0, 255, 0.04);

    /* ── Effects ── */
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-neon: 0 0 25px rgba(255, 230, 0, 0.25);
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Neon Utilities & Glow Effects ── */
.text-neon {
    color: var(--accent-primary) !important;
    text-shadow: 0 0 10px rgba(255, 230, 0, 0.4);
}

.text-neon-purple {
    color: var(--accent-secondary) !important;
    text-shadow: 0 0 10px rgba(214, 0, 255, 0.4);
}

.btn-neon {
    background: var(--gradient-brand) !important;
    color: #000 !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 0 15px rgba(255, 230, 0, 0.3) !important;
    transition: var(--transition) !important;
}

.btn-neon:hover {
    box-shadow: 0 0 25px rgba(255, 230, 0, 0.5) !important;
    transform: translateY(-2px);
}

.glow-effect {
    box-shadow: var(--shadow-neon);
}

/* ── Glassmorphism Cards ── */
body.theme-dark .card {
    background: rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
}

body.theme-dark .card-header {
    background: rgba(255, 255, 255, 0.01) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}

body.theme-dark .card-footer {
    background: rgba(255, 255, 255, 0.01) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
}
/* ── Sidebar Neon Styling ── */
body.theme-dark .navbar-vertical .nav-link {
    transition: var(--transition) !important;
    border-left: 3px solid transparent;
}

body.theme-dark .navbar-vertical .nav-link:hover {
    background: rgba(255, 230, 0, 0.05) !important;
    color: var(--accent-primary) !important;
}

body.theme-dark .navbar-vertical .nav-link.active {
    background: linear-gradient(90deg, rgba(255,230,0,0.1) 0%, rgba(0,0,0,0) 100%) !important;
    color: var(--accent-primary) !important;
    border-left: 3px solid var(--accent-primary) !important;
    text-shadow: 0 0 10px rgba(255, 230, 0, 0.3) !important;
}

body.theme-dark .navbar-vertical .nav-link.active .nav-link-icon {
    color: var(--accent-primary) !important;
    filter: drop-shadow(0 0 8px rgba(255, 230, 0, 0.5));
}

body.theme-dark .navbar-brand-autodark svg rect {
    fill: url(#bGrad) !important;
}
/* ── Body & Backgrounds ── */
body.theme-dark {
    background-color: #0a0a0a;
    color: #f8fafc !important;
    --tblr-body-color: #f8fafc !important;
    --tblr-body-color-rgb: 248, 250, 252 !important;
    --tblr-secondary-color: #cbd5e1 !important;
    --tblr-secondary-color-rgb: 203, 213, 225 !important;
    --tblr-muted-color: #94a3b8 !important;
    --tblr-muted-color-rgb: 148, 163, 184 !important;
}

/* Force higher contrast on specific Tabler elements */
body.theme-dark .text-secondary,
body.theme-dark .text-muted {
    color: #cbd5e1 !important;
}

body.theme-dark .form-label,
body.theme-dark .form-check-label {
    color: #f8fafc !important;
    font-weight: 600;
}

body.theme-dark .form-control,
body.theme-dark .form-select {
    color: #ffffff !important;
    background-color: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

body.theme-dark .form-control::placeholder {
    color: #718096 !important;
}

body.theme-dark .card-title,
body.theme-dark .card-header {
    color: #ffffff !important;
}

body.theme-dark .subheader {
    color: #FFE600 !important;
    font-weight: 700;
}

.theme-dark .page {
    --tblr-bg-surface: #0a0a0a;
    --tblr-bg-surface-secondary: #111111;
    --tblr-bg-surface-tertiary: #1a1a1a;
}

/* ── Sidebar Customization ── */
.navbar-vertical {
    background: #0d0d0d !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.navbar-vertical .nav-link {
    color: rgba(255, 255, 255, 0.55) !important;
    border-radius: 8px;
    margin: 1px 8px;
    transition: all 0.2s ease;
}

.navbar-vertical .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 230, 0, 0.08) !important;
}

.navbar-vertical .nav-link.active {
    color: #FFE600 !important;
    background: rgba(255, 230, 0, 0.1) !important;
    font-weight: 600;
}

.navbar-vertical .nav-link-icon {
    color: inherit !important;
}

.navbar-vertical .nav-link.active .nav-link-icon {
    color: #FFE600 !important;
}

/* ── Cards ── */
.theme-dark .card {
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.theme-dark .card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

/* ── Buttons ── */
.btn-primary {
    background-color: #FFE600 !important;
    border-color: #FFE600 !important;
    color: #000000 !important;
    font-weight: 700;
}

.btn-primary:hover {
    background-color: #FFF200 !important;
    border-color: #FFF200 !important;
    box-shadow: 0 4px 20px rgba(255, 230, 0, 0.3);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: #FFE600 !important;
    border-color: rgba(255, 230, 0, 0.4) !important;
}

.btn-outline-primary:hover {
    background-color: rgba(255, 230, 0, 0.1) !important;
    color: #FFE600 !important;
}

/* Ghost button */
.btn-ghost-primary {
    color: #FFE600;
}

.btn-ghost-primary:hover {
    background: rgba(255, 230, 0, 0.08);
    color: #FFF200;
}

/* ── Form Controls Focus ── */
.theme-dark .form-control:focus,
.theme-dark .form-select:focus {
    border-color: #FFE600;
    box-shadow: 0 0 0 0.25rem rgba(255, 230, 0, 0.15);
}

/* ── Progress Bars ── */
.progress-bar {
    background-color: #FFE600;
}

.progress-bar.bg-primary {
    background-color: #FFE600 !important;
}

/* ── Badges ── */
.badge.bg-primary {
    background-color: #FFE600 !important;
    color: #000 !important;
}

.badge.bg-primary-lt {
    background: rgba(255, 230, 0, 0.1) !important;
    color: #FFE600 !important;
}

/* ── Links ── */
a {
    color: #FFE600;
}

a:hover {
    color: #FFF200;
}

/* ── Tables ── */
.theme-dark .table > :not(caption) > * > * {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* ── Avatar Glow ── */
.avatar-glow {
    box-shadow: 0 0 20px rgba(255, 230, 0, 0.4);
}

/* ── Stat Card Accent Border ── */
.stat-card-accent {
    border-left: 3px solid #FFE600 !important;
}

/* ── Nav Pills Active ── */
.nav-pills .nav-link.active {
    background-color: #FFE600;
    color: #000;
}

/* ── Text Gradient ── */
.text-neon {
    color: #FFE600;
}

.text-gradient-neon {
    background: linear-gradient(135deg, #FFE600, #D600FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Neon Glow Shadow ── */
.shadow-neon {
    box-shadow: 0 0 25px rgba(255, 230, 0, 0.2);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #FFE600;
}

/* ── Category badges (meal types) ── */
.badge-desayuno { background: rgba(255, 230, 0, 0.12) !important; color: #FFE600 !important; }
.badge-almuerzo { background: rgba(214, 0, 255, 0.12) !important; color: #D600FF !important; }
.badge-comida { background: rgba(0, 200, 255, 0.10) !important; color: #00C8FF !important; }
.badge-merienda { background: rgba(255, 110, 0, 0.10) !important; color: #FF6E00 !important; }
.badge-cena { background: rgba(0, 255, 136, 0.08) !important; color: #00FF88 !important; }

/* ── Macro colors ── */
.text-prot { color: #FFE600 !important; }
.text-carb { color: #D600FF !important; }
.text-fat { color: #FF9800 !important; }
.text-kcal { color: #FFE600 !important; }

/* ── Meal Card Photo Grid ── */
.meal-photo-card {
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.meal-photo-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: #FFE600;
    box-shadow: 0 0 25px rgba(255, 230, 0, 0.2), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.meal-photo-card .card-img-top {
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.meal-photo-card:hover .card-img-top {
    transform: scale(1.05);
}

.meal-photo-placeholder {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    font-size: 2rem;
}

/* ── Grid Section Header (Desayuno, Almuerzo, etc) ── */
.grid-cat-header {
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.8rem;
    color: #000;
    background: #FFE600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 6px 6px 0 0;
}

/* ── Misc ── */
.page-header {
    margin-bottom: 1.5rem;
}

/* Responsive refinements */
@media (max-width: 991.98px) {
    .navbar-vertical {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }
}

/* ── Chart containers ── */
.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

.chart-container canvas {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
}

/* ── Dropdown ── */
.theme-dark .dropdown-menu {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.08);
}

.theme-dark .dropdown-item:hover {
    background: rgba(255, 230, 0, 0.08);
    color: #FFE600;
}

/* ── View switcher active state ── */
.btn-group .btn.active {
    background: #FFE600 !important;
    border-color: #FFE600 !important;
    color: #000 !important;
    font-weight: 700;
}

/* ── Meals Photo Grid & Zoom ── */
.meals-grid-container {
    width: 100%;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.grid-section-header {
    padding: 0.6rem 1rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: #000000;
    background: var(--accent-primary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.grid-section-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 1.5rem 0;
    font-style: italic;
    font-size: 0.8rem;
    opacity: 0.65;
    background: var(--bg-empty-state);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.meals-grid-subcontainer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    width: 100%;
    padding: 0 !important;
    border: none !important;
}

@media (min-width: 600px) and (max-width: 1023px) {
    .meals-grid-subcontainer {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .meals-grid-subcontainer {
        grid-template-columns: repeat(var(--desktop-columns, 6), 1fr);
    }
}

.meal-card-photo {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.meal-card-photo:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-neon), 0 8px 32px rgba(0, 0, 0, 0.5);
}

.meal-card-photo-img-wrapper {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-img-wrapper-photo);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.meal-card-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.meal-card-photo:hover .meal-card-photo-img {
    transform: scale(1.08);
}

.meal-card-photo-placeholder {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(255, 230, 0, 0.15));
}

.meal-card-photo-title {
    padding: 0.6rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Category indicator border — unified to fuchsia */
.meal-card-photo.row-cat-desayuno,
.meal-card-photo.row-cat-almuerzo,
.meal-card-photo.row-cat-comida,
.meal-card-photo.row-cat-merienda,
.meal-card-photo.row-cat-cena {
    border-top: 3px solid var(--accent-primary);
}

/* ── Category badges ── */
.category-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
}

.category-badge.desayuno { background: rgba(59, 130, 246, 0.1) !important; color: #3b82f6 !important; border-color: rgba(59, 130, 246, 0.2) !important; }
.category-badge.almuerzo { background: rgba(139, 92, 246, 0.1) !important; color: #8b5cf6 !important; border-color: rgba(139, 92, 246, 0.2) !important; }
.category-badge.comida { background: rgba(16, 185, 129, 0.1) !important; color: #10b981 !important; border-color: rgba(16, 185, 129, 0.2) !important; }
.category-badge.merienda { background: rgba(245, 158, 11, 0.1) !important; color: #f59e0b !important; border-color: rgba(245, 158, 11, 0.2) !important; }
.category-badge.cena { background: rgba(236, 72, 153, 0.1) !important; color: #ec4899 !important; border-color: rgba(236, 72, 153, 0.2) !important; }

/* ── Snacks and Salsas badges ── */
.category-badge.snack { background: rgba(255, 230, 0, 0.1) !important; color: #FFE600 !important; border-color: rgba(255, 230, 0, 0.2) !important; }
.category-badge.salsa { background: rgba(214, 0, 255, 0.1) !important; color: #D600FF !important; border-color: rgba(214, 0, 255, 0.2) !important; }

/* ── Expandable Detail Popup ── */
.detail-popup-container {
    width: 100%;
    max-width: 500px;
    background-color: #111111;
    border: 1px solid var(--border-color-light);
    border-radius: 14px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.detail-popup-container.expanded {
    max-width: 1000px;
}

.popup-columns-wrapper {
    display: flex;
    gap: 0;
    width: 100%;
    transition: gap 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-popup-container.expanded .popup-columns-wrapper {
    gap: 2rem;
}

.popup-left-column {
    flex: 1;
    min-width: 0;
}

.popup-right-column {
    flex: 0 0 0px;
    width: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-left: 0px solid var(--border-color-light);
    padding-left: 0;
    transition: flex 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-popup-container.expanded .popup-right-column {
    flex: 1 1 450px;
    max-width: 450px;
    width: auto;
    opacity: 1;
    border-left: none;
    padding-left: 4rem;
}

@media (max-width: 768px) {
    .detail-popup-container.expanded {
        max-width: 500px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .detail-popup-container.expanded .popup-columns-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }

    .detail-popup-container.expanded .popup-right-column {
        flex: 1;
        max-width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-color-light);
        padding-left: 0;
        padding-top: 1.5rem;
    }
}

/* ── Modal centering offset for sidebar ── */
@media (min-width: 992px) {
    .modal {
        padding-left: 15rem !important; /* Offset by typical sidebar width */
    }
}

.close-detail-modal {
    transition: all 0.3s ease;
}

.close-detail-modal:hover {
    color: var(--accent-primary) !important;
    transform: rotate(90deg);
}

.detail-modal-img-wrapper {
    width: calc(100% + 4rem) !important;
    margin-left: -2rem !important;
    margin-right: -2rem !important;
    margin-top: -2rem !important;
    margin-bottom: 1.5rem !important;
    max-height: 280px;
    border-radius: 14px 14px 0 0;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-detail-img-wrapper);
}

.detail-modal-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    pointer-events: none;
}

.detail-modal-category-badge-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    display: flex;
    gap: 0.3rem;
}

.detail-modal-category-badge-overlay .category-badge {
    background: var(--accent-primary) !important;
    color: #000000 !important;
    border-color: transparent !important;
    font-size: 0.72rem !important;
    padding: 0.25rem 0.65rem !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 20px rgba(255, 230, 0, 0.35) !important;
    text-shadow: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
}

.detail-modal-category-badge-overlay .category-badge.desayuno,
.detail-modal-category-badge-overlay .category-badge.almuerzo,
.detail-modal-category-badge-overlay .category-badge.comida,
.detail-modal-category-badge-overlay .category-badge.merienda,
.detail-modal-category-badge-overlay .category-badge.cena,
.detail-modal-category-badge-overlay .category-badge.snack,
.detail-modal-category-badge-overlay .category-badge.salsa {
    background: var(--accent-primary) !important;
    color: #000000 !important;
    border-color: transparent !important;
}

.detail-modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-modal-img-placeholder {
    font-size: 5rem;
    padding: 2rem 0;
}

.detail-modal-title {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.detail-modal-category {
    margin-bottom: 1rem;
}

.detail-modal-desc {
    background: var(--bg-detail-desc);
    border-left: 4px solid var(--accent-primary);
    border-right: none;
    border-top: none;
    border-bottom: none;
    padding: 0.85rem 1.15rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    font-style: italic;
}

.detail-modal-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.detail-modal-macros-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.detail-modal-macro-item {
    flex: 1;
    background: var(--bg-detail-macro-item);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem;
    text-align: center;
    transition: var(--transition);
}

.detail-modal-macro-item:hover {
    border-color: rgba(255, 230, 0, 0.2);
}

.detail-modal-macro-val {
    font-size: 1.1rem;
    font-weight: 700;
}

.detail-modal-macro-val.prot { color: #FFE600; }
.detail-modal-macro-val.carb { color: #D600FF; }
.detail-modal-macro-val.fat { color: #FF9800; }
.detail-modal-macro-val.kcal { color: var(--accent-primary); }

.detail-modal-macro-lbl {
    font-size: 0.68rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 0.2rem;
    letter-spacing: 0.04em;
}

.detail-modal-elaboration-content {
    background: var(--bg-detail-elaboration);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 0.85rem;
}

.meal-card-photo .category-badge,
.detail-modal-category-badge-overlay .category-badge {
    color: #000000 !important;
    font-weight: 700;
    text-shadow: none;
}

.meal-card-photo .category-badge.desayuno,
.meal-card-photo .category-badge.almuerzo,
.meal-card-photo .category-badge.comida,
.meal-card-photo .category-badge.merienda,
.meal-card-photo .category-badge.cena,
.meal-card-photo .category-badge.snack,
.meal-card-photo .category-badge.salsa {
    background-color: var(--accent-primary) !important;
    border-color: transparent !important;
    color: #000000 !important;
}

/* ── Meals Infinite Carousel ── */
.meals-carousel-wrapper {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    border-radius: var(--radius-sm);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.meals-carousel-track {
    display: inline-flex;
    gap: 0.5rem;
    animation: scroll-carousel 150s linear infinite;
    padding-right: 0.5rem; /* Gap spacing compensation */
}

.meals-carousel-track:hover {
    animation-play-state: paused;
}

.meals-carousel-item {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    background: var(--bg-img-wrapper-photo);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.meals-carousel-item:hover {
    transform: scale(1.1);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-neon);
    z-index: 2;
}

.meals-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meals-carousel-item-placeholder {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 5px rgba(255, 230, 0, 0.15));
}

@keyframes scroll-carousel {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
