/* ==========================================================================
   NUTRIGURU — MEALS CARDS & AI COMPONENTS
   Meal Cards, Key Nutrients, NG Coach AI Card, Food Recognition
   ========================================================================== */

/* ==========================================================================
   1. KEY NUTRIENTS EXPANDABLE SECTION (LEVEL 2 CARD)
   ========================================================================== */
.key-nutrients-section {
  background: var(--ng-surface, rgba(15, 28, 34, 0.72));
  border: 1px solid var(--ng-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--ng-radius-lg, 22px);
  padding: 14px 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.key-nutrients-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.key-nutrients-title {
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
}

.key-nutrients-toggle {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-lime, #B7FF00);
  cursor: pointer;
  padding: 4px 6px;
  transition: opacity 0.15s ease;
}

.key-nutrients-toggle:hover {
  opacity: 0.8;
}

.key-nutrients-compact-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.key-nutrient-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--ng-radius-sm, 12px);
  padding: 8px 10px;
}

.key-nutrient-chip-head {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.key-nutrient-chip-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, #A8B1B8);
}

.key-nutrient-chip-vals {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.key-nutrient-chip-vals small {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted, #68757D);
}

.key-nutrient-chip-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.key-nutrient-chip-fill {
  height: 100%;
  border-radius: 999px;
}

.other-nutrients-grid {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  animation: fadeIn 0.2s ease-out;
}

.other-nutrients-grid.nutrition-grid-expanded {
  display: grid;
}

.other-nutrient-cell {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--ng-radius-sm, 12px);
  padding: 6px 10px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   2. MEAL CARDS & MEAL LIST
   ========================================================================== */
.meal-card {
  position: relative;
  background: rgba(14, 25, 31, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--ng-radius-md, 16px);
  padding: 12px 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.meal-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.meal-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meal-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.meal-card-content {
  flex: 1;
  min-width: 0;
}

.meal-card-heading {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meal-card-title {
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meal-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(183, 255, 0, 0.1);
  color: var(--accent-lime, #B7FF00);
  border: 1px solid rgba(183, 255, 0, 0.2);
  text-transform: uppercase;
  flex-shrink: 0;
}

.meal-card-meta {
  font-size: 11px;
  color: var(--text-muted, #68757D);
  margin-top: 2px;
}

.meal-card-cal-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 4px 8px;
  background: rgba(183, 255, 0, 0.06);
  border: 1px solid rgba(183, 255, 0, 0.18);
  border-radius: 10px;
  flex-shrink: 0;
  line-height: 1;
}

.meal-card-cal-num {
  font-size: 14px;
  font-weight: 900;
  color: var(--accent-lime, #B7FF00);
}

.meal-card-cal-unit {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted, #68757D);
  margin-top: 1px;
}

.meal-card-macros {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 11px;
  color: var(--text-secondary, #A8B1B8);
}

.macro-stat strong {
  color: #FFFFFF;
  font-weight: 700;
}

.meal-health-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
}

.meal-health-bars {
  display: flex;
  gap: 3px;
}

.meal-health-bars > div {
  width: 8px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.meal-health-bars > div.is-filled {
  background: var(--accent-lime, #B7FF00);
}

.meal-health-score {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-lime, #B7FF00);
}

.meal-health-label {
  font-size: 10px;
  color: var(--text-muted, #68757D);
}

/* ==========================================================================
   3. EMPTY STATE FOR MEALS (COMPACT 180-220PX)
   ========================================================================== */
.meals-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 190px;
  padding: 24px 16px;
  background: rgba(14, 25, 31, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--ng-radius-lg, 22px);
}

.meals-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(183, 255, 0, 0.08);
  border: 1px solid rgba(183, 255, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-lime, #B7FF00);
  font-size: 18px;
  margin-bottom: 10px;
}

.meals-empty-title {
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
}

.meals-empty-sub {
  font-size: 12px;
  color: var(--text-muted, #68757D);
  max-width: 240px;
  margin: 4px auto 14px;
  line-height: 1.35;
}

.meals-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 800;
  color: #070D14;
  background: var(--accent-lime, #B7FF00);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.meals-empty-btn:active {
  transform: scale(0.96);
}

/* ==========================================================================
   4. NG COACH CARD (LEVEL 1 AI INTELLIGENCE COMPONENT)
   ========================================================================== */
.ng-coach-card {
  position: relative;
  background: linear-gradient(145deg, rgba(14, 28, 34, 0.92) 0%, rgba(8, 18, 24, 0.96) 100%);
  border: 1px solid rgba(183, 255, 0, 0.22);
  border-radius: var(--ng-radius-xl, 26px);
  padding: 18px 20px;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.7), 0 0 28px -10px rgba(183, 255, 0, 0.15);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: hidden;
}

.ng-coach-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(183, 255, 0, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.ng-coach-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ng-coach-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.ng-coach-sparkle-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(183, 255, 0, 0.12);
  border: 1px solid rgba(183, 255, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-lime, #B7FF00);
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(183, 255, 0, 0.2);
}

.ng-coach-header-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ng-coach-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-lime, #B7FF00);
  line-height: 1;
}

.ng-coach-title {
  font-size: 15px;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.2;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ng-coach-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1;
}

.ng-coach-score-pill i {
  font-size: 11px;
}

.ng-coach-score-val {
  font-size: 13px;
  font-weight: 900;
}

.ng-coach-score-max {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.7;
}

.ng-coach-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.ng-coach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.15s ease;
}

.ng-coach-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.ng-coach-chip-text {
  white-space: nowrap;
}

.ng-coach-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.ng-coach-suggestion-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ng-coach-check {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(183, 255, 0, 0.15);
  border: 1px solid rgba(183, 255, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-lime, #B7FF00);
  font-size: 9px;
  flex-shrink: 0;
  margin-top: 1px;
}

.ng-coach-suggestion-text {
  font-size: 12px;
  font-weight: 500;
  color: #E2E8F0;
  line-height: 1.35;
  margin: 0;
}

.ng-coach-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #B7FF00 0%, #34D399 100%);
  color: #071200;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.01em;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 20px -4px rgba(183, 255, 0, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.ng-coach-cta-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -3px rgba(183, 255, 0, 0.45);
}

.ng-coach-cta-btn:active {
  transform: scale(0.98);
}

.ng-coach-cta-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ng-coach-ai-warning {
  font-size: 11px;
  color: var(--accent-amber, #FBBF24);
  text-align: center;
  margin-top: 8px;
}

/* ==========================================================================
   5. FOOD RECOGNITION PHOTO CARD
   ========================================================================== */
.screen-photo-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(16, 32, 40, 0.85) 0%, rgba(10, 20, 26, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--ng-radius-lg, 22px);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.screen-photo-illustration {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
  flex-shrink: 0;
}
