/* Beit Beirut digital menu: built for the table first. */

:root { --strip-h: 60px; }
html { scroll-behavior: auto; }   /* long menu jumps should be instant */
.page-menu { background: var(--ivory); }
.hdr--menu { position: relative; }

.mn { width: min(100% - 2 * var(--gutter), 1240px); margin-inline: auto; padding-bottom: clamp(48px, 8vw, 96px); }

/* ---------- title, note, search ---------- */
.mn-side { padding-top: clamp(20px, 4vw, 40px); }
.mn-title { position: relative; }
.mn-branch { position: absolute; inset-inline-end: -6px; top: -18px; width: 64px; color: var(--olive); opacity: .9; transform: rotate(14deg); pointer-events: none; }
[dir="rtl"] .mn-branch { transform: scaleX(-1) rotate(14deg); }
.mn-h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .8rem; font: 500 clamp(2.6rem, 2rem + 2.4vw, 3.6rem)/1 var(--f-display); letter-spacing: -.015em; color: var(--olive); padding-inline-end: 64px; }
[dir="rtl"] .mn-h1 { font: 700 clamp(2.4rem, 2rem + 2vw, 3.2rem)/1.3 var(--f-ar); letter-spacing: 0; }
.mn-h1-alt { font-size: .55em; color: var(--olive-ink); }
.mn-h1-alt:lang(ar) { font-weight: 400; }
.mn-h1-alt:lang(en), .grp-alt:lang(en) { font-family: var(--f-display); font-weight: 500; }
.mn-intro { margin-top: .6rem; color: var(--olive-ink); max-width: 34em; }
.mn-note { margin-top: 1rem; padding: .65rem .9rem; border-inline-start: 2px solid var(--gold); background: var(--paper); font-size: 1rem; line-height: 1.45; }

.srch { position: relative; margin-top: 1.1rem; }
.srch-i { position: absolute; top: 50%; inset-inline-start: 16px; width: 20px; height: 20px; transform: translateY(-50%); color: var(--olive-ink); pointer-events: none; }
.srch input {
  width: 100%; min-height: 54px; padding-inline: 48px 84px; border-radius: 999px; border: 1px solid rgb(40 50 31 / .3);
  background: #fff; color: var(--olive-deep); font: 400 1.0625rem/1.2 var(--f-text); -webkit-appearance: none; appearance: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
[dir="rtl"] .srch input { font: 400 1.15rem/1.2 var(--f-ar); }
.srch input::-webkit-search-cancel-button { display: none; }
.srch input:focus { outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px rgb(104 119 60 / .22); }
.srch input::placeholder { color: rgb(40 50 31 / .55); }
.srch input:placeholder-shown { padding-inline-end: 16px; }
.srch-x { position: absolute; top: 5px; bottom: 5px; inset-inline-end: 5px; min-width: 72px; border: 0; border-radius: 999px; background: var(--paper); font-weight: 500; cursor: pointer; }
.srch-x:hover { background: var(--sand); }
.srch-status { min-height: 1.5em; margin-top: .6rem; font-size: .95rem; color: var(--olive-ink); }
.srch-status:empty { margin-top: 0; min-height: 0; }

.side, .side-pdf { display: none; }

/* ---------- mobile category strip ---------- */
.strip {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px;
  margin-inline: calc(-1 * var(--gutter)); padding: 8px var(--gutter); min-height: var(--strip-h);
  background: rgb(254 249 239 / .97); box-shadow: 0 1px 0 var(--rule);
}
@supports (backdrop-filter: blur(1px)) { .strip { background: rgb(254 249 239 / .88); backdrop-filter: blur(14px) saturate(1.2); } }
.strip-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; padding-block: 2px; scroll-padding-inline: 24px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); }
.strip-list::-webkit-scrollbar { display: none; }
.chip-g { flex: none; display: flex; align-items: center; padding-inline: 10px 4px; font: 500 .72rem/1 var(--f-text); letter-spacing: .14em; text-transform: uppercase; color: var(--olive-ink); }
[dir="rtl"] .chip-g { font: 700 .95rem/1 var(--f-ar); }
.chip-g:not(:first-child) { margin-inline-start: 8px; border-inline-start: 1px solid var(--rule); padding-inline-start: 14px; }
.chip { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 15px; border-radius: 999px; border: 1px solid rgb(40 50 31 / .2); text-decoration: none; white-space: nowrap; font-size: .98rem; font-weight: 500;
  transition: background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease); }
