/* ==========================================================================
   HYPERCAL NUTRITION TRACKING V2 STYLESHEET
   Scoped classes: .hc-nutri-*, .hc-meal-*, .hc-macro-*, .hc-copy-*
   ========================================================================== */

/* Page layout container */
.hc-nutri-page {
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
}

.hc-nutri-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

/* ==========================================================================
   DATE NAVIGATOR V2 — SLEEK TOOLBAR
   ========================================================================== */
.hc-nutri-nav-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    max-width: 100%;
}

@media (max-width: 575.98px) {
    .hc-nutri-nav-bar {
        padding: 6px 8px;
    }
}

.hc-nutri-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.hc-nutri-nav-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.hc-nutri-nav-btn:hover:not(.disabled) {
    background: #f1f5f9;
    color: #0f172a;
}

.hc-nutri-date-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .hc-nutri-date-trigger {
        padding: 5px 8px;
        font-size: 0.8rem;
        gap: 4px;
    }
}

.hc-nutri-date-trigger:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #dc2626;
}

.hc-nutri-date-trigger i.bi-calendar3 {
    color: #dc2626;
    font-size: 0.9rem;
}

.hc-nutri-today-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: #dc2626;
    text-decoration: none;
    padding: 3px 6px;
    border-radius: 6px;
    background: #fef2f2;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.hc-nutri-today-link:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* ==========================================================================
   DAILY MACRO OVERVIEW CARD
   ========================================================================== */
.hc-overview-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.hc-cal-box {
    background: #0f172a;
    color: #ffffff;
    border-radius: 10px;
    padding: 16px 18px;
}

.hc-macro-bar-track {
    height: 6px;
    border-radius: 3px;
    background: #f1f5f9;
    overflow: hidden;
}

.hc-macro-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.hc-macro-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    text-align: center;
}

/* ==========================================================================
   MEAL GROUPS & FOOD ROWS V2
   ========================================================================== */
.hc-meal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.hc-meal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 10px;
}

.hc-meal-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hc-meal-macros {
    font-size: 0.78rem;
    font-family: monospace;
    color: #64748b;
}

.hc-food-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: all 0.15s ease;
}

.hc-food-row:hover {
    background: #ffffff;
    border-color: #cbd5e1;
}

.hc-food-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
}

.hc-food-meta {
    font-size: 0.75rem;
    font-family: monospace;
    color: #64748b;
}

.hc-food-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   COPY MODAL & FOOD PICKER V2
   ========================================================================== */
.hc-copy-tree {
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    background: #f8fafc;
}

.hc-copy-meal-group {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.hc-copy-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.82rem;
}

.hc-copy-item-row:last-child {
    border-bottom: none;
}

/* ==========================================================================
   FOOD PICKER V3 — LARGER UI, FOOD ICONS & DUAL COLUMN EXPERIENCE
   ========================================================================== */
.hc-food-picker-dialog {
    max-width: 1180px;
    width: 96%;
    margin: 1.25rem auto;
}

.hc-food-picker-content {
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 35px -5px rgba(15, 23, 42, 0.12), 0 10px 15px -6px rgba(15, 23, 42, 0.06);
    background: #ffffff;
    overflow: hidden;
}

.hc-food-picker-left {
    min-height: 620px;
    max-height: 720px;
    display: flex;
    flex-direction: column;
}

.hc-food-picker-right {
    min-height: 620px;
    max-height: 720px;
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
}

/* Meal Type Selector Button */
.hc-meal-picker-btn {
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 10px;
    transition: all 0.15s ease;
}

.hc-meal-picker-btn:hover,
.hc-meal-picker-btn:focus {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

/* Search input with focus ring */
.hc-search-group {
    flex-shrink: 0 !important;
    min-height: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: stretch !important;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hc-search-group:focus-within {
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.hc-search-group .input-group-text {
    display: flex;
    align-items: center;
    border: none !important;
    background: #ffffff !important;
    padding-left: 1rem;
    padding-right: 0.5rem;
}

.hc-search-group .form-control {
    border: none !important;
    box-shadow: none !important;
    font-size: 0.95rem;
    height: 100% !important;
    min-height: 46px !important;
    padding: 10px 12px;
    line-height: 1.5;
}

.hc-search-group .form-control::placeholder {
    color: #94a3b8;
}

.hc-search-group .btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Category Filter Pills (Multi-line Wrap Grid layout per Image 3, with original emojis & red theme per Image 1) */
.hc-cat-wrap-grid {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-bottom: 4px;
}

.hc-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    white-space: nowrap;
}

.hc-cat-pill:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-1px);
}

