/* ==========================================================================
   MENU PAGE (menu.html) — full-menu browser: a row of category buttons
   (Breakfast / Lunch / Dinner) that swap the menu image(s) shown below.
   Driven by js/menu-page.js. Buttons reuse the shared .btn system; the
   active button uses the same brand-red fill as .btn-primary and the
   Location "today" highlight.
   ========================================================================== */

.menu-page {
  padding: var(--section-pad-y) 0;
}

.menu-page__header {
  text-align: center;
  margin-bottom: var(--space-section-gap);
}

.menu-page__heading {
  margin-top: var(--space-xs);
  /* Smaller than the hero h1 — a single-line label that must not overflow
     narrow viewports (the hero splits its h1 across word-per-line spans;
     this one doesn't). */
  font-size: var(--fs-h2);
  overflow-wrap: break-word;
}

/* ---- Category buttons ---------------------------------------------------- */
/* Equal-width columns so the three buttons stay balanced even though the
   labels differ a lot in length; the longest one wraps to two lines and
   all three grow to match its height. */
.menu-page__tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  width: 100%;
  max-width: 560px;
  margin: 0 auto var(--space-section-gap);
}

/* Sits on top of .btn — transparent by default, brand-red when active.
   Override .btn's nowrap + wide side padding so long labels wrap cleanly
   instead of clipping. min-width:0 lets the grid track shrink below the
   button's content width rather than forcing the row wider than its column. */
.menu-page__tab {
  min-width: 0;
  background: transparent;
  color: var(--color-text-primary);
  border: 1.5px solid rgba(17, 17, 17, 0.15);
  padding: 0.85rem 0.85rem;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
}

.menu-page__tab:hover,
.menu-page__tab:focus-visible {
  border-color: var(--color-brand-red);
  color: var(--color-brand-red);
}

.menu-page__tab.is-active {
  background: var(--color-brand-red);
  border-color: var(--color-brand-red);
  color: var(--color-white);
}

.menu-page__tab.is-active:hover,
.menu-page__tab.is-active:focus-visible {
  background: var(--color-brand-red-dark);
  border-color: var(--color-brand-red-dark);
  color: var(--color-white);
}

/* ---- Image display ----------------------------------------------------- */
.menu-page__display {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.menu-page__image {
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  animation: menu-page-fade var(--transition-base);
}

@keyframes menu-page-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---- Mobile ----------------------------------------------------------- */
@media (max-width: 600px) {
  .menu-page__tabs {
    /* single column: full-width buttons stay equal and balanced, and the
       long "Farmers Market Menu" label has room to sit on one or two lines
       without squeezing "Lunch" / "Dinner" into a lopsided grid */
    grid-template-columns: 1fr;
    max-width: 320px;
  }

  .menu-page__tab {
    padding: 0.85rem 1rem;
  }

  .menu-page__display {
    gap: var(--space-md);
  }
}