[dir="rtl"] .chip { font-size: 1.08rem; font-weight: 700; }
.chip[aria-current="true"] { background: var(--olive); border-color: var(--olive); color: var(--ivory); }
.strip-btn, .strip-s { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: 44px; border-radius: 999px; border: 0; background: var(--olive-deep); color: var(--ivory); cursor: pointer; font-weight: 500; }
.strip-btn { padding: 0 14px 0 12px; }
.strip-btn span { font-size: .92rem; }
.strip-s { width: 44px; background: var(--paper); color: var(--olive-deep); }
@media (max-width: 400px) { .strip-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .strip-btn { width: 44px; padding: 0; } }
html:not(.js) .strip { position: relative; }

/* ---------- menu content ---------- */
.mn-body { min-width: 0; }
.grp + .grp { margin-top: clamp(56px, 8vw, 96px); }
.grp-t { display: flex; align-items: center; gap: 1rem; padding-top: clamp(36px, 5vw, 56px); font: 500 clamp(2.2rem, 1.6rem + 2vw, 3.2rem)/1 var(--f-display); color: var(--olive); }
[dir="rtl"] .grp-t { font: 700 clamp(2.1rem, 1.6rem + 1.6vw, 2.8rem)/1.3 var(--f-ar); }
.grp-t::after { content: ""; flex: 1; height: 5px; border-block: 1px solid rgb(104 119 60 / .55); }
.grp-alt { font-size: .6em; color: var(--olive-ink); }
.grp-alt:lang(ar) { font-weight: 400; }
.grp-alt:lang(en) { font-family: var(--f-display); }
.kind { display: flex; align-items: center; gap: .7rem; margin-top: clamp(36px, 5vw, 48px); font: 500 .8125rem/1.3 var(--f-text); letter-spacing: .16em; text-transform: uppercase; color: var(--olive-ink); }
[dir="rtl"] .kind { font: 700 1.1rem/1.3 var(--f-ar); letter-spacing: 0; }
.kind::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; }
.kind--alcohol::before { background: currentColor; }

.cat { padding-top: clamp(32px, 4.5vw, 48px); scroll-margin-top: calc(var(--strip-h) + 8px); }
.cat-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .9rem; padding-bottom: .7rem; margin-bottom: .2rem; border-bottom: 1px solid rgb(104 119 60 / .5); box-shadow: 0 3px 0 -2px rgb(104 119 60 / .3); }
.cat-t { font: 600 clamp(1.75rem, 1.4rem + 1.2vw, 2.3rem)/1.1 var(--f-display); color: var(--olive-deep); }
[dir="rtl"] .cat-t { font: 700 clamp(1.7rem, 1.4rem + 1vw, 2.1rem)/1.4 var(--f-ar); }
.cat-alt { font-size: 1.35rem; line-height: 1.3; color: var(--olive); }
.cat-alt:lang(en) { font: 500 1.25rem/1.3 var(--f-display); }
.cat-h .tag { margin-inline-start: auto; align-self: center; }