.hc-cat-pill.active {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.25);
    transform: translateY(-1px);
}

.hc-cat-pill .cat-icon {
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Macro Fat High-Contrast Color System */
.text-macro-fat {
    color: #d97706 !important;
}

.bg-macro-fat {
    background-color: #d97706 !important;
}

.border-macro-fat {
    border-color: #d97706 !important;
}

.badge-macro-fat {
    background-color: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

/* "Hay ăn" Recent Foods Row */
.hc-recent-foods-scroll {
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 4px;
}

.hc-recent-chip {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.hc-recent-chip:hover {
    border-color: #dc2626;
    background: #fef2f2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
}

/* Quick Kcal Banner */
.hc-quick-kcal-banner {
    background: #fffbeb;
    border: 1.5px dashed #f59e0b;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.hc-quick-kcal-banner:hover {
    background: #fef3c7;
    border-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
}

/* Food Items List */
.hc-picker-foods-scroll {
    overflow-y: auto;
    flex-grow: 1;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
}

.hc-picker-food-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    min-height: 72px;
}

.hc-picker-food-item:last-child {
    border-bottom: none;
}

.hc-picker-food-item:hover {
    background-color: #f8fafc;
}

.hc-picker-food-item.active {
    background-color: #fff1f2;
    box-shadow: inset 3px 0 0 #e11d48;
}

.hc-food-icon-box {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    user-select: none;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.hc-food-icon-box.sm {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    font-size: 18px;
}

.hc-picker-food-item:hover .hc-food-icon-box {
    background-color: #ffffff;
    transform: scale(1.05);
}

.hc-food-item-name {
    font-size: 0.94rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.hc-food-item-meta {
    font-size: 0.8rem;
    color: #64748b;
    font-family: monospace;
}

.hc-btn-row-add {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #e11d48;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s ease;
}

.hc-btn-row-add:hover {
    background: #e11d48;
    border-color: #e11d48;
    color: #ffffff;
    transform: scale(1.1);
}

/* Portion Panel (Right Column) */
.hc-food-portion-icon-box {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 14px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    line-height: 1;
}

.hc-portion-stepper {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.hc-stepper-btn {
    min-width: 48px;
    border: none !important;
    background: #f8fafc !important;
    color: #334155 !important;
    font-size: 1.15rem;
    font-weight: 700;
    transition: all 0.15s ease;
}

.hc-stepper-btn:hover {
    background: #f1f5f9 !important;
    color: #e11d48 !important;
}

.hc-portion-stepper .form-control {
    border: none !important;
    box-shadow: none !important;
    font-size: 1.35rem;
    font-weight: 800;
    background: #ffffff !important;
    min-height: 48px;
}

.hc-portion-stepper .input-group-text {
    border: none !important;
    background: #ffffff !important;
    font-weight: 700;
    color: #475569;
}

/* Mobile Responsive Drawer */
@media (max-width: 991.98px) {
    .hc-food-picker-dialog {
        max-width: 100%;
        width: 100%;
        margin: 0;
        height: 100%;
        min-height: 100vh;
    }

    .hc-food-picker-content {
        height: 100%;
        min-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .hc-food-picker-left {
        min-height: auto;
        max-height: none;
        flex-grow: 1;
        padding: 1rem !important;
    }

    .hc-cat-wrap-grid {
        gap: 6px;
    }

    .hc-cat-pill {
        padding: 6px 11px;
        font-size: 0.82rem;
    }

    .hc-food-picker-right {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        min-height: auto;
        max-height: 85vh;
        overflow-y: auto;
        background: #ffffff;
        border-top: 2px solid #e2e8f0;
        border-left: none;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 25px rgba(15, 23, 42, 0.15);
        z-index: 1070;
        padding: 1.25rem !important;
        transform: translateY(105%);
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex !important;
    }

    .hc-food-picker-right.hc-mobile-sheet-open {
        transform: translateY(0);
    }

    .hc-mobile-sheet-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(2px);
        z-index: 1065;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .hc-mobile-sheet-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }
}

