/* Pretzel Girl brand system (from the packaging): bright sky blue with a
   deeper blue for text and buttons, a thin gold accent for rules and badges,
   warm pretzel brown for secondary text, on a clean white ground.
   The --ateej-* names are kept as aliases so older rules keep working. */
:root {
  /* core */
  --pg-blue: #1E88E5;        /* bright sky blue: accents, ready states */
  --pg-blue-deep: #1565C0;   /* text, buttons */
  --pg-navy: #0D3C7A;        /* dark surfaces (bar screen, save bar) */
  --pg-navy-900: #082A57;
  --pg-gold: #C9971C;        /* thin rules, badges, ornaments (never small text on white) */
  --pg-gold-light: #F4E6BF;
  --pg-brown: #8A4B1F;       /* pretzel brown: secondary text, prices */
  --pg-sky-50: #F1F7FE;
  --pg-sky-100: #E1EEFB;
  --pg-sky-200: #BBDBF8;
  --pg-white: #FFFFFF;

  /* legacy names, now pointing at Pretzel Girl values */
  --ateej-sand: var(--pg-gold);
  --ateej-coffee: var(--pg-blue-deep);
  --ateej-palm: var(--pg-blue);
  --ateej-cream: var(--pg-white);
  --ateej-beige: var(--pg-sky-100);
  --ateej-taupe: var(--pg-brown);
  --ateej-coffee-700: #12519E;
  --ateej-coffee-800: var(--pg-navy);
  --ateej-coffee-900: var(--pg-navy-900);
  --ateej-palm-50: var(--pg-sky-50);
  --ateej-palm-200: var(--pg-sky-200);
  --ateej-palm-900: var(--pg-navy);
  --ateej-white: var(--pg-white);
  --ateej-offwhite: var(--pg-sky-50);
  --ateej-stone: #EEF1F5;

  /* working names used by the screens */
  --oud: var(--ateej-coffee);
  --oud-dark: var(--ateej-coffee-800);
  --cream: var(--ateej-cream);
  --surface: var(--ateej-white);
  --sand: var(--ateej-sand);
  --sand-light: var(--ateej-beige);
  --taupe: var(--ateej-taupe);
  --majlis: var(--ateej-palm);
  --tint: rgba(21, 101, 192, 0.06);
  --tint-2: rgba(21, 101, 192, 0.12);
  --line: rgba(21, 101, 192, 0.18);
  --line-strong: rgba(21, 101, 192, 0.45);
  --gold-line: rgba(201, 151, 28, 0.55);  /* thin gold rules */
  --muted: var(--pg-brown);         /* pretzel brown, AA on white */
  --cream-muted: rgba(255, 255, 255, 0.8);
  --scrim: rgba(8, 42, 87, 0.45);
  --radius: 18px;
  --radius-lg: 26px;
  /* type: Poppins for everything; Lobster script for the wordmark and item
     names only. Arabic falls through to Baloo Bhaijaan 2. */
  --serif: 'Poppins', 'Baloo Bhaijaan 2', system-ui, -apple-system, sans-serif;   /* display (numbers, headings) */
  --sans: 'Poppins', 'Baloo Bhaijaan 2', system-ui, -apple-system, sans-serif;
  --arabic: 'Baloo Bhaijaan 2', 'Geeza Pro', sans-serif;      /* Arabic display */
  --arabic-body: 'Baloo Bhaijaan 2', 'Geeza Pro', sans-serif; /* Arabic labels */
  --script: 'Lobster', 'Pacifico', 'Baloo Bhaijaan 2', cursive;         /* wordmark + item names */
  /* Scallop frieze (kept under the old --sadu names): a thin gold / blue edge */
  --sadu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 8 A8 8 0 0 1 16 8 Z' fill='%23C9971C'/%3E%3C/svg%3E");
  --sadu-coffee: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 8 A8 8 0 0 1 16 8 Z' fill='%231E88E5'/%3E%3C/svg%3E");
  /* legacy aliases so older rules keep working */
  --burgundy: var(--oud);
  --wine: var(--ateej-coffee-800);
  --oxblood: var(--ateej-coffee-800);
  --ink: var(--oud);
  --paper: var(--cream);
  --cream-2: var(--ateej-beige);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--oud); font-family: var(--sans);
  font-weight: 400; font-size: 16px; line-height: 1.55; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--oud); outline-offset: 2px; }