.dish { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 1.25rem; padding-block: .85rem; border-bottom: 1px solid rgb(40 50 31 / .1); scroll-margin-top: calc(var(--strip-h) + 20px); }
.dish:last-child { border-bottom: 0; }
.d-names { display: flex; flex-direction: column; min-width: 0; }
.d-n { font-weight: 500; font-size: 1.125rem; line-height: 1.3; }
[dir="rtl"] .d-n { font-weight: 700; font-size: 1.3rem; line-height: 1.45; }
.d-alt { margin-top: .05rem; font-size: 1.15rem; line-height: 1.4; color: var(--olive-ink); }
html[dir="ltr"] .d-alt, html[dir="ltr"] .d-desc--alt { text-align: left; }
html[dir="rtl"] .d-alt, html[dir="rtl"] .d-desc--alt { text-align: right; }
.d-alt:lang(en) { font: 500 1.0625rem/1.35 var(--f-display); letter-spacing: .01em; }
.d-desc { margin-top: .3rem; font-size: 1rem; line-height: 1.45; color: rgb(40 50 31 / .82); }
[dir="rtl"] .d-desc { font-size: 1.1rem; }
.d-desc--alt { margin-top: .1rem; color: var(--olive-ink); font-size: 1rem; }
.d-desc--alt:lang(en) { font-family: var(--f-text); font-size: .95rem; }
.d-opt { margin-top: .35rem; font-size: .95rem; font-style: italic; color: var(--olive-ink); }
[dir="rtl"] .d-opt { font-style: normal; font-size: 1.05rem; }
.d-p { font: 500 1.125rem/1.3 var(--f-text); font-variant-numeric: tabular-nums lining-nums; color: var(--olive-deep); white-space: nowrap; text-align: end; padding-top: .05rem; }
[dir="rtl"] .d-p { font-size: 1.3rem; font-weight: 600; line-height: 1.3; }
.pp { display: inline-grid; grid-template-columns: 3.2ch auto 4.2ch; align-items: baseline; direction: ltr; }   /* keep the printed "380 | 1550" order in RTL */
.pp bdi { text-align: end; }
.pp-sep { margin-inline: .4em; color: rgb(104 119 60 / .55); font-weight: 400; }
.d-vars { margin-top: .6rem; border-top: 1px dashed rgb(40 50 31 / .18); }
.d-vars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding-block: .5rem; border-bottom: 1px dashed rgb(40 50 31 / .18); }
.v-n { font-weight: 500; }
.v-note { display: block; font-weight: 400; font-size: .95rem; color: var(--olive-ink); }
.dish:target, .dish.is-hit { background: linear-gradient(90deg, rgb(226 180 99 / .26), rgb(226 180 99 / .12)); margin-inline: -12px; padding-inline: 12px; border-radius: 10px; border-bottom-color: transparent; }
html.js .dish.is-hit { animation: hit 2.8s var(--ease) both; }
@keyframes hit { 0%, 55% { background-color: rgb(226 180 99 / .3); } 100% { background-color: transparent; } }
.dish[hidden], .cat[hidden], .grp[hidden], .kind[hidden] { display: none; }

.empty { padding: clamp(48px, 8vw, 80px) 0; text-align: center; }
.empty-t { font: 500 1.9rem/1.2 var(--f-display); color: var(--olive); margin-bottom: .5rem; }
[dir="rtl"] .empty-t { font: 700 1.6rem/1.4 var(--f-ar); }
.empty .btn { margin-top: 1.4rem; }
.mn-end { margin-top: clamp(48px, 6vw, 72px); padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.mn-end-links { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin-top: .9rem; }
body.is-searching .mn-end .mn-note { display: none; }

/* ---------- desktop: sticky sidebar ---------- */
@media (min-width: 1000px) {
  .mn { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: clamp(48px, 6vw, 96px); align-items: start; }
  .mn-side { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; padding-block: 36px 28px; scrollbar-width: thin; }
  .strip { display: none; }
  .mn-body { max-width: 820px; padding-top: 8px; }
  .cat, .dish { scroll-margin-top: 24px; }
  .side, .side-pdf { display: block; }
  .side { margin-top: 1.4rem; border-top: 1px solid var(--rule); padding-top: .4rem; }
  .side-g + .side-g { margin-top: .8rem; }
  .side-gt { display: block; padding: .8rem 0 .3rem; font: 500 .75rem/1 var(--f-text); letter-spacing: .16em; text-transform: uppercase; color: var(--olive-ink); }
  [dir="rtl"] .side-gt { font: 700 1rem/1 var(--f-ar); letter-spacing: 0; }
  .side a { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 36px; padding-inline: 14px 4px; border-radius: 8px; text-decoration: none; font-size: 1rem; transition: background-color var(--t-fast), color var(--t-fast); }
  [dir="rtl"] .side a { font-size: 1.1rem; }
  .side a::before { content: ""; position: absolute; inset-inline-start: 2px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--olive); transform: translateY(-50%) scale(0); transition: transform var(--t-ui) var(--ease); }
  .side a:hover { background: var(--paper); }
  .side a[aria-current="true"] { color: var(--olive); font-weight: 700; }
  .side a[aria-current="true"]::before { transform: translateY(-50%) scale(1); }
  .side-c { font-size: .8rem; color: var(--olive-ink); font-variant-numeric: tabular-nums lining-nums; }
  [dir="rtl"] .side-c { font-size: 1rem; font-weight: 600; }
  .side-pdf { margin-top: 1rem; }
  .mn-branch { width: 56px; top: 4px; }
  .dish { column-gap: 2rem; }
}
/* wide enough for the PDF's own arrangement: name, the other-language name opposite, then price */
@media (min-width: 700px) {
  .d-names { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); column-gap: 1.5rem; align-items: baseline; }
  .d-n { grid-column: 1; }
  .d-alt { grid-column: 2; grid-row: 1; max-width: 24ch; justify-self: end; }
  html[dir="ltr"] .d-alt, html[dir="ltr"] .d-desc--alt { text-align: right; }
  html[dir="rtl"] .d-alt, html[dir="rtl"] .d-desc--alt { text-align: left; }
  .d-desc { grid-column: 1; }
  .d-desc--alt { grid-column: 2; max-width: 28ch; justify-self: end; }
  .d-opt, .d-vars { grid-column: 1 / -1; }
  .d-p { min-width: 4.5ch; }
}

