/*
The menu page (menu.html), whose dishes build_static.py generates from
src/menu.json. The root font size is 20px (see sass.css), so 1rem = 20px.
*/

#menu {
  text-align: left;
  padding: 1.5rem 0 1rem;
}

#menu .wrapper {
  overflow: visible;
  max-width: 1100px;
}

#menu .menu-title {
  text-align: center;
  font-size: 1.6rem;
  margin: 0 0 1rem;
}

.menu-intro {
  max-width: 38em;
  margin: 0 auto;
  font-size: 0.8rem;
  line-height: 1.5;
}

.menu-intro summary {
  text-align: center;
  cursor: pointer;
  color: #BA0707;
  font-weight: 500;
}

.menu-motto {
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  color: #BA0707;
}

.menu-key,
.menu-pdf {
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.6;
}

/* Section links: stay at the top of the screen while scrolling. */
.menu-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 0.4rem;
  margin-top: 1rem;
  padding: 0.4rem 1rem;
  /* sass.css makes every nav width: 100%; keep the padding inside that. */
  box-sizing: border-box;
  color: #1f201a;
  background: #ffffff;
  border-top: 1px solid #dddddd;
  border-bottom: 1px solid #dddddd;
}

.menu-nav a,
.menu-nav a:visited {
  border: 0;
  padding: 0.3rem 0.4rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.menu-nav a:hover {
  color: #BA0707;
}

.menu-section {
  text-align: left;
  padding-top: 1rem;
  /* Keep headings clear of the sticky section links when jumped to. */
  scroll-margin-top: 5rem;
}

.menu-section > h2 {
  font-size: 1.3rem;
  margin: 1rem 0 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 3px solid #BA0707;
}

.zh {
  font-weight: 400;
  color: #555555;
}

.menu-note {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-style: italic;
  color: #444444;
}

.dishes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 0 2.5rem;
}

.dish {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 0.8rem;
  align-items: start;
  padding: 0.8rem 0;
  border-bottom: 1px solid #eeeeee;
}

.dish.has-photo {
  grid-template-columns: 6rem 1fr auto;
}

.dish-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.dish h3 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
}

.dish-desc,
.options-title {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  font-style: italic;
  color: #444444;
}

.chilli {
  font-size: 0.7rem;
  white-space: nowrap;
}

.diet {
  color: #2e7d32;
  font-weight: 500;
}

.dish h3 .diet,
.optional {
  font-size: 0.7rem;
}

.optional {
  font-weight: 400;
  font-style: italic;
  color: #2e7d32;
}

.dish-price {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.dish-price li + li {
  margin-top: 0.3rem;
}

.dish-price .label {
  display: block;
  font-size: 0.55rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666666;
}

.dish-options {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0;
  font-size: 0.75rem;
}

.dish-options li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.4rem;
  padding: 0.1rem 0;
}

.dish-options .price {
  margin-left: auto;
  font-weight: 600;
  white-space: nowrap;
}

.dish-options .opt-desc {
  flex-basis: 100%;
  font-style: italic;
  color: #444444;
}

.dish-subheading {
  grid-column: 1 / -1;
  padding-top: 1rem;
}

.dish-subheading h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.menu-small-print p {
  font-size: 0.7rem;
  line-height: 1.5;
  color: #444444;
}

@media screen and (max-width: 620px) {
  #menu .wrapper {
    width: auto;
    margin: 0 16px;
  }

  /* One scrolling row of section links instead of several lines. */
  .menu-nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0.3rem 0.5rem;
  }

  .dish.has-photo {
    grid-template-columns: 4.5rem 1fr auto;
  }
}
