/* Baharan (restaurant-1) — bespoke meal-list page.
   Rendered by wwwroot/custom-themes/restaurant-1/Views/{Meals,_MealCategoryPartial,_MealPartial}.cshtml
   (see MenuResTest2.Infrastructure.RestaurantThemeViewLocationExpander). Only page-specific
   layout lives here — the color/radius/shadow custom properties are already set by theme.css
   and template.css, which stay loaded for the shared _NavBar/_Footer hero + footer band.

   Menu rows carry no photo by design: only category thumbnails get an image, so the whole
   list leans on typography, a warm surface card, and a small gold accent mark per row
   instead. Contrast checked against theme.css's palette: --color-foreground (#2C2C2C) on
   --color-surface (#FFFDF9) and --color-muted (#726b64) on the same surface both clear
   WCAG AA for body text (>7:1 and 5.16:1 respectively); --primary-color (#A31621) on that
   surface clears 7.6:1 for the price. */

/* ---- category section ---- */
body.has-custom-template .rb-section {
  margin: clamp(28px, 5vw, 44px) 0;
}

body.has-custom-template .rb-section__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

body.has-custom-template .rb-section__thumb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
}

body.has-custom-template .rb-section__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.has-custom-template .rb-section__thumb--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: var(--color-on-primary, #fff);
}

body.has-custom-template .rb-section__thumb--icon svg {
  width: 55%;
  height: 55%;
  stroke: currentColor;
  fill: none;
}

body.has-custom-template .rb-section__title {
  margin: 0;
  font-size: clamp(1.25rem, 3.6vw, 1.55rem);
  font-weight: 700;
  color: var(--color-foreground);
}

body.has-custom-template .rb-section__rule {
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* Overrides style.css's ".category-meal-container > div" card-grid default (4-column
   image grid) — this restaurant's item list is a single-column typographic list. */
body.has-custom-template .category-meal-container > .rb-meal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* ---- meal row (no photo) ---- */
body.has-custom-template .meal-container.rb-meal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  height: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px 20px;
  cursor: pointer;
  transition: box-shadow var(--transition-base, 220ms ease),
    transform var(--transition-base, 220ms ease),
    border-color var(--transition-base, 220ms ease);
}

body.has-custom-template .meal-container.rb-meal:hover,
body.has-custom-template .meal-container.rb-meal:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--color-accent) 55%, var(--color-border));
}

body.has-custom-template .rb-meal__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--color-foreground);
}

body.has-custom-template .rb-meal__title::before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Ingredients sit on their own line directly under the title — never inline beside it. */
body.has-custom-template .rb-meal__ingredients {
  margin: 0;
  max-width: 62ch;
  font-size: 0.86rem;
  line-height: 1.9;
  color: var(--color-muted);
}

/* Selector deliberately as specific as the ".meal-container > div:first-of-type" /
   ":last-of-type" rules in style.css it must beat (it's the row's only div child, so it
   matches both) — this can't rely on stylesheet load order to win the tie. */
body.has-custom-template .meal-container.rb-meal > .rb-meal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: auto;
  height: auto;
  max-height: none;
  overflow: visible;
  background-color: transparent;
  margin-top: 6px;
  padding: 10px 0 0;
  border-top: 1px dashed var(--color-border);
}

body.has-custom-template .rb-meal__price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color);
}

body.has-custom-template .rb-meal__price small {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-muted);
}

@media (max-width: 480px) {
  body.has-custom-template .meal-container.rb-meal {
    padding: 14px 16px;
  }
}