h1, h2, h3 { font-weight: 600; }
.brush, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: 0; }
.script { font-family: var(--script); font-weight: 400; letter-spacing: 0; }
/* Tagged Arabic uses the brand's Arabic face; the .arabic/.name-ar classes below override it. */
[lang="ar"] { font-family: var(--arabic-body); }
.arabic { font-family: var(--arabic); direction: rtl; }
.arabic-body { font-family: var(--arabic-body); direction: rtl; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.caps { font-weight: 500; text-transform: uppercase; letter-spacing: .24em; font-size: 12px; color: var(--muted); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 56px; padding: 14px 20px; border: 0; border-radius: var(--radius);
  background: var(--oud); color: var(--ateej-white); font-weight: 500; font-size: 17px; letter-spacing: .01em;
  transition: transform .08s ease, background .15s ease;
}
.btn:active:not(:disabled) { transform: scale(0.98); background: var(--oud-dark); }
.btn:disabled { background: var(--tint-2); color: var(--muted); }
.btn.secondary { background: transparent; color: var(--oud); box-shadow: inset 0 0 0 2px var(--oud); }
.btn.ghost { background: transparent; color: var(--oud); min-height: 44px; font-size: 15px; }
.btn.big { min-height: 64px; font-size: 19px; }
.btn.sand { background: var(--sand); color: var(--oud-dark); }
.btn.sand:active:not(:disabled) { background: var(--ateej-beige); }
.link { background: none; border: 0; padding: 8px 4px; color: var(--oud); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* tags / chips used across screens */
.tag {
  display: inline-block; font-size: 11px; font-weight: 500; letter-spacing: .22em;
  text-transform: uppercase; color: var(--oud); background: var(--sand-light);
  border-radius: 999px; padding: 4px 10px;
}
.tag.open::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; vertical-align: middle; border-radius: 50%; background: var(--majlis); }
.tag.closed::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; vertical-align: middle; border-radius: 50%; background: var(--sand); }

/* brand pieces shared by every screen */
.logo { display: block; height: auto; }
.logo-h { width: 168px; }
/* JS headers now point .logo-h / .logo-bar at the round badge.png */
.logo-h, .logo-bar { aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
/* Text wordmark: blue script "Pretzel", gold script "Girl" */
.pg-word { font-family: var(--script); font-weight: 400; letter-spacing: 0; line-height: .95; color: var(--pg-blue-deep); white-space: nowrap; }
.pg-word .girl { color: var(--pg-gold); font-size: .72em; margin-left: .12em; }
.pg-badge { display: block; border-radius: 50%; aspect-ratio: 1; object-fit: cover; height: auto; }
/* Mascot and badge are on a white ground: multiply melts it into light backgrounds */
.pg-mascot { display: block; height: auto; pointer-events: none; user-select: none; }
.mark { width: 34px; height: auto; display: block; }
.sadu-band { height: 8px; background: var(--sadu) repeat-x bottom left / 16px 8px; }
.sadu-band.coffee { background-image: var(--sadu-coffee); }
.sadu-band.down { transform: scaleY(-1); }
.days { border: 0; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.days legend { margin-bottom: 8px; }
.day { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--tint); font-size: 14px; cursor: pointer; }
.day input { accent-color: var(--oud); }

/* Menu icon colours (public/illus.js) */
.ill-sand { fill: var(--sand); }
.ill-coffee { fill: var(--oud); }

/* Arabic is never letter-spaced or case-transformed: spacing pulls Arabic
   letters apart (Safari breaks the joins). Any Arabic inside a tracked,
   uppercase label is wrapped in lang="ar" and resets here. */
[lang="ar"], .ar, .arabic, .arabic-body, .name-ar, .size-ar, .line-ar, .desc-ar, .notice-ar { letter-spacing: 0 !important; text-transform: none !important; }
