/* A business's public website. Platform look (navy and gold, dark mode from theme.js) with the
   business's own accent colour (--brand, set by site.js from its settings). Mobile first, logical
   properties only (works RTL and LTR), no inline styles anywhere (strict CSP). */
:root {
  --navy: #1b2a4a; --navy-2: #2b3f6b; --gold: #c8a24a; --gold-text: #8a6a1f;
  --ink: #1a2233; --muted: #5f6b7a; --line: #e3e7ee; --bg: #f5f6f8; --card: #fff; --field: #fff; --field-line: #cdd5e0;
  --soft: #eef1f6; --ok: #1f7a4d; --ok-bg: #e6f4ec; --bad: #b3261e; --bad-bg: #fdecea; --warn: #9a6700; --warn-bg: #fff4dc;
  --top: var(--navy); --top-ink: #fff; --brand: var(--navy); --brand-ink: #fff; --r: 14px; color-scheme: light;
}
[data-mode="dark"] {
  --ink: #e7ecf3; --muted: #9aa6b8; --line: #24304a; --bg: #0b1220; --card: #141d2e; --field: #0e1626; --field-line: #2e3b57;
  --soft: #1c2740; --ok: #5cc98d; --ok-bg: #133325; --bad: #ff8a80; --bad-bg: #3a1a1c; --warn: #f0c060; --warn-bg: #362b12;
  --top: #101a2c; --top-ink: #e7ecf3; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Owner 01-12-2026 (iPhone): tapping +, − or an item again and again must not zoom. manipulation = no double-tap zoom;
   pinch zoom and scrolling stay (never user-scalable=no / maximum-scale). Every input is 16px+ (no zoom on focus). */
html, body, .sheet, .sheet-body, button, a, input, select, textarea, label, summary, [role="button"], [role="radio"] { touch-action: manipulation; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "SF Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
  color: var(--ink); background: var(--bg); font-variant-numeric: tabular-nums lining-nums; padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.center { text-align: center; } .muted { color: var(--muted); } .small { font-size: .85rem; } .pad { padding: 2rem 1rem; }
.bad { color: var(--bad); } .ok { color: var(--ok); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; } /* the bots' field */

.top { background: var(--top); color: var(--top-ink); padding: calc(env(safe-area-inset-top) + .7rem) 1rem .7rem; display: flex; align-items: center; gap: .7rem;
  border-bottom: 3px solid var(--gold); position: sticky; inset-block-start: 0; z-index: 4; }
.top .logo { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #fff; flex: none; }
.top h1 { font-size: 1.1rem; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .lang { background: transparent; border: 1px solid rgba(255,255,255,.35); color: var(--top-ink); border-radius: 99px; padding: .25rem .75rem; font-size: .85rem; }

main { max-width: 820px; margin: 0 auto; padding: 1rem; }
.cover { background: var(--card); border: 1px solid var(--line); border-inline-start: 5px solid var(--brand); border-radius: var(--r); padding: 1rem; margin-bottom: 1rem; }
.cover p { margin: 0 0 .6rem; font-size: 1.05rem; }
.state { display: inline-block; font-size: .8rem; padding: .15rem .6rem; border-radius: 99px; }
.state.open { background: var(--ok-bg); color: var(--ok); } .state.closed { background: var(--bad-bg); color: var(--bad); }
.links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.links a { border: 1px solid var(--line); border-radius: 99px; padding: .3rem .8rem; font-size: .85rem; text-decoration: none; background: var(--soft); }
.notice { background: var(--warn-bg); color: var(--warn); border-radius: var(--r); padding: .7rem 1rem; margin-bottom: 1rem; }

.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .6rem; margin-bottom: .4rem; }
.chip { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: .35rem .9rem; font-size: .9rem; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chip.out { opacity: .45; text-decoration: line-through; }
.chip:disabled { opacity: .45; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: .85rem; display: flex; flex-direction: column; gap: .35rem; min-height: 8.5rem; }
.item .n { font-weight: 700; line-height: 1.35; flex: 1; }
.item .p { color: var(--brand); font-weight: 700; }
[data-mode="dark"] .item .p { color: var(--gold); }
.item.sold { opacity: .6; }
.tag { align-self: flex-start; font-size: .72rem; padding: .1rem .5rem; border-radius: 99px; background: var(--bad-bg); color: var(--bad); }
.btn { border: 0; border-radius: 10px; background: var(--brand); color: var(--brand-ink); padding: .55rem .9rem; font-weight: 700; cursor: pointer; }
.btn.light { background: var(--soft); color: var(--ink); }
.btn.wide { width: 100%; padding: .8rem; font-size: 1.05rem; }
.btn:disabled { opacity: .5; }

.bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 5; padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
.bar .btn { width: 100%; max-width: 820px; display: block; margin: 0 auto; padding: .85rem; font-size: 1.05rem; }

.sheet { position: fixed; inset: 0; z-index: 10; background: rgba(10, 15, 30, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet-body { background: var(--bg); width: 100%; max-width: 620px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; border-radius: 18px 18px 0 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); }
.sheet-body h2 { margin: 0 0 .7rem; font-size: 1.15rem; }
.group { margin-bottom: .9rem; } .group b { display: block; margin-bottom: .35rem; }
.opt { display: flex; align-items: center; gap: .6rem; padding: .55rem .2rem; border-bottom: 1px solid var(--line); }
.opt span.main { flex: 1; }
.line { display: flex; align-items: center; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.line .main { flex: 1; min-width: 0; }
.qty { display: flex; align-items: center; gap: .3rem; }
.qty button { width: 2rem; height: 2rem; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: 1.1rem; line-height: 1; }
.sum { display: flex; justify-content: space-between; padding: .3rem 0; }
.sum.total { font-weight: 800; font-size: 1.1rem; border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .5rem; }
.seg { display: flex; gap: .4rem; margin: .6rem 0; }
.seg button { flex: 1; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: .6rem; font-weight: 600; }
.seg button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
label { display: block; margin: .55rem 0; font-size: .9rem; color: var(--muted); }
input, textarea { display: block; width: 100%; margin-top: .25rem; padding: .65rem .75rem; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); font-size: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .6rem; }
.msg { border-radius: 10px; padding: .6rem .8rem; margin: .6rem 0; }
.msg.err { background: var(--bad-bg); color: var(--bad); } .msg.ok { background: var(--ok-bg); color: var(--ok); }
.pay { background: var(--soft); border-radius: 10px; padding: .6rem .8rem; margin: .7rem 0; font-size: .9rem; }

.status { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1rem; text-align: center; margin-bottom: 1rem; }
.status .big { font-size: 1.25rem; font-weight: 800; margin: .4rem 0; }
.steps { display: flex; gap: .3rem; justify-content: center; margin: .8rem 0 .2rem; }
.steps span { width: 2.6rem; height: .4rem; border-radius: 99px; background: var(--line); }
.steps span.on { background: var(--brand); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem 1rem; margin-bottom: 1rem; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; font-size: .9rem; }
.hours .today { font-weight: 800; }
footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.5rem 1rem; }
.toast { position: fixed; inset-inline: 1rem; inset-block-end: calc(5.5rem + env(safe-area-inset-bottom)); z-index: 20; margin: 0 auto; max-width: 420px;
  background: var(--ink); color: var(--bg); padding: .7rem 1rem; border-radius: 10px; text-align: center; }
.item img.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--soft); }
select { display: block; width: 100%; margin-top: .25rem; padding: .65rem .75rem; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); font-size: 16px; }
.reconnect[hidden] { display: none; }
/* a long shop name takes two lines instead of being cut (QA order 13, M1); short names look the same */
.top h1 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; overflow-wrap: anywhere; }
.zone-q { margin-bottom: .4rem; }
/* order 15 polish (design review 01-12-2026): fields with a 3:1 edge, «+965» before the phone, a message
   under a wrong field, the basket's button kept at the bottom */
