/* Menu page: small head, one row sticky section bar, dish rows, tinted foot. */

.menu-open {
  padding-block: 24px 20px;
}

.menu-open__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.05;
}

.menu-open__intro {
  margin: 8px 0 0;
  color: var(--muted);
}

/* The bar height lives here so the sticky offsets below can all read it. */
.menu-layout {
  --menu-nav-h: 60px;
}

/* The bar bleeds to the screen edges on phones and sticks under the header. */
.menu-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  margin-inline: calc(var(--gutter) * -1);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.menu-nav__scroller {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--menu-nav-h);
  padding-inline: var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}

.menu-nav__scroller::-webkit-scrollbar {
  display: none;
}

.menu-nav__group {
  flex: none;
  margin: 0 2px 0 8px;
  color: var(--soft);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-nav__group:first-child {
  margin-left: 0;
}

.menu-nav__link {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* The global link hover would stick after a tap on phones, so keep the ink colour
   and show the hover only on devices with a real pointer. */
.menu-nav__link:hover {
  color: var(--ink);
}

.menu-nav__icon {
  flex: none;
  margin-right: 8px;
  color: var(--accent);
}

/* On the filled current chip the icon turns white with the text. */
.menu-nav__link[aria-current="true"] .menu-nav__icon {
  color: inherit;
}

@media (hover: hover) {
  .menu-nav__link:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
}

.menu-nav__link[aria-current="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

/* Fade on the right edge so people see the row scrolls. */
.menu-nav::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 1px;
  width: 32px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--paper));
}

.menu-body {
  padding-bottom: 64px;
}

.menu-group__title {
  margin: 40px 0 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.menu-section {
  padding-top: 24px;
  scroll-margin-top: calc(var(--header-h) + var(--menu-nav-h) + 8px);
}

.menu-section__title {
  margin: 0 0 4px;
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.05;
}

.menu-section__icon {
  width: 0.8em;
  height: 0.8em;
  margin-right: 12px;
  vertical-align: -0.06em;
}

.menu-section__note {
  margin: 0 0 4px;
  color: var(--soft);
  font-size: 15px;
}

.menu-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

/* One dish: name and description on the left, price on the right. */
.menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 16px;
  align-items: start;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}

.menu-item__name {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.menu-item__desc {
  grid-column: 1 / 2;
  margin: 0;
  color: var(--soft);
  font-size: 15px;
  line-height: 1.45;
}

.menu-item__tags {
  grid-column: 1 / 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
}

.menu-item__fav,
.menu-item__veg {
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.menu-item__fav {
  background: var(--tint);
  color: var(--accent);
}

.menu-item__veg {
  border: 1px solid var(--line);
  color: var(--muted);
}

.menu-item__prices {
  grid-row: 1;
  grid-column: -2 / -1;
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.menu-item__price {
  display: block;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.menu-item__size {
  margin-right: 6px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 400;
}

/* Drinks: tighter rows, the size sits next to the price. */
.menu-section--drinks .menu-item {
  padding-block: 10px;
}

.menu-section--drinks .menu-item__name {
  font-weight: 400;
}

.menu-foot {
  margin-top: 40px;
  padding: 20px;
  background: var(--tint);
  border-radius: var(--radius-lg);
}

.menu-foot__cover,
.menu-foot__note {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 15px;
}

.menu-foot__cover strong {
  color: var(--ink);
}

.menu-foot__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.menu-foot__actions .btn {
  flex: 1 1 200px;
}

/* Desktop: the section links become a sticky column on the left. */
@media (min-width: 1024px) {
  .menu-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 760px);
    gap: 64px;
    justify-content: center;
  }

  .menu-nav {
    position: static;
    margin-inline: 0;
    background: none;
    border-bottom: 0;
  }

  .menu-nav::after {
    display: none;
  }

  .menu-nav__scroller {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    height: auto;
    padding: 24px 0 0;
    overflow: visible;
  }

  .menu-nav__group {
    margin: 16px 0 4px;
  }

  .menu-nav__link {
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius);
  }

  .menu-nav__link[aria-current="true"] {
    background: var(--tint);
    color: var(--accent);
  }

  .menu-section {
    scroll-margin-top: calc(var(--header-h) + 24px);
  }
}
