/* In-Dish · Menu page — light paper, dark green text, gold accents (as on in-dish.at/menu) */

:root {
  --bar-h: 3.75rem;
  --tabs-h: 3.25rem;
  --chips-h: 3rem;
  --top: env(safe-area-inset-top, 0px);
  --f-head: "Outfit", "Noto Sans Devanagari", "Noto Sans Arabic", sans-serif;
  --f-body: "Libre Baskerville", "Noto Serif Devanagari", "Noto Naskh Arabic", Georgia, serif;
}

body {
  background: var(--paper);
  color: var(--green-900);
}

/* ---------- Header ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: calc(var(--bar-h) + var(--top));
  padding: var(--top) 0.75rem 0;
  display: grid;
  grid-template-columns: 5.5rem 1fr 5.5rem;
  align-items: center;
  background: var(--green-900);
}

.bar__back {
  -webkit-tap-highlight-color: transparent;
  display: grid;
  place-items: center start;
  width: 2.75rem;
  height: 2.75rem;
  padding-inline-start: 0.5rem;
  font-family: var(--f-head);
  font-size: 1.4rem;
  color: var(--gold);
  text-decoration: none;
}

.bar__logo {
  height: 2.6rem;
  width: auto;
  justify-self: center;
}

.bar__lang {
  -webkit-tap-highlight-color: transparent;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0 1rem;
  font-family: var(--f-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--cream-2);
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

/* ---------- Tabs (Food / Drinks) ---------- */

.tabs {
  position: sticky;
  top: calc(var(--bar-h) + var(--top));
  z-index: 20;
  height: var(--tabs-h);
  display: flex;
  justify-content: center;
  gap: 2rem;
  background: var(--paper);
}

.tab {
  -webkit-tap-highlight-color: transparent;
  padding: 0 0.25rem;
  font-family: var(--f-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-900);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.tab[aria-current="true"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ---------- Section chips ---------- */

.chips {
  position: sticky;
  top: calc(var(--bar-h) + var(--tabs-h) + var(--top));
  z-index: 10;
  height: var(--chips-h);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--paper);
  border-bottom: 1px solid var(--beige);
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  -webkit-tap-highlight-color: transparent;
  flex: none;
  padding: 0.4rem 0.9rem;
  font-family: var(--f-head);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--green-900);
  text-decoration: none;
  border: 1px solid var(--beige);
  border-radius: 0;
}

.chip.is-active {
  color: var(--cream);
  background: var(--green-900);
  border-color: var(--green-900);
}

/* ---------- Menu ---------- */

.menu {
  max-width: 36rem;
  margin-inline: auto;
  padding: 0 1.25rem;
}

.section {
  padding-top: 2rem;
  scroll-margin-top: calc(var(--bar-h) + var(--tabs-h) + var(--chips-h) + var(--top));
}

.section__title {
  margin: 0 0 0.5rem;
  font-family: var(--f-head);
  font-size: 1.6rem;
  font-weight: 600;
  text-align: center;
  color: var(--green-900);
}

.items { list-style: none; margin: 0; padding: 0; }

.item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--beige);
}

.item:last-child { border-bottom: 0; }

.item__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.item__name {
  margin: 0;
  font-family: var(--f-head);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.item__price {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.95rem;
  white-space: nowrap;
}

.item__desc {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--olive);
}

.item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin: 0.45rem 0 0;
  font-family: var(--f-head);
  font-size: 0.75rem;
}

.tag {
  padding: 0.1rem 0.55rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 0;
}

.tag--vegan { color: var(--green-900); border: 1px solid var(--olive); }
.tag--spicy { color: var(--red); border: 1px solid var(--red); }

.item__allergens {
  letter-spacing: 0.08em;
  color: var(--gold);
  font-weight: 500;
}

/* ---------- Allergen legend ---------- */

.legend {
  margin-top: 3rem;
  padding: 2rem 1.25rem max(2.5rem, env(safe-area-inset-bottom));
  background: var(--green-900);
  color: var(--beige);
}

.legend > * { max-width: 36rem; margin-inline: auto; }

.legend__title {
  margin: 0 0 1rem;
  font-family: var(--f-head);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.legend__list {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.82rem;
}

.legend__row { display: flex; gap: 0.6rem; }
.legend__row dt { font-family: var(--f-head); font-weight: 600; color: var(--gold); min-width: 1ch; }
.legend__row dd { margin: 0; }

.legend__note {
  margin-top: 1.25rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(229, 216, 203, 0.7);
}

/* ---------- Language sheet ---------- */

.sheet {
  width: 100%;
  max-width: 30rem;
  margin: auto auto 0;
  padding: 0 1.25rem max(1.25rem, env(safe-area-inset-bottom));
  color: var(--green-900);
  background: var(--paper);
  border: 0;
  border-radius: 0;
}

.sheet::backdrop { background: rgba(0, 35, 18, 0.6); }

.sheet__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 0 0.5rem;
}

.sheet__head h2 {
  margin: 0;
  font-family: var(--f-head);
  font-size: 1.1rem;
  font-weight: 600;
}

.sheet__close {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--green-900);
  background: none;
  border: 0;
  cursor: pointer;
}

.sheet__list { list-style: none; margin: 0; padding: 0; }

.sheet__opt {
  -webkit-tap-highlight-color: transparent;
  display: flex;
  justify-content: space-between;
  width: 100%;
  min-height: 3.25rem;
  align-items: center;
  padding: 0 0.25rem;
  font-family: var(--f-head);
  font-size: 1.05rem;
  color: var(--green-900);
  text-align: start;
  background: none;
  border: 0;
  border-top: 1px solid var(--beige);
  cursor: pointer;
}

.sheet__opt[aria-current="true"] { color: var(--gold); font-weight: 600; }
.sheet__opt[aria-current="true"]::after { content: "✓"; }

/* ---------- Right-to-left (Arabic) ---------- */

[dir="rtl"] .bar__back span { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .item__price { align-items: flex-start; }