:root { --field-line: #808b9c; } [data-mode="dark"] { --field-line: #5f6f90; }
.pfx { display: flex; align-items: center; direction: ltr; margin-top: .25rem; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); padding-inline-start: .75rem; }
.pfx .pre { color: var(--muted); padding-inline-end: .6rem; border-inline-end: 1px solid var(--line); }
.pfx input { margin: 0; border: 0; background: transparent; }
.pfx input:focus { outline: none; } .pfx:focus-within { outline: 2px solid var(--brand); }
.bad-fld input, .bad-fld .pfx { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.bad-fld .pfx input { box-shadow: none; }
.fld-msg { color: var(--bad); font-size: .82rem; margin-top: .25rem; }
.sheet .foot { position: sticky; inset-block-end: calc(-1rem - env(safe-area-inset-bottom)); margin: .6rem -1rem calc(-1rem - env(safe-area-inset-bottom)); padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.btn.off { opacity: .6; }
.pay .btn { padding: .35rem .8rem; min-height: 44px; }
.seg button { min-height: 44px; }
/* order 15, batch A: the dots under «ي» at the end of the shop's name were cut by the two-line clamp: a
   taller line and a little room above and below (measured: no ink cut and the hidden third line never peeks) */
.top h1 { line-height: 1.75; padding-block: .1em; }
/* order 15 batch B: the shop's card at the end (contact + hours); its buttons are 44 px */
.shopcard .links a { min-height: 44px; display: inline-flex; align-items: center; padding-inline: 1rem; }
.shopcard .hours-h { display: block; margin: .9rem 0 .3rem; }
/* order 15, QA journey fixes for the simple look */
.sheet-h { display: flex; align-items: center; gap: .5rem; } .sheet-h h2 { flex: 1; margin: 0; }
.sheet-h .x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink); font-size: 1.1rem; display: grid; place-items: center; flex: none; }
.sheet-body > .sheet-h { margin-bottom: .6rem; }
.opt input[type=checkbox] { width: 22px; height: 22px; min-height: 0; flex: none; margin: 0; padding: 0; order: 0; accent-color: var(--brand); }
.opt .main { order: 1; flex: 1; } .opt > span:last-child { order: 2; white-space: nowrap; }
.item .linklike { all: unset; touch-action: manipulation; cursor: pointer; font-weight: 700; line-height: 1.35; flex: 1; min-height: 44px; display: block; }
.item .linklike:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.item img.tap { cursor: pointer; }
.minnote { padding: .55rem .8rem; border-radius: 10px; background: var(--soft); color: var(--ink); font-size: .9rem; margin: .4rem 0; }
.toast--err { background: #fdecea; color: #b3261e; } [data-mode="dark"] .toast--err { background: #3a1b19; color: #ff8f86; }
.closed-hint { margin: .3rem 0 0; color: var(--ink); }
.panelcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem 1rem; margin-bottom: 1rem; }
/* Order 15: «اطلب لوقت لاحق» — «متى تبيه؟», the days and the slots */
.whenbox { margin: .7rem 0; padding: .7rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.whenbox > b { display: block; margin-bottom: .45rem; }
.when-seg button { display: flex; flex-direction: column; align-items: center; min-height: 52px; }
.when-seg button small { font-size: .74rem; font-weight: 500; opacity: .85; }
.when-seg button.off { opacity: .55; }
.chip.day { min-height: 44px; } .chip.day.none { opacity: .55; }
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; } /* two a row: «11:30 م – 12:00 ص» (12-hour, owner 01-12-2026) fits a 390 px phone */
.slot { min-height: 44px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--card); color: var(--ink); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.slot.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.slot.full { background: var(--soft); color: var(--muted); text-decoration: line-through; border-style: dashed; }
.whenline { margin: .4rem 0; }

/* order 19: the shop's terms and privacy pages (classic look) */
.legal { line-height: 1.75; max-width: 760px; margin: 0 auto; }
.legal-title { font-size: 1.4rem; } .legal-meta { color: #667; font-size: .85rem; }
.legal-lead { background: rgba(0, 0, 0, .04); border-radius: 12px; padding: .8rem .9rem; }
.legal-h { font-size: 1.05rem; margin-top: 1.2rem; }
.legal-list { padding-inline-start: 1.2rem; } .legal-list li { margin: .3rem 0; } .legal-list li.sub { list-style: circle; margin-inline-start: 1rem; }
.legal-agree { margin: 0 0 .4rem; } .legal-foot p { margin: .25rem 0; }

/* order 19 (presale #2): the platform's status line («نواجه عطل، نشتغل عليه») */
.platform-notice { position: relative; z-index: 60; padding: .55rem 1rem; text-align: center; font-size: .92rem; font-weight: 600; line-height: 1.6; }
.platform-notice.warn { background: #fff4d6; color: #5c4300; border-bottom: 1px solid #e9cf86; }
.platform-notice.info { background: #e6f0ff; color: #12345e; border-bottom: 1px solid #b9cff2; }