/* ---------- all-sections sheet ---------- */
.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 100%; max-height: 88vh; border-radius: 22px 22px 0 0; background: var(--ivory); color: var(--olive-deep); box-shadow: 0 -20px 60px -20px rgb(31 40 26 / .4); }
.sheet::backdrop { background: rgb(31 40 26 / .5); }
.sheet[open] { animation: sheetUp 300ms var(--ease); }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.sheet-in { display: flex; flex-direction: column; max-height: 88vh; }
.sheet-hd { position: relative; display: flex; align-items: center; padding: 18px var(--gutter) 10px; border-bottom: 1px solid var(--rule); }
.sheet-hd h2 { font: 500 1.8rem/1.1 var(--f-display); }
[dir="rtl"] .sheet-hd h2 { font: 700 1.6rem/1.4 var(--f-ar); }
.sheet-hd .dlg-x { top: 50%; transform: translateY(-50%); }
.sheet-body { overflow-y: auto; padding: 8px var(--gutter) 16px; overscroll-behavior: contain; }
.sh-g + .sh-g { margin-top: 1rem; }
.sh-t { padding: .9rem 0 .3rem; font: 500 .75rem/1 var(--f-text); letter-spacing: .16em; text-transform: uppercase; color: var(--olive-ink); }
[dir="rtl"] .sh-t { font: 700 1rem/1 var(--f-ar); letter-spacing: 0; }
.sh-g ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
.sh-g a { display: flex; flex-direction: column; justify-content: center; min-height: 56px; padding-block: .4rem; border-bottom: 1px solid rgb(40 50 31 / .1); text-decoration: none; font-weight: 500; line-height: 1.25; }
.sh-alt { font-size: 1rem; font-weight: 400; color: var(--olive-ink); }
.sh-alt:lang(en) { font: 500 .95rem/1.25 var(--f-display); }
.sheet-pdf { padding: 6px var(--gutter) calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); }
@media (min-width: 760px) {
  .sheet { margin: auto; width: min(100% - 48px, 680px); border-radius: 22px; max-height: 80vh; }
  .sheet-in { max-height: 80vh; }
  .sh-g ul { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- print: the menu only ---------- */
@media print {
  @page { margin: 14mm 12mm; }
  .page-menu { background: #fff; }
  .strip, .srch, .srch-status, .side, .side-pdf, .mn-branch, .sheet, .empty, .mn-end-links, .mn-intro { display: none !important; }
  .mn { display: block; width: 100%; padding: 0; }
  .mn-side { position: static; max-height: none; padding: 0 0 6mm; }
  .mn-h1 { font-size: 26pt; color: #000; padding: 0; }
  .mn-note { background: none; border: 1px solid #999; font-size: 9.5pt; }
  .mn-body { max-width: none; columns: 2; column-gap: 10mm; }
  .grp-t { font-size: 18pt; color: #000; padding-top: 4mm; break-after: avoid; column-span: all; }
  .grp-t::after { border-color: #999; }
  .kind { margin-top: 3mm; break-after: avoid; }
  .cat { padding-top: 4mm; break-inside: auto; }
  .cat-h { break-after: avoid; border-color: #999; box-shadow: none; }
  .cat-t { font-size: 13pt; }
  .cat-alt { font-size: 11pt; }
  .dish { break-inside: avoid; padding-block: 1.6mm; border-color: #ddd; background: none !important; margin: 0 !important; padding-inline: 0 !important; animation: none !important; }
  .d-n, .d-p { font-size: 10pt; }
  .d-alt, .d-desc, .d-opt, .v-note { font-size: 9pt; }
  .dish[hidden], .cat[hidden], .grp[hidden] { display: grid !important; }
  .cat[hidden], .grp[hidden] { display: block !important; }
  .mn-end { column-span: all; }
  a { text-decoration: none; color: #000; }
}
