/* Haatly storefront polish — loaded only while the store's home design switch is on.
   Built by deployment-polish/build.py from the approved preview layers; edit those, then rebuild. */

/* ===== order chat ===== */
/* ==========================================================================
   Order chat redesign (preview layer). Loaded after the original styles.
   Scope: #order-chat-modal only. Port to header.blade.php once approved.
   ========================================================================== */
#order-chat-modal {
  --oc-accent: #2fb3c2;
  --oc-accent-deep: #1f97a6;
  --oc-accent-soft: #e6f6f8;
  --oc-ink: #0f2a33;
  --oc-muted: #6b8089;
  --oc-surface: #ffffff;
  --oc-incoming: #f1f5f7;
  --oc-line: #e3eaed;
  --oc-ease: cubic-bezier(.22, .8, .24, 1);
}
html.dark-mode #order-chat-modal {
  --oc-ink: #e8f1f3;
  --oc-muted: #9fb2b8;
  --oc-surface: #1c1f26;
  --oc-incoming: #262a33;
  --oc-line: #323743;
  --oc-accent-soft: #17343a;
}

/* ---------- Bubbles: calmer shapes, consistent spacing ---------- */
#order-chat-modal .order-chat-bubble {
  border-radius: 18px 18px 18px 6px;
  padding: 8px 12px 6px;
  box-shadow: 0 1px 1px rgba(15, 42, 51, .04), 0 2px 8px rgba(15, 42, 51, .05);
  animation: oc-bubble-in .32s var(--oc-ease) both;
}
#order-chat-modal .order-chat-bubble-delegate .order-chat-bubble,
#order-chat-modal .order-chat-bubble-store .order-chat-bubble { background: var(--oc-incoming); color: var(--oc-ink); }
#order-chat-modal .order-chat-bubble-customer .order-chat-bubble {
  border-radius: 18px 18px 6px 18px;
  background: linear-gradient(160deg, var(--oc-accent) 0%, var(--oc-accent-deep) 100%);
}
#order-chat-modal .order-chat-row + .order-chat-row { margin-top: 6px; }
#order-chat-modal .order-chat-bubble-time,
#order-chat-modal .order-chat-voice-sent-at { font-variant-numeric: tabular-nums; letter-spacing: .2px; opacity: .75; }
@keyframes oc-bubble-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }

/* Delegate avatar: only once per run of consecutive delegate messages (on the last one). */
#order-chat-modal .order-chat-bubble-delegate:has(+ .order-chat-bubble-delegate) .order-chat-delegate-msg-avatar { visibility: hidden; }
#order-chat-modal .order-chat-delegate-msg-avatar { width: 28px; height: 28px; background: var(--oc-accent-soft); color: var(--oc-accent-deep); border: 0; }

/* ---------- Voice message ---------- */
#order-chat-modal .order-chat-bubble--voice-msg { padding: 8px 10px 7px; min-width: 248px; max-width: 290px; }
#order-chat-modal .order-chat-voice-avatar { display: none !important; }
#order-chat-modal .order-chat-voice-layout { display: block; }
#order-chat-modal .order-chat-voice-player { display: flex; flex-direction: column; gap: 4px; width: 100%; }
#order-chat-modal .order-chat-voice-player-track { display: flex; align-items: center; gap: 10px; direction: ltr; }

/* Play button: clean flat disc, crisp centred icon */
#order-chat-modal .order-chat-voice-play {
  --oc-p: 0;
  position: relative; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; isolation: isolate;
  background: var(--oc-accent-deep); color: #fff; box-shadow: none;
  transition: transform .18s var(--oc-ease), background .2s;
  -webkit-tap-highlight-color: transparent;
}
#order-chat-modal .order-chat-bubble-customer .order-chat-voice-play { background: #fff; color: var(--oc-accent-deep); }
#order-chat-modal .order-chat-voice-play:hover { transform: scale(1.05); }
#order-chat-modal .order-chat-voice-play:active { transform: scale(.92); }
#order-chat-modal .order-chat-voice-play:focus-visible { outline: 2px solid var(--oc-accent); outline-offset: 3px; }
#order-chat-modal .order-chat-voice-play-inner { position: relative; width: 16px; height: 16px; display: block; }
#order-chat-modal .order-chat-voice-play svg {
  position: absolute; inset: 0; width: 16px !important; height: 16px !important; display: block !important;
  transition: opacity .18s var(--oc-ease), transform .24s var(--oc-ease);
}
#order-chat-modal .order-chat-voice-play .oc-icon-play { transform: translateX(1px); }
#order-chat-modal .order-chat-voice-play .oc-icon-pause { opacity: 0; transform: scale(.6); }
#order-chat-modal .order-chat-voice-player.is-playing .oc-icon-play { opacity: 0; transform: translateX(1px) scale(.6); }
#order-chat-modal .order-chat-voice-player.is-playing .oc-icon-pause { opacity: 1; transform: none; }
/* progress ring that fills around the button while it plays */
#order-chat-modal .order-chat-voice-play::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; z-index: -1; pointer-events: none;
  background: conic-gradient(var(--oc-ring, var(--oc-accent)) calc(var(--oc-p) * 1turn), var(--oc-ring-track, rgba(47, 179, 194, .16)) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  opacity: 0; transition: opacity .25s var(--oc-ease);
}
#order-chat-modal .order-chat-bubble-customer .order-chat-voice-play { --oc-ring: #fff; --oc-ring-track: rgba(255, 255, 255, .28); }
#order-chat-modal .order-chat-voice-player.is-playing .order-chat-voice-play::after,
#order-chat-modal .order-chat-voice-player.oc-started .order-chat-voice-play::after { opacity: 1; }
#order-chat-modal .order-chat-voice-play::after { display: none !important; }
/* simple look: the play / pause mark stands on its own, without a disc behind it */
#order-chat-modal .order-chat-voice-play,
#order-chat-modal .order-chat-bubble-customer .order-chat-voice-play { width: 30px; height: 38px; border-radius: 8px; background: none !important; color: var(--oc-accent-deep); }
#order-chat-modal .order-chat-bubble-customer .order-chat-voice-play { color: #fff; }
#order-chat-modal .order-chat-voice-play-inner { width: 22px; height: 22px; }
#order-chat-modal .order-chat-voice-play svg { width: 22px !important; height: 22px !important; }
#order-chat-modal .order-chat-voice-play .oc-icon-play { transform: none; }
#order-chat-modal .order-chat-voice-player.is-playing .oc-icon-play { transform: scale(.6); }
/* side column: duration, and the speed pill under it only while the note plays */
#order-chat-modal .oc-voice-side { flex: 0 0 auto; min-width: 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
#order-chat-modal .oc-voice-side .order-chat-voice-audio-dur { font-size: 11.5px; font-weight: 600; line-height: 1; }
#order-chat-modal .oc-voice-side { gap: 0; }
/* the pill eases in when the note starts and eases out when it ends (height, fade and a slight scale) */
#order-chat-modal .oc-voice-side .oc-voice-speed {
  display: block; height: 0; min-width: 32px; padding: 0 7px; margin-top: 0; font-size: 10.5px; font-weight: 700; overflow: hidden;
  opacity: 0; transform: scale(.8); pointer-events: none;
  transition: height .26s var(--oc-ease), margin-top .26s var(--oc-ease), opacity .22s ease, transform .26s var(--oc-ease), background .2s;
}
#order-chat-modal .order-chat-voice-player.oc-live .oc-voice-side .oc-voice-speed { height: 18px; margin-top: 4px; opacity: 1; transform: none; pointer-events: auto; }
#order-chat-modal .order-chat-voice-player.oc-live .oc-voice-side .oc-voice-speed:active { transform: scale(.9); }
#order-chat-modal .order-chat-voice-wave-block { margin-inline: 2px 4px; }
/* the bubble follows the length of the wave (set per note from its duration) */
#order-chat-modal .order-chat-bubble--voice-msg { min-width: 0; width: auto; }
#order-chat-modal .order-chat-voice-main { flex: 0 0 auto; }
#order-chat-modal .order-chat-voice-wave-block { flex: 0 0 auto; transition: width .2s var(--oc-ease); } /* no progress ring around the button: the waveform shows the progress */

/* Unplayed incoming voice: small dot on the play button */
#order-chat-modal .order-chat-voice-player.oc-unplayed .order-chat-voice-play::before {
  content: ''; position: absolute; top: 0; left: 0; width: 11px; height: 11px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 0 2px var(--oc-incoming);
}

/* Waveform: thin rounded bars, dots where it is quiet, and a knob riding on the play position */
#order-chat-modal .order-chat-voice-main { flex: 1 1 auto; min-width: 0; }
#order-chat-modal .order-chat-voice-wave-block { position: relative; cursor: pointer; padding: 4px 0; margin-inline: 6px; touch-action: none; }
#order-chat-modal .order-chat-voice-wave { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 2px; height: 28px; } /* runs left → right, starting beside the play button */
#order-chat-modal .order-chat-voice-wave-bar {
  flex: 0 0 3px; width: 3px; max-width: 3px; min-width: 3px; min-height: 3px; border-radius: 999px; align-self: center !important;
  background: var(--oc-accent-deep); opacity: .3 !important; /* only .oc-played brightens a bar */
  transform-origin: center; transition: opacity .12s linear;
}
#order-chat-modal .order-chat-bubble-customer .order-chat-voice-wave-bar { background: #fff; opacity: .42 !important; }
#order-chat-modal .order-chat-voice-wave-bar.oc-head { transform: none; animation: none !important; }
#order-chat-modal .order-chat-voice-wave-bar.oc-played,
#order-chat-modal .order-chat-bubble-customer .order-chat-voice-wave-bar.oc-played { opacity: 1 !important; }
#order-chat-modal .oc-voice-knob {
  position: absolute; top: 50%; right: calc(var(--oc-pos, 0) * 100%); width: 13px; height: 13px; margin: -6.5px -6.5px 0 0; border-radius: 50%;
  background: var(--oc-accent, #2fb3c2); box-shadow: 0 0 0 2.5px var(--oc-incoming, #f1f5f7); pointer-events: none; transition: transform .15s var(--oc-ease);
}
#order-chat-modal .order-chat-bubble-customer .oc-voice-knob { background: #fff; box-shadow: 0 0 0 2.5px var(--oc-accent-deep, #1f97a6); }
#order-chat-modal .order-chat-voice-wave-block:active .oc-voice-knob { transform: scale(1.25); }

/* Slot at the outer end of the row: mic mark while idle; once the note plays it turns into the speed pill */
#order-chat-modal .oc-voice-slot { position: relative; flex: 0 0 0; width: 0; margin-right: -10px; height: 30px; display: grid; place-items: center; overflow: hidden; transition: flex-basis .25s var(--oc-ease), width .25s var(--oc-ease), margin .25s var(--oc-ease); }
#order-chat-modal .order-chat-voice-player.oc-live .oc-voice-slot { flex-basis: 42px; width: 42px; margin-right: 0; }
#order-chat-modal .oc-voice-mic, #order-chat-modal .oc-voice-knob { display: none !important; } /* no mic mark and no scrub dot */
#order-chat-modal .oc-voice-slot { display: none !important; } /* no playback-speed button either: notes play at normal speed */
#order-chat-modal .oc-voice-slot > * { grid-area: 1 / 1; transition: opacity .2s var(--oc-ease), transform .25s var(--oc-ease); }
#order-chat-modal .oc-voice-mic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 42, 51, .06); color: var(--oc-accent-deep, #1f97a6); }
#order-chat-modal .order-chat-bubble-customer .oc-voice-mic { background: rgba(255, 255, 255, .18); color: #fff; }
#order-chat-modal .oc-voice-mic svg { width: 15px; height: 15px; display: block; }
#order-chat-modal .oc-voice-slot .oc-voice-speed { opacity: 0; transform: scale(.7); pointer-events: none; }
#order-chat-modal .order-chat-voice-player.oc-live .oc-voice-slot .oc-voice-speed { opacity: 1; transform: none; pointer-events: auto; }
#order-chat-modal .order-chat-voice-player.oc-live .oc-voice-mic { opacity: 0; transform: scale(.7); }
/* Speed pill: in the main row, at the outer end beside the play button */
#order-chat-modal .oc-voice-speed {
  flex: 0 0 auto; direction: ltr; unicode-bidi: isolate; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 12px; line-height: 1;
  height: 26px; min-width: 40px; padding: 0 9px; border-radius: 999px; font-variant-numeric: tabular-nums;
  background: rgba(15, 42, 51, .08); color: inherit; transition: background .2s, transform .15s var(--oc-ease);
  -webkit-tap-highlight-color: transparent;
}
#order-chat-modal .order-chat-bubble-customer .oc-voice-speed { background: rgba(255, 255, 255, .22); }
#order-chat-modal .oc-voice-speed:active { transform: scale(.9); }
#order-chat-modal .oc-voice-speed:not([data-rate="1"]) { background: var(--oc-accent-deep, #1f97a6); color: #fff; }
#order-chat-modal .order-chat-bubble-customer .oc-voice-speed:not([data-rate="1"]) { background: #fff; color: var(--oc-accent-deep, #1f97a6); }

/* Meta row under the waveform: sent time at its start, duration at its end */
#order-chat-modal .order-chat-voice-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  direction: ltr; padding-left: 2px; padding-right: 6px; font-size: 11px; line-height: 1; /* sent time sits at the far left of the bubble */
}
#order-chat-modal .order-chat-voice-meta-end { display: inline-flex; align-items: center; gap: 6px; }
/* the sent time sits outside the voice bubble, just under it */
#order-chat-modal .order-chat-bubble--voice-msg { margin-bottom: 17px; overflow: visible; padding-bottom: 8px; }
#order-chat-modal .order-chat-bubble--voice-msg .order-chat-voice-player { position: static; } /* so the time is placed against the bubble, not the player */
#order-chat-modal .order-chat-bubble--voice-msg .order-chat-voice-meta { position: absolute; top: 100%; left: 6px; right: auto; margin-top: 4px; padding: 0; white-space: nowrap; }
/* it stays on the side the bubble's tail comes out of: left for incoming notes, right for your own */
#order-chat-modal .order-chat-bubble-customer .order-chat-bubble--voice-msg .order-chat-voice-meta { left: auto; right: 6px; }
#order-chat-modal .order-chat-bubble--voice-msg .order-chat-voice-sent-at { color: #7d8b91 !important; opacity: 1; }
#order-chat-modal .order-chat-bubble--voice-msg .oc-voice-read { color: var(--oc-accent, #2fb3c2); }
html.dark-mode #order-chat-modal .order-chat-bubble--voice-msg .order-chat-voice-sent-at, body.dark-mode #order-chat-modal .order-chat-bubble--voice-msg .order-chat-voice-sent-at { color: #9aa6ab !important; }
#order-chat-modal .order-chat-voice-audio-dur { font-weight: 700; font-variant-numeric: tabular-nums; }
#order-chat-modal .order-chat-voice-sent-at { direction: rtl !important; unicode-bidi: isolate !important; }

/* Read marks (✓✓) on your own voice notes: crisp icon next to the time */
#order-chat-modal .order-chat-voice-read { display: none !important; }
#order-chat-modal .oc-voice-read {
  display: inline-flex; align-items: center; margin-inline-start: 3px; color: #fff; opacity: .95;
  vertical-align: -2px;
}
#order-chat-modal .oc-voice-read svg { width: 16px; height: 11px; display: block; }
#order-chat-modal .order-chat-voice-sent-at { display: inline-flex; align-items: center; gap: 2px; }

/* The sent time of a voice note is not shown under it: it appears while the note is pressed (chat-redesign.js adds
   .oc-time-on for a few seconds), and the bubble makes room for it only then. */
#order-chat-modal .order-chat-bubble--voice-msg { margin-bottom: 0; transition: margin-bottom .2s var(--oc-ease, ease); -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
#order-chat-modal .order-chat-bubble--voice-msg.oc-time-on { margin-bottom: 17px; }
#order-chat-modal .order-chat-bubble--voice-msg .order-chat-voice-meta { opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
#order-chat-modal .order-chat-bubble--voice-msg.oc-time-on .order-chat-voice-meta { opacity: 1; transform: none; }

/* ---------- Delegate bill photo: show the whole receipt ---------- */
#order-chat-modal .order-chat-bubble-media--image-thumb {
  width: 230px !important; height: auto !important; max-height: 320px; overflow: hidden;
  background: #fff; border-radius: 12px; border: 1px solid var(--oc-line); margin-bottom: 6px;
}
#order-chat-modal .order-chat-bubble-media--image-thumb img { width: 100% !important; height: auto !important; max-height: 318px; object-fit: contain !important; display: block; }
#order-chat-modal .order-chat-bubble-total { border-top: 1px dashed var(--oc-line); margin-top: 8px; padding-top: 8px; }
#order-chat-modal .order-chat-bubble-total-amt { font-size: 16px; font-weight: 800; }

/* ---------- Order invoice card (top of chat): soft card ---------- */
#order-chat-modal .order-chat-invoice-card {
  border-radius: 18px; border: 1px solid var(--oc-line); background: var(--oc-surface);
  box-shadow: 0 6px 22px rgba(15, 42, 51, .07);
}
#order-chat-modal .order-chat-invoice-total { background: var(--oc-accent-soft); margin: 10px -4px 0; padding: 10px 12px; border-radius: 12px; border: 0; }
#order-chat-modal .order-chat-invoice-total-amt { font-size: 18px; font-weight: 800; color: var(--oc-accent-deep); }

/* ---------- Delegate's bill message: standalone paper receipt + text bubble below ---------- */
#order-chat-modal .order-chat-bubble.oc-bill-bubble {
  background: none !important; padding: 0 !important; box-shadow: none !important; border-radius: 0 !important;
  display: flex; flex-direction: column; align-items: center; gap: 0; width: 256px;
}
#order-chat-modal .oc-bill-bubble > .order-chat-bubble-row {
  position: relative; z-index: 2; align-self: stretch; margin-top: -14px;
  width: 100% !important; max-width: none !important; box-sizing: border-box;
  background: var(--oc-incoming); color: var(--oc-ink);
  border-radius: 14px 14px 18px 6px; padding: 14px 12px 6px;
  box-shadow: 0 1px 1px rgba(15, 42, 51, .04), 0 2px 8px rgba(15, 42, 51, .05);
}
#order-chat-modal .oc-bill-photo-hidden { position: absolute !important; width: 1px !important; height: 1px !important; min-width: 0 !important; min-height: 0 !important; overflow: hidden; opacity: 0; pointer-events: none; border: 0 !important; margin: 0 !important; }
#order-chat-modal .oc-bill {
  --zz: 6px; --paper: #fffdf8; --ink: #17202a; --soft: #7b8590; --rule: #c9cfd4;
  width: 224px; background: var(--paper); color: var(--ink); text-align: right;
  padding: calc(var(--zz) + 16px) 16px calc(var(--zz) + 14px);
  clip-path: polygon(
    0 var(--zz), 3.57% 0, 7.14% var(--zz), 10.71% 0, 14.28% var(--zz), 17.85% 0, 21.42% var(--zz), 25% 0, 28.57% var(--zz), 32.14% 0, 35.71% var(--zz), 39.28% 0, 42.85% var(--zz), 46.42% 0, 50% var(--zz), 53.57% 0, 57.14% var(--zz), 60.71% 0, 64.28% var(--zz), 67.85% 0, 71.42% var(--zz), 75% 0, 78.57% var(--zz), 82.14% 0, 85.71% var(--zz), 89.28% 0, 92.85% var(--zz), 96.42% 0, 100% var(--zz),
    100% calc(100% - var(--zz)), 96.42% 100%, 92.85% calc(100% - var(--zz)), 89.28% 100%, 85.71% calc(100% - var(--zz)), 82.14% 100%, 78.57% calc(100% - var(--zz)), 75% 100%, 71.42% calc(100% - var(--zz)), 67.85% 100%, 64.28% calc(100% - var(--zz)), 60.71% 100%, 57.14% calc(100% - var(--zz)), 53.57% 100%, 50% calc(100% - var(--zz)), 46.42% 100%, 42.85% calc(100% - var(--zz)), 39.28% 100%, 35.71% calc(100% - var(--zz)), 32.14% 100%, 28.57% calc(100% - var(--zz)), 25% 100%, 21.42% calc(100% - var(--zz)), 17.85% 100%, 14.28% calc(100% - var(--zz)), 10.71% 100%, 7.14% calc(100% - var(--zz)), 3.57% 100%, 0 calc(100% - var(--zz)));
}
#order-chat-modal .oc-bill-bubble { filter: drop-shadow(0 6px 10px rgba(15, 42, 51, .10)); }
/* the receipt "prints" out of a slot on top of the message bubble */
/* the paper slips out from behind the bubble's top edge: no slot graphic, just a clean lip + contact shadow */
#order-chat-modal .oc-bill-bubble > .order-chat-bubble-row {
  border-radius: 10px 10px 18px 6px !important;
  border-top: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 -1px 0 rgba(15, 42, 51, .14), 0 -6px 10px -6px rgba(15, 42, 51, .22), 0 2px 8px rgba(15, 42, 51, .06) !important;
}
html.dark-mode #order-chat-modal .oc-bill-bubble > .order-chat-bubble-row { border-top-color: rgba(255, 255, 255, .14); }
/* shadow the bubble's edge casts on the paper */
#order-chat-modal .oc-bill-wrap::after {
  content: ''; position: absolute; left: 8px; right: 8px; bottom: 14px; height: 22px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(15, 42, 51, 0), rgba(15, 42, 51, .05) 55%, rgba(15, 42, 51, .2));
}
#order-chat-modal .oc-bill-wrap { overflow: hidden; padding: 0 8px; position: relative; z-index: 1; }
#order-chat-modal .oc-bill-wrap .oc-bill { padding-bottom: calc(var(--zz) + 22px); }
#order-chat-modal .oc-rx-head { text-align: center; }
#order-chat-modal .oc-rx-brand { font-size: 17px; font-weight: 900; line-height: 1.3; }
#order-chat-modal .oc-rx-sub { margin-top: 2px; font-size: 11px; color: var(--soft); white-space: nowrap; }
#order-chat-modal .oc-rx-sub b { display: inline !important; color: var(--ink); font-weight: 800; unicode-bidi: isolate; }
#order-chat-modal .oc-rx-rule { border: 0; border-top: 1.5px dashed var(--rule); margin: 12px 0; height: 0; }
#order-chat-modal .oc-rx-rows { display: grid; gap: 10px; }
#order-chat-modal .oc-rx-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
#order-chat-modal .oc-rx-row > span:first-child { font-weight: 700; }
#order-chat-modal .oc-rx-row > span:last-child { font-weight: 800; direction: ltr; white-space: nowrap; }
#order-chat-modal .oc-rx-row small { display: block; font-weight: 500; color: var(--soft); font-size: 10.5px; }
#order-chat-modal #order-chat-messages .oc-bill .sar-money, #order-chat-modal #order-chat-messages .oc-bill .sar-money * { color: var(--ink) !important; }
#order-chat-modal .oc-rx-rows--tight { gap: 5px; }
#order-chat-modal .oc-rx-meta { font-size: 11.5px; }
#order-chat-modal .oc-rx-meta > span:first-child { font-weight: 500; color: var(--soft); }
#order-chat-modal .oc-rx-meta > span:last-child { font-weight: 700; direction: rtl; }
#order-chat-modal .oc-rx-qty { font-style: normal; font-weight: 600; color: var(--soft); font-size: 11.5px; direction: ltr; unicode-bidi: isolate; }
#order-chat-modal .oc-rx-thanks { text-align: center; font-size: 11px; color: var(--soft); margin-top: 12px; }
#order-chat-modal .oc-rx-total { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#order-chat-modal .oc-rx-total > span:first-child { font-size: 17px; font-weight: 900; }
#order-chat-modal .oc-rx-total-amt { font-size: 19px; font-weight: 900; line-height: 1; direction: ltr; }
#order-chat-modal .oc-bill-photo-link {
  display: block; margin: 12px auto 0; border: 0; background: none; cursor: pointer; padding: 2px 4px;
  font: inherit; font-size: 11px; font-weight: 700; color: var(--oc-accent-deep); text-decoration: underline; text-underline-offset: 3px;
}
#order-chat-modal .oc-rx-barcode { margin: 12px auto 0; height: 28px; width: 86%; overflow: hidden; display: flex; align-items: stretch; justify-content: center; direction: ltr; }
#order-chat-modal .oc-rx-barcode i { display: block; background: var(--ink); }
#order-chat-modal .oc-rx-code { text-align: center; font-size: 9.5px; letter-spacing: 3px; color: var(--soft); margin-top: 2px; direction: ltr; }

/* ---------- Header ---------- */
#order-chat-modal .order-chat-modal-header-subtle-time { font-variant-numeric: tabular-nums; }
#order-chat-modal .order-chat-modal-header-avatar { background: var(--oc-accent-soft); color: var(--oc-accent-deep); }

@media (prefers-reduced-motion: reduce) {
  #order-chat-modal *, #order-chat-modal *::before, #order-chat-modal *::after { animation: none !important; transition: none !important; }
}

/* ---------- Hide the side scrollbar in the chat (scrolling still works) ---------- */
#order-chat-modal .order-chat-messages, #order-chat-modal .order-chat-scroll-wrap { scrollbar-width: none !important; -ms-overflow-style: none; }
#order-chat-modal .order-chat-messages::-webkit-scrollbar, #order-chat-modal .order-chat-scroll-wrap::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }

/* ---------- Orders pin at the top of the chat: name + status in words, track beside it ---------- */
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 46%); align-items: center; column-gap: 14px; padding: 9px 0;
}
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) > .order-chat-progress-pin__order { display: none; }
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) > .order-progress-bar { grid-column: 2; grid-row: 1; margin: 0; min-width: 0; }
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) > .order-chat-prep-timer { grid-column: 1 / -1; }
/* captions move into the status line, so the icons no longer carry floating text */
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) .order-progress-ready-label,
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) .delegate-accept-time,
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) .delivered-time { display: none !important; }
#order-chat-modal .oc-pin-info { grid-column: 1; grid-row: 1; min-width: 0; text-align: right; }
#order-chat-modal .oc-pin-name { margin: 0; display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--oc-ink); line-height: 1.5; }
#order-chat-modal .oc-pin-type { flex: 0 0 auto; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; background: var(--oc-accent-soft); color: var(--oc-accent-deep); }
#order-chat-modal .oc-pin-status { margin: 1px 0 0; font-size: 11.5px; color: var(--oc-muted); line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#order-chat-modal .oc-pin-code { flex: 0 0 auto; font-size: 10.5px; font-weight: 500; color: var(--oc-muted); unicode-bidi: isolate; }
#order-chat-modal .oc-pin-name { min-width: 0; white-space: nowrap; }
#order-chat-modal .order-chat-progress-pin__item:not(.oc-pin-current):has(.oc-pin-info) .oc-pin-name { font-weight: 600; }
#order-chat-modal .order-chat-progress-pin__item.oc-pin-current .oc-pin-status { color: var(--oc-accent-deep); font-weight: 600; }

/* ---------- Pickup "I'm at the store" dock: one tidy row, compact directions ---------- */
/* Row: [ أنا عند المتجر ] [ إرشادات الوصول ⌄ ]; directions open above it as thumbnail + text. */
#order-chat-at-store-dock .oc-arrive-store {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "body body" "btn toggle";
  column-gap: 8px; align-items: stretch; padding: 8px; border-radius: 14px;
}
#order-chat-at-store-dock .oc-arrive-store .oc-at-store-btn {
  grid-area: btn; margin: 0 !important; min-height: 44px; padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 700;
}
#order-chat-at-store-dock .oc-arrive-store__toggle {
  grid-area: toggle; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto;
  min-height: 44px; padding: 0 12px; margin: 0; border-radius: 10px; cursor: pointer;
  background: var(--oc-incoming, #f1f5f7); border: 1px solid var(--oc-line, #e3eaed); color: var(--oc-ink, #0f2a33);
}
#order-chat-at-store-dock .oc-arrive-store__name { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
#order-chat-at-store-dock .oc-arrive-store__chevron { flex: 0 0 auto; margin-top: -3px; }
#order-chat-at-store-dock .oc-arrive-store.is-open .oc-arrive-store__toggle { background: var(--oc-accent-soft, #e6f6f8); border-color: transparent; color: var(--oc-accent-deep, #1f97a6); }

#order-chat-at-store-dock .oc-arrive-store__body { grid-area: body; padding: 2px 2px 10px; }
#order-chat-at-store-dock .oc-arrive-store.is-open .oc-arrive-store__body { display: flex; align-items: center; gap: 10px; }
#order-chat-at-store-dock .oc-pickup-arrival__photos { flex: 0 0 auto; gap: 6px; }
#order-chat-at-store-dock .oc-pickup-arrival__zoom { flex: 0 0 auto; width: 56px; height: 56px; padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--oc-line, #e3eaed); }
#order-chat-at-store-dock .oc-pickup-arrival__zoom img { width: 100%; height: 100%; object-fit: cover; display: block; }
#order-chat-at-store-dock .oc-pickup-arrival__text,
#order-chat-at-store-dock .oc-pickup-arrival__wait { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 13px; line-height: 1.6; color: var(--oc-ink, #0f2a33); }
#order-chat-at-store-dock .oc-pickup-arrival__maps { margin: 0; }
/* pickup: order number, large, at the end of the card + one line saying what it is for */
#order-chat-at-store-dock .oc-arrive-store.is-open .oc-arrive-store__body { flex-wrap: wrap; row-gap: 8px; }
#order-chat-at-store-dock .oc-pickup-arrival__text { flex: 1 1 0; }
#order-chat-at-store-dock .oc-arrive-num {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 86px; height: 56px; padding: 0 12px;
  border-radius: 10px; background: var(--oc-accent-soft, #e6f6f8); color: var(--oc-accent-deep, #1f97a6);
  position: relative; border: 0; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .12s;
}
#order-chat-at-store-dock .oc-arrive-num:active { transform: scale(.95); }
#order-chat-at-store-dock .oc-arrive-num svg { position: absolute; top: 5px; inset-inline-end: 6px; width: 11px; height: 11px; opacity: .7; }
#order-chat-at-store-dock .oc-arrive-num small { font-size: 10.5px; font-weight: 600; line-height: 1.3; opacity: .85; }
#order-chat-at-store-dock .oc-arrive-num b { font-size: 21px; font-weight: 800; line-height: 1.15; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
#order-chat-at-store-dock .oc-arrive-hint { flex: 0 0 100%; margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--oc-muted, #6b7f86); }
html.dark-mode #order-chat-at-store-dock .oc-arrive-num, body.dark-mode #order-chat-at-store-dock .oc-arrive-num { background: rgba(47, 179, 194, .16); color: #6fd3de; }
html.dark-mode #order-chat-at-store-dock .oc-arrive-hint, body.dark-mode #order-chat-at-store-dock .oc-arrive-hint { color: #a3b1b6; }

/* Orders pin toggle: always show its title (the single-order case left an empty row with only the arrow) */
#order-chat-modal .order-chat-progress-pin:not(.is-collapsed) .order-chat-progress-pin__toggle-label { display: block; }
#order-chat-modal .order-chat-progress-pin__toggle { padding: 4px 2px; margin: 0; min-height: 30px; }
#order-chat-modal .order-chat-progress-pin__toggle-label { font-size: 12px; font-weight: 700; color: var(--oc-muted); }
#order-chat-modal .order-chat-progress-pin.is-collapsed .order-chat-progress-pin__toggle-label { color: var(--oc-ink); }
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info):first-child { padding-top: 4px; }

/* Orders pin: show only the icon of the current stage instead of the whole track */
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) { grid-template-columns: minmax(0, 1fr) auto; }
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) .order-progress-track { justify-content: flex-end; width: auto; }
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) .order-progress-segment,
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) .order-progress-node:not(.oc-pin-now) { display: none !important; }
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) .order-progress-node-wrap { display: contents; }
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) .order-progress-node.oc-pin-now { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; }
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) .order-progress-node.oc-pin-now svg { width: 21px; height: 21px; }
#order-chat-modal .order-chat-progress-pin__item:has(.oc-pin-info) .order-progress-cancel-reason { display: none; }

/* Orders pin: a chat lists only its own order */
#order-chat-modal .order-chat-progress-pin__item.oc-pin-other { display: none !important; }

/* ---------- Message with a total (store / delegate bill): text, then label + amount on one line, then time ---------- */
#order-chat-modal .order-chat-bubble-row:has(.order-chat-bubble-total) { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
#order-chat-modal .order-chat-bubble-row:has(.order-chat-bubble-total) .order-chat-bubble-text { display: block; width: 100%; }
#order-chat-modal .order-chat-bubble-row:has(.order-chat-bubble-total) .order-chat-bubble-text-main { display: block; font-size: 13.5px; line-height: 1.65; }
#order-chat-modal .order-chat-bubble-total {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--oc-line);
}
#order-chat-modal .order-chat-bubble-total-label { font-size: 12.5px; font-weight: 600; color: var(--oc-muted); line-height: 1.4; }
#order-chat-modal .order-chat-bubble-total-amt { flex: 0 0 auto; font-size: 16px; font-weight: 800; line-height: 1; direction: ltr; }
#order-chat-modal .order-chat-bubble-row:has(.order-chat-bubble-total) .order-chat-bubble-time { align-self: flex-end; margin: 6px 0 0; font-size: 10.5px; }
#order-chat-modal .oc-bill-bubble > .order-chat-bubble-row { padding: 16px 14px 8px; }
#order-chat-modal .order-chat-bubble-row:has(.order-chat-bubble-total) { width: 100%; max-width: none; box-sizing: border-box; }
#order-chat-modal .order-chat-bubble:has(> .order-chat-bubble-media--image-thumb):has(.order-chat-bubble-total) { width: 254px; box-sizing: border-box; }

/* ---------- Photo messages (image only, no caption): thin even frame, corners that follow the bubble, time on the photo ---------- */
#order-chat-modal .order-chat-bubble:has(> .order-chat-bubble-media--image-thumb):not(:has(.order-chat-bubble-text)) {
  position: relative; padding: 3px; width: auto;
}
#order-chat-modal .order-chat-bubble:has(> .order-chat-bubble-media--image-thumb):not(:has(.order-chat-bubble-text)) > .order-chat-bubble-media--image-thumb {
  margin: 0; border: 0; background: transparent; max-height: 320px;
  border-radius: 15px 15px 15px 3px; /* incoming: tail at bottom-left */
}
#order-chat-modal .order-chat-bubble-customer .order-chat-bubble:has(> .order-chat-bubble-media--image-thumb):not(:has(.order-chat-bubble-text)) > .order-chat-bubble-media--image-thumb {
  border-radius: 15px 15px 3px 15px; /* outgoing: tail at bottom-right */
}
#order-chat-modal .order-chat-bubble:has(> .order-chat-bubble-media--image-thumb):not(:has(.order-chat-bubble-text)) > .order-chat-bubble-media--image-thumb img {
  width: 100% !important; height: auto !important; max-height: 320px; object-fit: cover !important; border-radius: inherit;
}
#order-chat-modal .order-chat-bubble:has(> .order-chat-bubble-media--image-thumb):not(:has(.order-chat-bubble-text)) > .order-chat-bubble-row {
  position: absolute; bottom: 9px; left: 10px; margin: 0; padding: 2px 8px; width: auto; max-width: none;
  border-radius: 999px; background: rgba(8, 22, 27, .5); backdrop-filter: blur(4px); pointer-events: none;
}
#order-chat-modal .order-chat-bubble:has(> .order-chat-bubble-media--image-thumb):not(:has(.order-chat-bubble-text)) .order-chat-bubble-time {
  color: #fff !important; opacity: 1; font-size: 10.5px; margin: 0;
}

/* ---------- Tail at the corner each bubble comes out of (square corner + concave hook, as in the reference) ---------- */
#order-chat-modal .order-chat-bubble { position: relative; isolation: isolate; border-radius: 18px 18px 18px 0; }
#order-chat-modal .order-chat-bubble-customer .order-chat-bubble { border-radius: 18px 18px 0 18px; }
#order-chat-modal .order-chat-bubble::after {
  content: ''; position: absolute; z-index: -1; bottom: 0; left: -10px; width: 11px; height: 17px; pointer-events: none;
  background: #e3eaee;
  /* box: bubble edge at x=0. Straight down the edge, along the bottom to the tip, concave curve back up. */
  clip-path: path("M0 0 L0 17 L11 17 C5.5 15.5 1.5 10 0 0 Z");
  transform: scaleX(-1); /* incoming: tip points left */
}
#order-chat-modal .order-chat-bubble-customer .order-chat-bubble::after {
  left: auto; right: -10px; transform: none; background: var(--oc-accent-deep); /* outgoing: tip points right */
}
html.dark-mode #order-chat-modal .order-chat-bubble-delegate .order-chat-bubble::after,
html.dark-mode #order-chat-modal .order-chat-bubble-store .order-chat-bubble::after { background: var(--oc-incoming); }
#order-chat-modal .order-chat-bubble.oc-bill-bubble::after { display: none; }
#order-chat-modal .order-chat-bubble.oc-bill-bubble { border-radius: 0; }
#order-chat-modal .order-chat-messages { padding-inline: 18px; }
/* photo corners follow the square tail corner */
#order-chat-modal .order-chat-bubble:has(> .order-chat-bubble-media--image-thumb):not(:has(.order-chat-bubble-text)) > .order-chat-bubble-media--image-thumb { border-radius: 15px 15px 15px 0; }
#order-chat-modal .order-chat-bubble-customer .order-chat-bubble:has(> .order-chat-bubble-media--image-thumb):not(:has(.order-chat-bubble-text)) > .order-chat-bubble-media--image-thumb { border-radius: 15px 15px 0 15px; }

/* ---------- Photo album: consecutive photos from one sender share a bubble ---------- */
#order-chat-modal .order-chat-row.oc-album-moved { display: none !important; }
#order-chat-modal .order-chat-bubble.oc-album { padding: 3px; width: 250px; }
#order-chat-modal .oc-album-grid {
  display: grid; gap: 3px; grid-template-columns: 1fr 1fr; overflow: hidden;
  border-radius: 15px 15px 15px 0;
}
#order-chat-modal .order-chat-bubble-customer .oc-album-grid { border-radius: 15px 15px 0 15px; }
#order-chat-modal .oc-album-grid[data-count="3"] { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
#order-chat-modal .oc-album-grid[data-count="3"] > :first-child { grid-row: 1 / span 2; aspect-ratio: auto; }
#order-chat-modal .oc-album-grid[data-many="1"] { grid-template-columns: 1fr 1fr 1fr; }
#order-chat-modal .oc-album-grid > .order-chat-bubble-media--image-thumb {
  width: 100% !important; height: auto !important; min-width: 0 !important; min-height: 0 !important; max-height: none; aspect-ratio: 1 / 1;
  margin: 0; border: 0; border-radius: 0; background: rgba(148, 163, 184, .18);
}
#order-chat-modal .oc-album-grid[data-count="2"] > .order-chat-bubble-media--image-thumb { aspect-ratio: 3 / 4; }
#order-chat-modal .oc-album-grid > .order-chat-bubble-media--image-thumb img { width: 100% !important; height: 100% !important; max-height: none; object-fit: cover !important; display: block; }
#order-chat-modal .order-chat-bubble.oc-album > .order-chat-bubble-row {
  position: absolute; bottom: 9px; left: 10px; margin: 0; padding: 2px 8px; width: auto; max-width: none;
  border-radius: 999px; background: rgba(8, 22, 27, .5); backdrop-filter: blur(4px); pointer-events: none;
}
#order-chat-modal .order-chat-bubble.oc-album .order-chat-bubble-time { color: #fff !important; opacity: 1; font-size: 10.5px; margin: 0; }
/* album cells: no own rounding (the grid clips the outer corners); the 3-photo layout fills its rows */
#order-chat-modal .oc-album-grid > .order-chat-bubble-media--image-thumb,
#order-chat-modal .oc-album-grid > .order-chat-bubble-media--image-thumb img { border-radius: 0 !important; }
#order-chat-modal .oc-album-grid[data-count="3"] { height: 280px; }
#order-chat-modal .oc-album-grid[data-count="3"] > .order-chat-bubble-media--image-thumb { aspect-ratio: auto; height: 100% !important; }

/* ---------- Attachment tray: photos waiting to be sent ---------- */
#order-chat-modal .oc-attach-tray { display: flex; align-items: center; gap: 8px; padding: 10px 2px 6px; overflow-x: auto; scrollbar-width: none; }
#order-chat-modal .oc-attach-tray[hidden] { display: none; }
#order-chat-modal .oc-attach-tray::-webkit-scrollbar { display: none; }
#order-chat-modal .oc-attach-item { position: relative; flex: 0 0 auto; width: 58px; height: 58px; }
#order-chat-modal .oc-attach-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; box-shadow: 0 0 0 1px rgba(15, 42, 51, .08); }
#order-chat-modal .oc-attach-item button {
  position: absolute; top: -5px; left: -5px; width: 20px; height: 20px; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; background: rgba(15, 30, 38, .82); color: #fff; cursor: pointer;
  box-shadow: 0 0 0 2px var(--oc-surface, #fff); transition: background .15s, transform .15s var(--oc-ease);
}
#order-chat-modal .oc-attach-item button svg { width: 10px; height: 10px; }
#order-chat-modal .oc-attach-item button:hover { background: #c8372d; }
#order-chat-modal .oc-attach-item button:active { transform: scale(.88); }
/* add-more tile: same footprint as a photo, soft fill, icon + label */
#order-chat-modal .oc-attach-more {
  flex: 0 0 auto; width: 58px; height: 58px; border-radius: 12px; border: 0; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: var(--oc-accent-soft); color: var(--oc-accent-deep);
  transition: background .15s, transform .15s var(--oc-ease);
}
#order-chat-modal .oc-attach-more svg { width: 22px; height: 22px; }
#order-chat-modal .oc-attach-more span { font-size: 10px; font-weight: 700; line-height: 1; }
#order-chat-modal .oc-attach-more:hover { background: #d6eff3; }
#order-chat-modal .oc-attach-more:active { transform: scale(.94); }
#order-chat-modal .oc-attach-count {
  flex: 0 0 auto; margin-inline-start: auto; padding: 4px 9px; border-radius: 999px; background: var(--oc-incoming);
  font-size: 11px; font-weight: 700; color: var(--oc-muted); white-space: nowrap;
}
#order-chat-modal .oc-attach-tray.is-sending { opacity: .55; pointer-events: none; }
/* the engine's single-photo preview is replaced by the tray */
#order-chat-modal #order-chat-compose .order-chat-compose-attach-preview { display: none !important; }

/* ---------- Photo viewer: previous / next and counter ---------- */
#order-chat-image-lightbox .oc-gallery-nav[hidden] { display: none; }
#order-chat-image-lightbox .oc-gallery-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; cursor: pointer; background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(6px);
  transition: background .15s, opacity .15s;
}
#order-chat-image-lightbox .oc-gallery-btn svg { width: 22px; height: 22px; }
#order-chat-image-lightbox .oc-gallery-btn:hover { background: rgba(255, 255, 255, .3); }
#order-chat-image-lightbox .oc-gallery-btn:disabled { opacity: 0; pointer-events: none; }
#order-chat-image-lightbox .oc-gallery-prev { right: 12px; }
#order-chat-image-lightbox .oc-gallery-next { left: 12px; }
#order-chat-image-lightbox .oc-gallery-count {
  position: absolute; z-index: 5; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  padding: 5px 12px; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 13px; font-weight: 700;
  direction: ltr; font-variant-numeric: tabular-nums;
}
#order-chat-image-lightbox-img.oc-gallery-in-next { animation: oc-gal-next .22s cubic-bezier(.22, .8, .24, 1); }
#order-chat-image-lightbox-img.oc-gallery-in-prev { animation: oc-gal-prev .22s cubic-bezier(.22, .8, .24, 1); }
@keyframes oc-gal-next { from { opacity: .2; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes oc-gal-prev { from { opacity: .2; transform: translateX(40px); } to { opacity: 1; transform: none; } }

/* Photo viewer close button: same family as the arrows (round, translucent, crisp icon) */
#order-chat-image-lightbox .order-chat-image-lightbox-close {
  top: max(14px, env(safe-area-inset-top)); width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0;
  font-size: 0; line-height: 0; cursor: pointer; backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
  transition: background-color .15s, transform .15s;
}
#order-chat-image-lightbox .order-chat-image-lightbox-close:hover { background-color: rgba(255, 255, 255, .3); }
#order-chat-image-lightbox .order-chat-image-lightbox-close:active { transform: scale(.9); }

/* The hidden file input was taking a 22px empty strip above the composer, so messages were cut off early. */
#order-chat-modal #order-chat-file-any {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: 0 !important;
  border: 0 !important; opacity: 0 !important; overflow: hidden; pointer-events: none; clip-path: inset(50%);
}

/* Photo with a caption (e.g. the delegate's bill): same thin frame as plain photos; the text keeps its own padding.
   The bubble has a fixed, modest width (it used to grow as wide as its caption, which made a bill photo fill the
   screen) and the photo fills its frame: no white bars beside a tall photo. A tap still opens the whole photo. */
#order-chat-modal .order-chat-bubble:has(> .order-chat-bubble-media--image-thumb):has(.order-chat-bubble-text) { padding: 3px; width: 226px; box-sizing: border-box; }
#order-chat-modal .order-chat-bubble:has(> .order-chat-bubble-media--image-thumb):has(.order-chat-bubble-text) > .order-chat-bubble-media--image-thumb {
  width: 100% !important; margin: 0; border: 0; border-radius: 15px 15px 6px 6px; max-height: 300px; background: transparent;
}
#order-chat-modal .order-chat-bubble:has(> .order-chat-bubble-media--image-thumb):has(.order-chat-bubble-text) > .order-chat-bubble-media--image-thumb img { max-height: 300px; object-fit: cover !important; }
#order-chat-modal .order-chat-bubble:has(> .order-chat-bubble-media--image-thumb):has(.order-chat-bubble-text) > .order-chat-bubble-row { padding: 9px 10px 5px; }

/* ---------- Order options popover (cancel): tidy layout + a pointer up to the ⋮ button ---------- */
#order-chat-modal #order-chat-menu-popover {
  top: calc(100% + 10px); overflow: visible; width: 264px; border-radius: 16px; border: 1px solid var(--oc-line);
  background: var(--oc-surface); box-shadow: 0 16px 36px -12px rgba(15, 42, 51, .28), 0 2px 6px rgba(15, 42, 51, .06);
}
#order-chat-modal #order-chat-menu-popover[hidden] { display: none; }
#order-chat-modal #order-chat-menu-popover::before {
  content: ''; position: absolute; top: -7px; left: 11px; width: 13px; height: 13px; transform: rotate(45deg);
  background: var(--oc-surface); border-top: 1px solid var(--oc-line); border-left: 1px solid var(--oc-line); border-top-left-radius: 3px;
}
#order-chat-modal .order-chat-cancel-panel { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
#order-chat-modal .order-chat-cancel-panel > [hidden] { display: none !important; }
#order-chat-modal .order-chat-cancel-panel__title { margin: 0; font-size: 14.5px; font-weight: 800; color: var(--oc-ink); line-height: 1.4; }
#order-chat-modal .order-chat-cancel-panel__meta { margin: -4px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--oc-muted); }
#order-chat-modal .order-chat-cancel-panel__meta:empty { display: none; }
#order-chat-modal .order-chat-cancel-panel__countdown {
  margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 0 12px;
  border-radius: 12px; background: #fff6ea; color: #8a4b12; font-size: 12.5px; font-weight: 700;
}
#order-chat-modal .order-chat-cancel-panel__countdown-val { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
#order-chat-modal #order-chat-cancel-order-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; margin: 0; padding: 0 12px;
  border: 0; border-radius: 12px; cursor: pointer; background: #fdecea; color: #b3261e; font-size: 13.5px; font-weight: 700;
  transition: background .15s, transform .15s var(--oc-ease);
}
#order-chat-modal #order-chat-cancel-order-btn:hover { background: #fbdcd8; }
#order-chat-modal #order-chat-cancel-order-btn:active { transform: scale(.98); }
#order-chat-modal #order-chat-cancel-order-btn:disabled { opacity: .5; cursor: default; }
#order-chat-modal .order-chat-cancel-order-btn__icon { display: grid; place-items: center; }
#order-chat-modal .order-chat-cancel-order-btn__icon svg { width: 19px; height: 19px; display: block; }
#order-chat-modal .order-chat-cancel-ask-delegate {
  width: 100%; min-height: 42px; margin: 0; padding: 0 12px; border-radius: 12px; border: 1px solid var(--oc-line);
  background: var(--oc-surface); color: var(--oc-accent-deep); font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ---------- Pickup receipt: smaller, tighter type ---------- */
#order-chat-modal .oc-bill { padding: calc(var(--zz) + 12px) 14px calc(var(--zz) + 12px); }
#order-chat-modal .oc-bill-wrap .oc-bill { padding-bottom: calc(var(--zz) + 20px); }
#order-chat-modal .oc-bill .oc-rx-brand { font-size: 14.5px; line-height: 1.35; }
#order-chat-modal .oc-bill .oc-rx-sub { font-size: 10.5px; margin-top: 1px; }
#order-chat-modal .oc-bill .oc-rx-rule {
  margin: 9px 0; height: 0; border: 0 !important; border-top: 1px dashed var(--rule) !important; background: none !important; opacity: 1 !important;
}
#order-chat-modal .oc-bill .oc-rx-rows { gap: 7px; }
#order-chat-modal .oc-bill .oc-rx-rows--tight { gap: 3px; }
#order-chat-modal .oc-bill .oc-rx-row { font-size: 11.5px; line-height: 1.5; align-items: flex-start; }
#order-chat-modal .oc-bill .oc-rx-row > span:first-child { font-weight: 600; }
#order-chat-modal .oc-bill .oc-rx-row > span:last-child { font-weight: 700; font-size: 11.5px; }
#order-chat-modal .oc-bill .oc-rx-row small { font-size: 10px; line-height: 1.5; margin-top: 0; }
#order-chat-modal .oc-bill .oc-rx-meta { font-size: 10.5px; }
#order-chat-modal .oc-bill .oc-rx-meta > span:first-child { font-weight: 400; }
#order-chat-modal .oc-bill .oc-rx-meta > span:last-child { font-weight: 600; font-size: 10.5px; }
#order-chat-modal .oc-bill .oc-rx-qty { font-size: 10px; font-weight: 500; }
#order-chat-modal .oc-bill .oc-rx-total > span:first-child { font-size: 13px; font-weight: 800; }
#order-chat-modal .oc-bill .oc-rx-total-amt { font-size: 14.5px; }
#order-chat-modal .oc-bill .oc-rx-thanks { font-size: 10px; margin-top: 9px; }
#order-chat-modal .oc-bill .oc-bill-photo-link { font-size: 10.5px; margin-top: 8px; }
#order-chat-modal .oc-bill .sar-symbol { font-size: .85em; }

/* Message with a total: smaller type, tighter box */
#order-chat-modal .order-chat-bubble-row:has(.order-chat-bubble-total) .order-chat-bubble-text-main { font-size: 12px; line-height: 1.6; }
#order-chat-modal .order-chat-bubble-total { margin-top: 7px; padding-top: 7px; }
#order-chat-modal .order-chat-bubble-total-label { font-size: 11.5px; }
#order-chat-modal .order-chat-bubble-total-amt { font-size: 14px; }
#order-chat-modal .order-chat-bubble-row:has(.order-chat-bubble-total) .order-chat-bubble-time { margin-top: 4px; font-size: 10px; }
#order-chat-modal .oc-bill-bubble > .order-chat-bubble-row { padding: 14px 12px 7px; }

/* ---------- Chat header buttons (⋮ and close): one matched pair ---------- */
#order-chat-modal .order-chat-modal-header-actions { display: flex; align-items: center; gap: 6px; }
#order-chat-modal .order-chat-modal-header-actions .order-chat-menu-wrap { display: flex; }
#order-chat-modal .order-chat-modal-close,
#order-chat-modal .order-chat-modal-header-actions .order-chat-menu-btn {
  width: 36px; height: 36px; margin: 0; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: var(--oc-incoming); color: var(--oc-ink);
  transition: background .15s, color .15s, transform .15s var(--oc-ease);
}
#order-chat-modal .order-chat-modal-header-actions [hidden] { display: none !important; }
#order-chat-modal .order-chat-modal-close svg,
#order-chat-modal .order-chat-modal-header-actions .order-chat-menu-btn svg { width: 18px; height: 18px; display: block; }
#order-chat-modal .order-chat-modal-close svg { stroke-width: 2.2; stroke-linecap: round; }
#order-chat-modal .order-chat-modal-close:hover,
#order-chat-modal .order-chat-modal-header-actions .order-chat-menu-btn:hover { background: var(--oc-accent-soft); color: var(--oc-accent-deep); }
#order-chat-modal .order-chat-modal-close:active,
#order-chat-modal .order-chat-modal-header-actions .order-chat-menu-btn:active { transform: scale(.9); }
#order-chat-modal .order-chat-modal-header-actions .order-chat-menu-btn[aria-expanded="true"] { background: var(--oc-accent-soft); color: var(--oc-accent-deep); }
/* header buttons: same rounded-square corners as the send button (not circles) */
#order-chat-modal .order-chat-modal-close,
#order-chat-modal .order-chat-modal-header-actions .order-chat-menu-btn { border-radius: 12px; }

/* Cancel popover in dark mode: tinted dark fills instead of the light-mode pastels */
html.dark-mode #order-chat-modal #order-chat-menu-popover { box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3); }
html.dark-mode #order-chat-modal .order-chat-cancel-panel__countdown { background: rgba(245, 158, 11, .14); color: #f3c27a; }
html.dark-mode #order-chat-modal #order-chat-cancel-order-btn { background: rgba(239, 68, 68, .16); color: #ff9d95; }
html.dark-mode #order-chat-modal #order-chat-cancel-order-btn:hover { background: rgba(239, 68, 68, .26); }
html.dark-mode #order-chat-modal .order-chat-cancel-ask-delegate { background: var(--oc-incoming); color: #7fd6e0; border-color: var(--oc-line); }

/* delivery marks on your own messages: ✓ sent · ✓✓ delivered · ✓✓ blue = read */
#order-chat-modal .oc-voice-read, #order-chat-modal .oc-img-read { display: none !important; } /* replaced by .oc-tick */
#order-chat-modal .order-chat-bubble-time:has(.oc-tick), #order-chat-modal .order-chat-voice-sent-at:has(.oc-tick) { display: inline-flex; align-items: center; gap: 3px; }
#order-chat-modal .oc-tick { display: inline-flex; flex: 0 0 auto; color: currentColor; opacity: .8; transition: color .25s; }
#order-chat-modal .oc-tick svg { width: 13px; height: 9px; display: block; }
#order-chat-modal .oc-tick[data-state="read"] svg { stroke-width: 2.1; }
#order-chat-modal .oc-tick[data-state="read"] { color: #30b6c5; opacity: 1; } /* Haatly's own sky teal (same as the "order confirmed" text) */
/* inside the teal text bubble the same sky tone is used in its lightest shade (teal on teal would vanish); unread marks stay dimmer */
/* your own text messages: the time sits on the side the bubble's tail comes out of (right) */
#order-chat-modal .order-chat-bubble-customer .order-chat-bubble-row > .order-chat-bubble-time { align-self: flex-start; }

/* inside the teal text bubble the same sky tone is used in its lightest shade (teal on teal would vanish); unread marks stay dimmer */
#order-chat-modal .order-chat-bubble-customer .order-chat-bubble:not(.order-chat-bubble--voice-msg):not(:has(> .order-chat-bubble-media--image-thumb)) .oc-tick[data-state="read"] { color: #b4f6ff; }
#order-chat-modal .order-chat-bubble-customer .order-chat-bubble:not(.order-chat-bubble--voice-msg):not(:has(> .order-chat-bubble-media--image-thumb)) .oc-tick:not([data-state="read"]) { opacity: .55; }

/* ---------- Delegate details popover: tidy two-row card ---------- */
/* row 1: avatar · name / role ........ rating     row 2 (after a hairline): "vehicle plate" label ........ plate */
#order-chat-modal #order-chat-delegate-profile-popover {
  padding: 14px 14px 14px; border-radius: 16px; border: 1px solid var(--oc-line, #e3eaed); background: #fff;
  box-shadow: 0 10px 30px rgba(15, 42, 51, .12);
}
#order-chat-delegate-profile-popover .order-chat-dp-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who rating" "plate plate"; align-items: center; column-gap: 10px; row-gap: 0;
}
#order-chat-delegate-profile-popover .order-chat-dp-head { display: contents; }
#order-chat-delegate-profile-popover .order-chat-dp-head-text {
  grid-area: who; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; row-gap: 1px; align-items: center; text-align: start; min-width: 0;
}
#order-chat-delegate-profile-popover .order-chat-dp-head-text::before {
  content: ''; grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 50%; background-color: var(--oc-accent-soft, #e6f6f8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f97a6' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 20px 20px;
}
#order-chat-delegate-profile-popover .order-chat-dp-title { grid-column: 2; align-self: end; margin: 0; font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--oc-ink, #0f2a33); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#order-chat-delegate-profile-popover .order-chat-dp-role { grid-column: 2; align-self: start; margin: 0; font-size: 11.5px; line-height: 1.4; color: var(--oc-muted, #6b7f86); }
/* rating: one star, the score, and the count under it */
#order-chat-delegate-profile-popover .order-chat-dp-rating {
  grid-area: rating; margin: 0; display: grid; grid-template-columns: auto auto; justify-content: end; align-items: center; column-gap: 4px; row-gap: 1px; direction: ltr;
}
#order-chat-delegate-profile-popover .order-chat-dp-stars { display: inline-flex; }
#order-chat-delegate-profile-popover .order-chat-dp-star:nth-child(n+2) { display: none; }
#order-chat-delegate-profile-popover .order-chat-dp-star svg { width: 15px; height: 15px; display: block; }
#order-chat-delegate-profile-popover .order-chat-dp-rating-num { font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--oc-ink, #0f2a33); font-variant-numeric: tabular-nums; }
#order-chat-delegate-profile-popover .order-chat-dp-rating-count { grid-column: 1 / -1; justify-self: end; font-size: 10.5px; line-height: 1.3; color: var(--oc-muted, #6b7f86); direction: rtl; }
/* vehicle plate row */
#order-chat-delegate-profile-popover .order-chat-dp-plate {
  grid-area: plate; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--oc-line, #e9eef0);
}
#order-chat-delegate-profile-popover .order-chat-dp-plate::before { content: 'لوحة المركبة'; font-size: 12px; font-weight: 600; color: var(--oc-muted, #6b7f86); white-space: nowrap; }
html[lang^="en"] #order-chat-delegate-profile-popover .order-chat-dp-plate::before { content: 'Vehicle plate'; }
#order-chat-delegate-profile-popover .order-chat-dp-plate { direction: rtl; }
html[lang^="en"] #order-chat-delegate-profile-popover .order-chat-dp-plate { direction: ltr; }
#order-chat-delegate-profile-popover .order-chat-dp-plate-strip { flex: 0 0 auto; width: 150px; max-width: 60%; direction: ltr; }
/* dark mode */
html.dark-mode #order-chat-modal #order-chat-delegate-profile-popover, body.dark-mode #order-chat-modal #order-chat-delegate-profile-popover { background: #2b2c34; border-color: #3a3c46; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-title, html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-rating-num { color: #f1f4f5; }
html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-role, html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-rating-count, html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-plate::before { color: #a3b1b6; }
html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-plate { border-top-color: #3a3c46; }
html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-head-text::before { background-color: rgba(47, 179, 194, .16); }

/* delegate popover · bank account + transfer QR (third block, full width) */
#order-chat-delegate-profile-popover .order-chat-dp-bank {
  grid-column: 1 / -1; margin: 12px 0 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--oc-line, #e9eef0); background: none; border-radius: 0;
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
#order-chat-delegate-profile-popover .order-chat-dp-bank-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; }
#order-chat-delegate-profile-popover .order-chat-dp-bank-label { margin: 0; font-size: 12px; font-weight: 600; color: var(--oc-muted, #6b7f86); }
#order-chat-delegate-profile-popover .order-chat-dp-bank-name { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--oc-ink, #0f2a33); }
#order-chat-delegate-profile-popover .order-chat-dp-bank-strip {
  display: flex; align-items: center; gap: 6px; margin: 0; padding: 0 4px 0 12px; height: 42px; border: 0; border-radius: 10px; background: #f3f6f7; direction: ltr;
}
#order-chat-delegate-profile-popover .order-chat-dp-bank-num {
  flex: 1 1 auto; min-width: 0; padding: 0; border: 0; background: none; font-size: 13px; font-weight: 600; letter-spacing: .3px; color: var(--oc-ink, #0f2a33);
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left;
}
#order-chat-delegate-profile-popover .order-chat-dp-copy-btn {
  flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--oc-accent-deep, #1f97a6); display: grid; place-items: center; cursor: pointer;
}
#order-chat-delegate-profile-popover .order-chat-dp-copy-btn:active { background: rgba(31, 151, 166, .12); }
/* QR: small picture (tap to enlarge) beside its label and the save button */
#order-chat-delegate-profile-popover .order-chat-dp-bank-qr {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-areas: "img label" "img save"; column-gap: 12px; row-gap: 6px; align-items: center; margin: 2px 0 0; padding: 0; border: 0; background: none;
}
#order-chat-delegate-profile-popover .order-chat-dp-bank-qr-row { display: contents; }
#order-chat-delegate-profile-popover .order-chat-dp-bank-qr img {
  grid-area: img; width: 96px; height: 96px; padding: 0; border-radius: 12px; border: 1px solid var(--oc-line, #e3eaed); background: #1c1c1e; object-fit: cover; object-position: center top; /* the bank's IBAN card: the thumb shows its QR, a tap opens the whole card */ cursor: zoom-in; box-sizing: border-box; display: block; margin: 0;
}
#order-chat-delegate-profile-popover .order-chat-dp-bank-qr-label { grid-area: label; align-self: end; margin: 0; font-size: 12px; font-weight: 600; color: var(--oc-muted, #6b7f86); text-align: start; }
#order-chat-delegate-profile-popover .order-chat-dp-save-btn {
  grid-area: save; align-self: start; justify-self: start; display: inline-flex; flex-direction: row; align-items: center; gap: 6px; width: auto; height: 32px; padding: 0 12px; margin: 0;
  border: 0; border-radius: 9px; background: var(--oc-accent-soft, #e6f6f8); color: var(--oc-accent-deep, #1f97a6); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
#order-chat-delegate-profile-popover .order-chat-dp-save-btn svg { width: 15px; height: 15px; }
html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-bank { border-top-color: #3a3c46; }
html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-bank-strip { background: #34353e; }
html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-bank-num, html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-bank-name { color: #f1f4f5; }
html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-bank-label, html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-bank-qr-label { color: #a3b1b6; }
html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-save-btn { background: rgba(47, 179, 194, .16); color: #6fd3de; }
html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-bank-qr img { border-color: #3a3c46; }

/* delegate popover comes out the same way as the ⋮ options card: same surface, border, shadow and a pointer up to the avatar it opens from */
#order-chat-modal #order-chat-delegate-profile-popover {
  overflow: visible; margin-top: 10px; border: 1px solid var(--oc-line); background: var(--oc-surface);
  box-shadow: 0 16px 36px -12px rgba(15, 42, 51, .28), 0 2px 6px rgba(15, 42, 51, .06);
}
#order-chat-modal #order-chat-delegate-profile-popover::before {
  content: ''; position: absolute; top: -7px; right: 13px; width: 13px; height: 13px; transform: rotate(45deg);
  background: var(--oc-surface); border-top: 1px solid var(--oc-line); border-left: 1px solid var(--oc-line); border-top-left-radius: 3px;
}
html.dark-mode #order-chat-modal #order-chat-delegate-profile-popover, body.dark-mode #order-chat-modal #order-chat-delegate-profile-popover { background: var(--oc-surface); border-color: var(--oc-line); box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3); }

/* voice bubble on a real connection: the wave may never push past its column, whatever its length */
#order-chat-modal .order-chat-voice-player-track { min-width: 0; }
#order-chat-modal .order-chat-voice-main { min-width: 0; max-width: 100%; overflow: hidden; }
#order-chat-modal .order-chat-voice-wave-block { max-width: 100%; }
#order-chat-modal .oc-voice-side { margin-inline-start: 2px; }
/* not-yet-played mark: a small dot at the corner of the play mark (it was sized for the old round button) */
#order-chat-modal .order-chat-voice-player.oc-unplayed .order-chat-voice-play::before {
  top: 5px; left: 0; width: 7px; height: 7px; box-shadow: none;
}

/* delegate popover · name and role as direct children (a delegate with no vehicle plate, or the store-payment
   variant of this popover): name and role at the start, rating at the end, anything else full width below */
#order-chat-delegate-profile-popover .order-chat-dp-inner:has(> .order-chat-dp-title) { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title rating" "role rating"; }
#order-chat-delegate-profile-popover .order-chat-dp-inner:has(> .order-chat-dp-title):has(> .order-chat-dp-rating) { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "av title rating" "av role rating"; }
#order-chat-delegate-profile-popover .order-chat-dp-inner:has(> .order-chat-dp-title):has(> .order-chat-dp-rating)::before {
  content: ''; grid-area: av; width: 40px; height: 40px; border-radius: 50%; background-color: var(--oc-accent-soft, #e6f6f8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f97a6' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 20px 20px;
}
#order-chat-delegate-profile-popover .order-chat-dp-inner > .order-chat-dp-title { grid-area: title; align-self: end; text-align: start; }
#order-chat-delegate-profile-popover .order-chat-dp-inner > .order-chat-dp-role { grid-area: role; align-self: start; text-align: start; }
html.dark-mode #order-chat-delegate-profile-popover .order-chat-dp-inner:has(> .order-chat-dp-title):has(> .order-chat-dp-rating)::before { background-color: rgba(47, 179, 194, .16); }

/* ---------- A currency word typed on its own in a message (chat-redesign.js) ----------
   It sits in the site's .sar-symbol element so the page-wide currency script leaves it alone; here it is plain
   message text again: the message's own font, size, weight and colour instead of the symbol's. */
/* (two ids and the bubble class: the site colours a delegate bubble's symbol with an !important rule of its own) */
#order-chat-modal #order-chat-messages .order-chat-bubble .sar-symbol.oc-cur-word {
  font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; line-height: inherit !important;
  color: inherit !important; display: inline !important; margin: 0 !important; vertical-align: baseline !important;
}


/* ===== orders popup ===== */
/* Notification settings live in Account → Settings → Notifications, so the orders popup no longer carries its own menu. */
#notifications-header-push-menu, #notifications-push-flyout { display: none !important; }


/* ===== account hub, home details ===== */
/* ==========================================================================
   Account hub ("حسابي") redesign — preview layer, loaded after the original styles.
   Scope: #sf-home-tools-dialog only. Port to the storefront styles once approved.
   ========================================================================== */
#sf-home-tools-dialog {
  --hub-bg: #f3f6f7;
  --hub-card: #ffffff;
  --hub-ink: #10272d;
  --hub-muted: #6d8087;
  --hub-line: #e4ecee;
  --hub-accent: #2fb3c2;
  --hub-accent-deep: #17899a;
  --hub-accent-soft: #e7f6f8;
  --hub-ease: cubic-bezier(.22, .8, .24, 1);
  background: var(--hub-bg) !important;
  color: var(--hub-ink);
}
html.dark-mode #sf-home-tools-dialog {
  --hub-bg: #17191f; --hub-card: #20232b; --hub-ink: #e9f1f3; --hub-muted: #9fb0b6;
  --hub-line: #2e333d; --hub-accent-soft: #17343a;
}

/* ---------- Top bar ---------- */
#sf-home-tools-dialog .sf-hub-topbar {
  background: var(--hub-card); border-bottom: 1px solid var(--hub-line);
  padding: 10px 12px; position: sticky; top: 0; z-index: 3;
}
#sf-home-tools-dialog .sf-hub-topbar h2 { font-size: 17px; font-weight: 800; letter-spacing: -.2px; color: var(--hub-ink); }
#sf-home-tools-dialog .sf-home-close {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--hub-bg); color: var(--hub-ink); border: 0;
  transition: background .2s, transform .15s var(--hub-ease);
}
#sf-home-tools-dialog .sf-home-close:hover { background: var(--hub-accent-soft); color: var(--hub-accent-deep); }
#sf-home-tools-dialog .sf-home-close:active { transform: scale(.92); }
#sf-home-tools-dialog .sf-home-close svg { width: 20px; height: 20px; }

/* ---------- Body ---------- */
#sf-home-tools-dialog .sf-hub-body { padding: 18px 16px 28px; }
#sf-home-tools-dialog .sf-hub-welcome { font-size: 22px; font-weight: 800; letter-spacing: -.3px; margin: 2px 4px 14px; color: var(--hub-ink); }

/* ---------- Profile / sign-in card ---------- */
#sf-home-tools-dialog .sf-hub-profile {
  position: relative; overflow: hidden; isolation: isolate; width: 100%;
  display: grid; grid-template-columns: 54px 1fr 36px; align-items: center; gap: 14px;
  padding: 18px 16px; border: 0; border-radius: 22px; text-align: start; cursor: pointer;
  background: linear-gradient(135deg, #1a8e9f 0%, #2fb3c2 55%, #56cbd6 100%);
  color: #fff;
  box-shadow: 0 14px 28px -14px rgba(23, 137, 154, .65), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .2s var(--hub-ease), box-shadow .25s var(--hub-ease);
}
#sf-home-tools-dialog .sf-hub-profile::before,
#sf-home-tools-dialog .sf-hub-profile::after {
  content: ''; position: absolute; z-index: -1; border-radius: 50%; background: rgba(255, 255, 255, .12); pointer-events: none;
}
#sf-home-tools-dialog .sf-hub-profile::before { width: 170px; height: 170px; inset-inline-end: -50px; top: -90px; }
#sf-home-tools-dialog .sf-hub-profile::after { width: 110px; height: 110px; inset-inline-end: 40px; bottom: -70px; background: rgba(255, 255, 255, .08); }
#sf-home-tools-dialog .sf-hub-profile:hover { transform: translateY(-1px); box-shadow: 0 18px 32px -14px rgba(23, 137, 154, .7), inset 0 1px 0 rgba(255, 255, 255, .25); }
#sf-home-tools-dialog .sf-hub-profile:active { transform: scale(.985); }
#sf-home-tools-dialog .sf-hub-avatar {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .2); color: #fff; border: 1.5px solid rgba(255, 255, 255, .55);
  backdrop-filter: blur(4px);
}
#sf-home-tools-dialog .sf-hub-avatar svg { width: 26px; height: 26px; }
#sf-home-tools-dialog .sf-hub-profile .sf-home-tool-copy strong { display: block; font-size: 17px; font-weight: 800; color: #fff; line-height: 1.35; }
#sf-home-tools-dialog .sf-hub-profile .sf-home-tool-copy small { display: block; margin-top: 2px; font-size: 12.5px; color: rgba(255, 255, 255, .88); }
#sf-home-tools-dialog .sf-hub-profile-next {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--hub-accent-deep); box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
}
#sf-home-tools-dialog .sf-hub-profile-next svg { width: 16px; height: 16px; }

/* ---------- Section label ---------- */
#sf-home-tools-dialog .sf-hub-section-label {
  margin: 22px 6px 8px; font-size: 12px; font-weight: 700; color: var(--hub-muted); letter-spacing: .2px;
}

/* ---------- Grouped list ---------- */
#sf-home-tools-dialog .sf-home-tools-list {
  display: grid; gap: 0; background: var(--hub-card); border: 1px solid var(--hub-line);
  border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(16, 39, 45, .03), 0 8px 20px -14px rgba(16, 39, 45, .18);
}
#sf-home-tools-dialog .sf-home-tools-list > button {
  position: relative; display: grid; grid-template-columns: 42px 1fr 20px; align-items: center; gap: 12px;
  width: 100%; min-height: 66px; padding: 12px 14px; margin: 0; text-align: start; cursor: pointer;
  background: transparent; border: 0; border-radius: 0; color: var(--hub-ink);
  transition: background .18s;
}
#sf-home-tools-dialog .sf-home-tools-list > button + button::before {
  content: ''; position: absolute; top: 0; inset-inline-start: 68px; inset-inline-end: 0; height: 1px; background: var(--hub-line);
}
#sf-home-tools-dialog .sf-home-tools-list > button:hover { background: color-mix(in srgb, var(--hub-accent-soft) 45%, transparent); }
#sf-home-tools-dialog .sf-home-tools-list > button:active { background: var(--hub-accent-soft); }
#sf-home-tools-dialog .sf-home-tools-list > button:focus-visible { outline: 2px solid var(--hub-accent); outline-offset: -2px; }
#sf-home-tools-dialog .sf-home-tool-icon {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: var(--hub-accent-soft); color: var(--hub-accent-deep);
}
#sf-home-tools-dialog .sf-home-tool-icon svg { width: 21px; height: 21px; }
#sf-home-tools-dialog .sf-home-tool-title { font-size: 15px; font-weight: 700; color: var(--hub-ink); line-height: 1.4; }
#sf-home-tools-dialog .sf-home-tools-list small { display: block; margin-top: 1px; font-size: 12px; color: var(--hub-muted); line-height: 1.5; }
#sf-home-tools-dialog .sf-home-tool-arrow { border-color: #a9b8bd; opacity: .9; justify-self: center; }

/* ---------- Brand footer ---------- */
#sf-home-tools-dialog .sf-hub-brand {
  margin-top: 30px; text-align: center; font-size: 15px; font-weight: 800; letter-spacing: 2px;
  color: color-mix(in srgb, var(--hub-muted) 55%, transparent); text-transform: uppercase;
}
#sf-home-tools-dialog .sf-hub-brand span { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }

/* ---------- Sub-pages: language list, notification detail, legal ---------- */
#sf-home-tools-dialog .sf-hub-languages {
  display: grid; background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: 18px; overflow: hidden;
}
#sf-home-tools-dialog .sf-hub-languages a {
  display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 12px 16px;
  font-size: 15px; font-weight: 700; color: var(--hub-ink); text-decoration: none; background: transparent; border: 0; border-radius: 0;
}
#sf-home-tools-dialog .sf-hub-languages a + a { border-top: 1px solid var(--hub-line); }
#sf-home-tools-dialog .sf-hub-languages a[aria-current="true"] { background: color-mix(in srgb, var(--hub-accent-soft) 60%, transparent); color: var(--hub-accent-deep); }
#sf-home-tools-dialog .sf-hub-detail {
  background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: 20px; padding: 26px 18px; text-align: center;
}
#sf-home-tools-dialog .sf-hub-detail-icon { background: var(--hub-accent-soft); color: var(--hub-accent-deep); }
#sf-home-tools-dialog .sf-hub-primary { border-radius: 14px; min-height: 48px; font-weight: 800; }
#sf-home-tools-dialog .sf-hub-legal { background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: 18px; padding: 18px 16px; }

@media (prefers-reduced-motion: reduce) {
  #sf-home-tools-dialog * { transition: none !important; }
}

/* ==========================================================================
   Phone account dialog ("الحساب الشخصي") — tidy-up only.
   Keeps the original card, colours, icon box and button; fixes spacing and alignment.
   Scope: #sf-home-account-dialog only.
   ========================================================================== */
/* head: title and close on one line */
#sf-home-account-dialog .sf-home-dialog-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
#sf-home-account-dialog .sf-home-dialog-head h2 { margin: 0; font-size: 17px; line-height: 1.4; }
#sf-home-account-dialog .sf-home-close { width: 34px; height: 34px; display: grid; place-items: center; padding: 0 0 2px; line-height: 1; }

/* notice, icon and copy: even vertical rhythm, centred */
#sf-home-account-dialog .sf-phone-demo { margin: 0; text-align: center; }
#sf-home-account-dialog .sf-phone-welcome { margin: 16px auto 12px; }
#sf-home-account-dialog form, #sf-home-account-dialog [data-phone-profile] { display: grid; }
#sf-home-account-dialog form[hidden], #sf-home-account-dialog [data-phone-profile][hidden] { display: none; }
#sf-home-account-dialog h3 { margin: 0; text-align: center; }
#sf-home-account-dialog h3 + p { margin: 6px 0 18px; text-align: center; line-height: 1.6; }
#sf-home-account-dialog label { display: block; margin: 0 2px 7px; }

/* phone field: aligned prefix and input, clear focus */
#sf-home-account-dialog .sf-phone-number { display: flex; align-items: center; direction: ltr; height: 52px; }
#sf-home-account-dialog .sf-phone-number input { flex: 1 1 auto; min-width: 0; height: 100%; font-variant-numeric: tabular-nums; }
#sf-home-account-dialog .sf-phone-number > span { font-variant-numeric: tabular-nums; }
#sf-home-account-dialog .sf-phone-hint { margin: 8px 2px 0; line-height: 1.6; }
#sf-home-account-dialog .sf-phone-primary { width: 100%; height: 50px; margin-top: 18px; }

/* code step */
#sf-home-account-dialog .sf-phone-recipient { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -6px 0 16px; font-variant-numeric: tabular-nums; }
#sf-home-account-dialog .sf-phone-code { width: 100%; height: 54px; text-align: center; font-size: 22px; letter-spacing: 8px; padding-inline-start: 8px; font-variant-numeric: tabular-nums; }
#sf-home-account-dialog small { display: block; margin: 8px 2px 0; text-align: center; }
#sf-home-account-dialog small:empty { display: none; }
#sf-home-account-dialog .sf-phone-resend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; margin-top: 14px; }

/* profile step */
#sf-home-account-dialog .sf-phone-verified { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 0; font-variant-numeric: tabular-nums; }
#sf-home-account-dialog .sf-phone-logout { margin: 12px auto 0; }

/* messages */
#sf-home-account-dialog .sf-phone-status { margin: 12px 0 0; text-align: center; }
#sf-home-account-dialog .sf-phone-status:empty { display: none; }
#sf-home-account-dialog .sf-phone-error { margin: 12px 0 0; text-align: center; }
#sf-home-account-dialog .sf-phone-error[hidden] { display: none; }

/* ==========================================================================
   Store list cards — small tweaks
   ========================================================================== */
/* rating chip: no outline, in light and dark mode */
.zoro-card .rating-corner { border: 0 !important; box-shadow: none !important; }

/* ==========================================================================
   Home: shared-delivery banner — more breathing room (it was squeezed into 88px)
   ========================================================================== */
.sf-home .ht-share-home:has(.ht-share-normal) { padding: 18px 20px !important; border-radius: 20px; }
.sf-home .ht-share-home .ht-share-normal { gap: 16px; align-items: center; }
.sf-home .ht-share-home .ht-share-copy h2 { font-size: 21px !important; line-height: 1.3 !important; margin: 0 !important; }
.sf-home .ht-share-home .ht-share-copy p { font-size: 13px !important; line-height: 1.5 !important; margin: 4px 0 0 !important; opacity: .92; }
.sf-home .ht-share-home .ht-share-primary { margin-top: 12px !important; min-height: 36px !important; padding: 0 14px !important; border-radius: 11px; font-size: 13px !important; gap: 8px; }
.sf-home .ht-share-home .ht-share-primary .ht-share-icon { width: 18px; height: 18px; }
.sf-home .ht-share-home .ht-share-normal-saving { gap: 6px; }
.sf-home .ht-share-home .ht-share-normal-percent b { font-size: 52px; line-height: 1; }
.sf-home .ht-share-home .ht-share-normal-percent span { font-size: 24px; line-height: 1; }
.sf-home .ht-share-home .ht-share-normal-saving small { font-size: 12px !important; line-height: 1.4 !important; opacity: .92; }

/* shared-delivery banner: a faint dashed "route" behind the saving figure, fading out towards the text */
.sf-home .ht-share-home:has(.ht-share-normal) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 140' fill='none'%3E%3Cdefs%3E%3ClinearGradient id='f' x1='0' x2='1' y1='0' y2='0'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.45' stop-color='%23fff' stop-opacity='.7'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cmask id='m'%3E%3Crect width='300' height='140' fill='url%28%23f%29'/%3E%3C/mask%3E%3C/defs%3E%3Cg mask='url%28%23m%29'%3E%3Cg stroke='%23fff' stroke-opacity='.2' stroke-width='1.4' stroke-dasharray='5 7' stroke-linecap='round'%3E%3Cpath d='M0 10h40a14 14 0 0 1 14 14v92a14 14 0 0 1-14 14H0'/%3E%3Cpath d='M230 0v30a14 14 0 0 1-14 14h-26'/%3E%3Cpath d='M54 100h246'/%3E%3Cpath d='M80 100V56a12 12 0 0 1 12-12h98'/%3E%3C/g%3E%3Ccircle cx='196' cy='44' r='5.5' fill='%23fff' fill-opacity='.2'/%3E%3Ccircle cx='80' cy='100' r='7.5' fill='%23fff' fill-opacity='.16'/%3E%3C/g%3E%3C/svg%3E"), linear-gradient(115deg, rgb(19, 125, 137), rgb(33, 158, 172) 65%, rgb(44, 179, 197)) !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position: left center, center !important;
  background-size: auto 100%, cover !important;
}
.sf-home .ht-share-home .ht-share-normal { position: relative; z-index: 1; }
.sf-home .ht-share-home .ht-share-primary { gap: 14px; }

/* ==========================================================================
   Home categories: "خضار و فواكه" gets its own photo tile: the reference bag photo recoloured to Haatly's teal with the
   "H" mark (custom/img/storefront-produce-bag.png). The supermarket tile and "شحنة" keep their original artwork.
   ========================================================================== */
.sf-home-category-rail li[aria-label^="خضار"] .sf-home-art {
  background-image: url("../img/storefront-produce-bag.png") !important;
  background-size: auto 94% !important; background-position: center 50% !important; background-repeat: no-repeat !important;
}

/* home categories pager: the active mark is Haatly's own rounded "H" (same build as the logo letter)
   instead of a plain pill; it keeps the brand colour through a mask */
.sf-home-category-pages button[aria-current="true"]::before {
  width: 9px; height: 9px; border-radius: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Crect x='0' y='0' width='4' height='10' rx='1.8'/%3E%3Crect x='8' y='0' width='4' height='10' rx='1.8'/%3E%3Crect x='2' y='3.3' width='8' height='3.4'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Crect x='0' y='0' width='4' height='10' rx='1.8'/%3E%3Crect x='8' y='0' width='4' height='10' rx='1.8'/%3E%3Crect x='2' y='3.3' width='8' height='3.4'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* ==========================================================================
   Account hub — simple look (overrides the card design above): a plain white page with one clean list.
   Each row: outline icon · bold title · chevron, separated by hairlines. No welcome line, no gradient card,
   no tinted icon tiles, no subtitles.
   ========================================================================== */
#sf-home-tools-dialog { --hub-bg: #ffffff; --hub-card: #ffffff; --hub-line: #e9edef; }
html.dark-mode #sf-home-tools-dialog { --hub-bg: #1f2027; --hub-card: #1f2027; --hub-line: #32343d; }
#sf-home-tools-dialog .sf-hub-topbar { border-bottom: 0; padding: 12px 10px 8px; }
#sf-home-tools-dialog .sf-hub-topbar h2 { font-size: 17px; font-weight: 700; letter-spacing: 0; }
#sf-home-tools-dialog .sf-home-close { background: none; border-radius: 10px; }
#sf-home-tools-dialog .sf-home-close:hover { background: none; color: var(--hub-ink); }
#sf-home-tools-dialog .sf-hub-body { padding: 14px 0 28px; }
#sf-home-tools-dialog .sf-hub-welcome, #sf-home-tools-dialog .sf-hub-section-label { display: none; }

/* sign-in row: same as every other row */
#sf-home-tools-dialog .sf-hub-profile {
  position: relative; overflow: visible; isolation: auto; display: grid; grid-template-columns: 24px 1fr 18px; gap: 14px; align-items: center;
  min-height: 60px; padding: 0 20px; border-radius: 0; background: none; color: var(--hub-ink); box-shadow: none; transform: none !important;
}
#sf-home-tools-dialog .sf-hub-profile::before { display: none; }
#sf-home-tools-dialog .sf-hub-profile::after {
  content: ''; position: absolute; inset: auto 20px 0 20px; width: auto; height: 1px; border-radius: 0; background: var(--hub-line); z-index: 0;
}
#sf-home-tools-dialog .sf-hub-profile:hover { box-shadow: none; }
#sf-home-tools-dialog .sf-hub-profile:active { background: color-mix(in srgb, var(--hub-ink) 5%, transparent); }
#sf-home-tools-dialog .sf-hub-avatar { width: 24px; height: 24px; border: 0; border-radius: 0; background: none; color: var(--hub-ink); backdrop-filter: none; }
#sf-home-tools-dialog .sf-hub-avatar svg { width: 23px; height: 23px; stroke-width: 1.7; }
#sf-home-tools-dialog .sf-hub-profile .sf-home-tool-copy strong { font-size: 15.5px; font-weight: 700; color: var(--hub-ink); line-height: 1.5; }
#sf-home-tools-dialog .sf-hub-profile .sf-home-tool-copy small { margin-top: 0; font-size: 12px; color: var(--hub-muted); }
#sf-home-tools-dialog .sf-hub-profile:not([data-signed-in]) .sf-home-tool-copy small { display: none; }
#sf-home-tools-dialog .sf-hub-profile-next { width: 18px; height: 18px; border-radius: 0; background: none; box-shadow: none; color: #b6bec2; }
#sf-home-tools-dialog .sf-hub-profile-next svg { width: 17px; height: 17px; stroke-width: 2; }

/* the list: no card, rows with hairlines */
#sf-home-tools-dialog .sf-home-tools-list { background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
#sf-home-tools-dialog .sf-home-tools-list > button { grid-template-columns: 24px 1fr auto; gap: 14px; min-height: 60px; padding: 0 20px; } /* last column fits a chevron or a switch */
#sf-home-tools-dialog .sf-home-tools-list > button + button::before { display: none; }
#sf-home-tools-dialog .sf-home-tools-list > button::after { content: ''; position: absolute; inset: auto 20px 0 20px; height: 1px; background: var(--hub-line); }
#sf-home-tools-dialog .sf-home-tools-list > button:hover { background: none; }
#sf-home-tools-dialog .sf-home-tools-list > button:active { background: color-mix(in srgb, var(--hub-ink) 5%, transparent); }
#sf-home-tools-dialog .sf-home-tool-icon { width: 24px; height: 24px; border-radius: 0; background: none; color: var(--hub-ink); }
#sf-home-tools-dialog .sf-home-tool-icon svg { width: 23px; height: 23px; }
#sf-home-tools-dialog .sf-home-tool-title { font-size: 15.5px; font-weight: 700; }
#sf-home-tools-dialog .sf-home-tools-list small { display: none; }
#sf-home-tools-dialog .sf-home-tool-arrow { border-color: #b6bec2; }

/* footer + sub-pages follow the same plain look */
#sf-home-tools-dialog .sf-hub-brand { margin-top: 22px; font-size: 12px; font-weight: 600; letter-spacing: 1.5px; }
#sf-home-tools-dialog .sf-hub-languages { background: none; border: 0; border-radius: 0; margin: 0; }
#sf-home-tools-dialog .sf-hub-languages a { min-height: 56px; padding: 0 20px; position: relative; border: 0 !important; }
#sf-home-tools-dialog .sf-hub-languages a::after { content: ''; position: absolute; inset: auto 20px 0 20px; height: 1px; background: var(--hub-line); }
#sf-home-tools-dialog [data-hub-panel]:not([data-hub-panel="home"]) { padding-inline: 0; }

/* top bar: the back arrow is enough — the × is hidden (its slot is kept so the title stays centred) */
#sf-home-tools-dialog .sf-hub-topbar .sf-home-close[data-home-tools-close] { visibility: hidden; pointer-events: none; }

/* category page: the scrolling row of categories starts and ends with a margin instead of touching the screen edge */
body.is-storefront-home .main-wrapper.sf-home-enhanced .sf-home-category-page .sf-home-categories ul.category-tab,
body.is-storefront-home .main-wrapper.sf-home-enhanced.sf-home-category-page .sf-home-categories ul.category-tab { padding-inline: 14px !important; scroll-padding-inline: 14px; box-sizing: border-box; }

/* ---------- Account hub rows: lighter and smaller (reference: plain list, small icons, no rules between rows) ---------- */
#sf-home-tools-dialog .sf-hub-body { padding-top: 6px; }
#sf-home-tools-dialog .sf-hub-profile,
#sf-home-tools-dialog .sf-home-tools-list > button { min-height: 50px; gap: 12px; grid-template-columns: 22px 1fr auto; }
#sf-home-tools-dialog .sf-hub-profile::after,
#sf-home-tools-dialog .sf-home-tools-list > button::after { display: none; } /* no hairlines */
#sf-home-tools-dialog .sf-hub-avatar,
#sf-home-tools-dialog .sf-home-tool-icon { width: 22px; height: 22px; }
#sf-home-tools-dialog .sf-hub-avatar svg,
#sf-home-tools-dialog .sf-home-tool-icon svg { width: 20px; height: 20px; stroke-width: 1.6; }
#sf-home-tools-dialog .sf-hub-profile .sf-home-tool-copy strong,
#sf-home-tools-dialog .sf-home-tool-title { font-size: 15px; font-weight: 500; line-height: 1.5; }
#sf-home-tools-dialog .sf-hub-profile-next,
#sf-home-tools-dialog .sf-home-tool-arrow { color: var(--hub-ink); border-color: var(--hub-ink); opacity: .85; }
#sf-home-tools-dialog .sf-hub-profile-next svg { width: 15px; height: 15px; }
#sf-home-tools-dialog .sf-hub-languages a { min-height: 50px; }
#sf-home-tools-dialog .sf-hub-languages a::after { display: none; }
#sf-home-tools-dialog .sf-hub-profile-next { margin-inline-end: -6px; } /* its chevron lines up with the rows below */


/* ===== checkout ===== */
/* ==========================================================================
   Checkout step (inside the cart sidebar) — tidy layout, no outlines on cards or fields.
   Preview layer; scope: #card-summary .checkout-fields
   ========================================================================== */
/* fields take the page's own background colour, so they sit darker than the card around them */
#card-summary .checkout-fields { --ck-fill: #ffffff; --ck-ring: rgba(47, 179, 194, .5); }
html.dark-mode #card-summary .checkout-fields, body.dark-mode #card-summary .checkout-fields { --ck-fill: #26262e; }

/* top row: back arrow · preview note · demo-fill link, on one line (kept clear of the close button) */
/* The cart script shows/hides this block with an inline display value; only lay it out while it is shown. */
#card-summary .checkout-fields { flex-wrap: wrap; align-items: center; column-gap: 10px; row-gap: 0; padding: 10px 0 0; } /* the cards start at the panel's own 10px, exactly like the cart's store card (was 22px) */
#card-summary .checkout-fields:not([style*="display: none"]):not([style*="display:none"]) { display: flex !important; }
#card-summary .checkout-fields > * { flex: 0 0 100%; min-width: 0; }
#card-summary .checkout-fields > .back-to-cart {
  order: -3; flex: 0 0 auto; width: 28px; height: 36px; padding: 0 !important; margin: 0; border: 0; border-radius: 10px;
  display: grid !important; place-items: center; background: transparent !important; box-shadow: none !important;
  -webkit-tap-highlight-color: transparent; transition: opacity .15s, transform .15s;
}
#card-summary .checkout-fields > .back-to-cart:active { opacity: .55; transform: scale(.92); }
#card-summary .checkout-fields > .back-to-cart:focus-visible { outline: 2px solid var(--ck-ring); outline-offset: 2px; }
#card-summary .checkout-fields > .back-to-cart span:empty { display: none; }
#card-summary .checkout-fields > .original-preview-note { order: -2; flex: 1 1 0; padding: 0; margin: 0; background: none; border: 0; text-align: start; font-size: 11.5px; line-height: 1.5; }
#card-summary .checkout-fields > .original-preview-fill { order: -1; flex: 0 0 auto; margin: 0 0 0 52px !important; padding: 4px 0; font-size: 12px; white-space: nowrap; }

/* cards: no outline, even spacing */
#card-summary .checkout-fields .delivery-details-card,
#card-summary .checkout-fields .order-notes-card,
#card-summary .checkout-fields .coupon-card,
#card-summary .checkout-fields .order-summary-card {
  border: 0 !important; box-shadow: none !important; border-radius: 16px; margin: 10px 0 0 !important; padding: 12px 10px !important;
}
#card-summary .checkout-fields .delivery-details-card { margin-top: 12px !important; }

/* fields: filled, no outline; a soft ring only while typing */
#card-summary .checkout-fields .checkout-field-label-row { margin: 0 2px 8px; }
#card-summary .checkout-fields .checkout-field-label { font-size: 13px; gap: 6px; }
#card-summary .checkout-fields .form-group { margin-bottom: 0; }
#card-summary .checkout-fields .form-group + .form-group,
#card-summary .checkout-fields .detail-form > [class*="col-"] + [class*="col-"] { margin-top: 14px; }
#card-summary .checkout-fields .checkout-input-shell,
#card-summary .checkout-fields .order-notes-textarea {
  border: 0 !important; outline: 0 !important; box-shadow: none !important; background: var(--ck-fill) !important; border-radius: 12px;
  transition: box-shadow .15s;
}
#card-summary .checkout-fields .checkout-input-shell { min-height: 48px; }
#card-summary .checkout-fields .checkout-input-shell:focus-within,
#card-summary .checkout-fields .order-notes-textarea:focus { box-shadow: 0 0 0 2px var(--ck-ring) !important; }
#card-summary .checkout-fields .checkout-input-shell input { border: 0 !important; box-shadow: none !important; background: transparent !important; }
#card-summary .checkout-fields .order-notes-textarea { display: block; width: 100%; min-height: 48px; padding: 12px 14px; resize: none; }
#card-summary .checkout-fields .order-notes-card h4,
#card-summary .checkout-fields .order-notes-card .order-notes-title { margin-bottom: 8px; }

/* summary: lighter separators */
#card-summary .checkout-fields .order-divider,
#card-summary .checkout-fields .order-divider-solid { opacity: .6; }

/* stronger selectors: the original sheet sets these with !important */
html body #card-summary .checkout-fields input.form-control.checkout-phone-input,
html body #card-summary .checkout-fields .checkout-input-shell input.form-control {
  background: transparent !important; background-color: transparent !important; border: 0 !important; box-shadow: none !important; outline: 0 !important;
}
html body #card-summary .checkout-fields textarea.order-notes-textarea.special_instruct {
  border: 0 !important; outline: 0 !important; background: var(--ck-fill) !important; background-color: var(--ck-fill) !important;
  width: 100% !important; margin: 0 !important; border-radius: 12px !important; min-height: 48px; padding: 12px 14px !important; resize: none; box-shadow: none !important;
}
html body #card-summary .checkout-fields textarea.order-notes-textarea.special_instruct:focus { box-shadow: 0 0 0 2px var(--ck-ring) !important; }
#card-summary .checkout-fields .order-notes-input-wrapper,
#card-summary .checkout-fields .order-notes-textarea-wrapper { padding: 0 !important; margin: 0 !important; border: 0 !important; background: none !important; }
#card-summary .checkout-fields .order-notes-textarea-wrapper::before,
#card-summary .checkout-fields .order-notes-textarea-wrapper::after,
#card-summary .checkout-fields .order-notes-input-wrapper::before,
#card-summary .checkout-fields .order-notes-input-wrapper::after { content: none !important; }
#card-summary .checkout-fields .order-notes-header { margin-bottom: 8px; }
html body #card-summary .checkout-fields textarea.order-notes-textarea.special_instruct { scrollbar-width: none; overflow-y: auto; line-height: 1.6; }
html body #card-summary .checkout-fields textarea.order-notes-textarea.special_instruct::-webkit-scrollbar { display: none; width: 0; }

/* coupon field and its button: same borderless style as the other fields */
html body #card-summary .checkout-fields input.coupon-input {
  border: 0 !important; outline: 0 !important; box-shadow: none !important; background: var(--ck-fill) !important; background-color: var(--ck-fill) !important;
  border-radius: 12px !important; min-height: 46px; padding: 0 14px !important;
}
html body #card-summary .checkout-fields input.coupon-input:focus { box-shadow: 0 0 0 2px var(--ck-ring) !important; }
html body #card-summary .checkout-fields .coupon-apply-btn { border: 0 !important; border-radius: 12px !important; min-height: 46px; display: flex; align-items: center; justify-content: center; }
#card-summary .checkout-fields .coupon-input-container { display: grid; gap: 8px; }
#card-summary .checkout-fields .coupon-content.show { margin-top: 12px; }

/* card titles: same quiet tone as the field labels (they were full white), one size for all three */
html body #card-summary .checkout-fields .order-notes-title,
html body #card-summary .checkout-fields .coupon-title,
html body #card-summary .checkout-fields .order-summary-title {
  color: #5f6f7a !important; font-size: 14px !important; font-weight: 700 !important; margin: 0;
}
html.dark-mode body #card-summary .checkout-fields .order-notes-title,
html.dark-mode body #card-summary .checkout-fields .coupon-title,
html.dark-mode body #card-summary .checkout-fields .order-summary-title { color: #94a3b8 !important; }
#card-summary .checkout-fields .order-notes-header svg,
#card-summary .checkout-fields .coupon-icon-wrap,
#card-summary .checkout-fields .coupon-chevron { color: #5f6f7a; opacity: .9; }
html.dark-mode #card-summary .checkout-fields .order-notes-header svg,
html.dark-mode #card-summary .checkout-fields .coupon-icon-wrap,
html.dark-mode #card-summary .checkout-fields .coupon-chevron { color: #94a3b8; }
#card-summary .checkout-fields .coupon-icon-wrap svg { width: 16px; height: 16px; }

/* coupon: field and "apply" on one line */
#card-summary .checkout-fields .coupon-input-container { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
#card-summary .checkout-fields .coupon-input-wrapper { min-width: 0; margin: 0 !important; }
html body #card-summary .checkout-fields input.coupon-input { width: 100% !important; margin: 0 !important; }
html body #card-summary .checkout-fields .coupon-apply-btn { width: auto !important; min-width: 84px; margin: 0 !important; padding: 0 18px !important; white-space: nowrap; }

/* card titles start at the same edge as the field labels (the notes title was inset 14px) */
#card-summary .checkout-fields .order-notes-header { padding: 0 !important; }
#card-summary .checkout-fields .order-notes-title { gap: 6px; }
#card-summary .checkout-fields .checkout-field-label-row { margin: 0 0 8px; }

/* coupon card: a little more room around its one-line header */
#card-summary .checkout-fields .coupon-card { padding: 17px 10px !important; }
#card-summary .checkout-fields .coupon-header { min-height: 24px; align-items: center; }

/* summary rows with a zero amount are hidden (see checkout-tidy.js) */
#card-summary .order-summary-item.ck-zero,
#card-summary .ck-empty { display: none !important; }

/* light mode: the page and the cards are both white, so the cards keep their colour and get a thin outline;
   the fields inside take a soft grey fill so they still read as fields */
html:not(.dark-mode) body:not(.dark-mode) #card-summary .checkout-fields { --ck-fill: #f2f5f7; }
html:not(.dark-mode) body:not(.dark-mode) #card-summary .checkout-fields .delivery-details-card,
html:not(.dark-mode) body:not(.dark-mode) #card-summary .checkout-fields .order-notes-card,
html:not(.dark-mode) body:not(.dark-mode) #card-summary .checkout-fields .coupon-card,
html:not(.dark-mode) body:not(.dark-mode) #card-summary .checkout-fields .order-summary-card { border: 1px solid #e2e9ed !important; }

/* cart step: the "add an order from another store" button is not wanted here */
#card-summary .cart-body > .original-continue-shopping { display: none !important; }


/* ===== search ===== */
/* Search screen (preview layer): field with the search icon at its far end, and — while nothing is typed —
   a full panel with recent searches, most-searched words and the top stores. Original search logic is untouched. */

/* field */
.search-overlay .header-search-form { border-radius: 0 !important; }
.search-overlay .search-form { gap: 4px; align-items: center; }
.search-overlay .form-input { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 0 0 4px; border-radius: 10px; background: #f1f2f5; align-items: center; }
.search-overlay .form-input #search { flex: 1 1 auto; min-width: 0; order: 1; padding: 0 14px; font-size: 15px; }
.search-overlay .form-input .search-clear-btn { order: 2; }
.search-overlay .form-input .search-btn {
  order: 3; display: inline-flex !important; flex: 0 0 auto; width: 46px; height: 24px; margin: 0; padding: 0; border-radius: 0;
  background: none !important; box-shadow: none !important; transform: none !important;
  border-inline-start: 1.5px solid #d5d8de !important;
}
.search-overlay .form-input .search-btn svg { width: 19px; height: 19px; stroke: #111827; stroke-width: 2.2; fill: none; }

/* panel */
.search-overlay .sf-search-panel {
  position: absolute; inset-inline: 0; bottom: 0; top: var(--sfp-top, 70px); overflow-y: auto; overscroll-behavior: contain;
  background: #fff; padding: 4px 14px 28px; scrollbar-width: none; text-align: start; color: #111827;
}
.search-overlay .sf-search-panel::-webkit-scrollbar { display: none; }
.search-overlay .sf-search-panel[hidden] { display: none; }
.sf-search-panel section { margin-top: 14px; }
.sf-search-panel section[hidden] { display: none; }
.sf-search-panel .sfp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sf-search-panel h4 { margin: 0; font-size: 15px; font-weight: 700; color: inherit; line-height: 1.5; }
.sf-search-panel .sfp-clear { width: 30px; height: 30px; margin: -4px 0; padding: 0; border: 0; background: none; color: inherit; display: grid; place-items: center; cursor: pointer; }
.sf-search-panel .sfp-clear svg { width: 18px; height: 18px; }
.sf-search-panel .sfp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-search-panel .sfp-chip {
  border: 0; padding: 7px 14px; border-radius: 10px; background: #f1f2f5; color: #1f2937; font: inherit; font-size: 13px; font-weight: 500;
  line-height: 1.5; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: transform .12s;
}
.sf-search-panel .sfp-chip:active { transform: scale(.95); }
.sf-search-panel .sfp-stores {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 62px; gap: 10px 8px;
  overflow-x: auto; scrollbar-width: none; margin-inline: -14px; padding-inline: 14px; padding-bottom: 2px;
}
.sf-search-panel .sfp-stores::-webkit-scrollbar { display: none; }
.sf-search-panel .sfp-store { border: 0; padding: 0; background: none; cursor: pointer; display: block; }
.sf-search-panel .sfp-store img { display: block; width: 62px; height: 62px; border-radius: 16px; object-fit: cover; background: #f1f2f5; transition: transform .12s; }
.sf-search-panel .sfp-store:active img { transform: scale(.94); }

/* clear button: a crisp soft-grey disc with a thin centred cross (drawn, so it sits exactly in the middle);
   the tap area is larger than the mark */
.search-overlay .form-input .search-clear-btn {
  flex: 0 0 auto; width: 34px; height: 34px; margin: 0 0 0 2px; padding: 0; border-radius: 50%; color: transparent; font-size: 0; line-height: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%23c2c6cd'/%3E%3Cpath d='M6.900 6.900l6.200 6.200M13.100 6.900l-6.200 6.200' stroke='%23fff' stroke-width='1.700' stroke-linecap='round'/%3E%3C/svg%3E") center / 17px 17px no-repeat; align-items: center; justify-content: center; opacity: 1; transition: transform .12s, opacity .12s;
}
.search-overlay .form-input .search-clear-btn:active { transform: scale(.88); opacity: .7; }
.search-overlay .form-input .search-clear-btn:not([style*="display: none"]):not([style*="display:none"]) { display: inline-flex !important; }

/* suggestions while typing */
.search-overlay .sf-search-suggest {
  position: absolute; inset-inline: 0; bottom: 0; top: var(--sfp-top, 70px); overflow-y: auto; overscroll-behavior: contain;
  background: #fff; color: #111827; scrollbar-width: none; text-align: start; padding-bottom: 24px;
}
.search-overlay .sf-search-suggest::-webkit-scrollbar { display: none; }
.search-overlay .sf-search-suggest[hidden] { display: none; }
.sf-search-suggest .sfs-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 9px 16px; border: 0; border-bottom: 1px solid #eceef1;
  background: none; color: #374151; font: inherit; font-size: 14px; text-align: start; cursor: pointer;
}
.sf-search-suggest .sfs-row:active { background: #f6f7f9; }
.sf-search-suggest .sfs-glass { flex: 0 0 36px; width: 36px; height: 17px; color: #9ca3af; }
.sf-search-suggest .sfs-row img { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: #f1f2f5; box-shadow: 0 0 0 1px #eceef1; }
.sf-search-suggest .sfs-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-search-suggest .sfs-store { min-height: 64px; }
.sf-search-suggest .sfs-store .sfs-text { display: flex; flex-direction: column; gap: 3px; white-space: normal; }
.sf-search-suggest .sfs-store b { font-size: 14px; font-weight: 500; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-search-suggest .sfs-store small { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 11.5px; color: #6b7280; line-height: 1.5; }
.sf-search-suggest .sfs-store small i { font-style: normal; color: #c3c7ce; }
.sf-search-suggest .sfs-fee { display: inline-flex; align-items: center; gap: 4px; color: #17a2b3; font-weight: 600; }
.sf-search-suggest .sfs-fee svg { width: 14px; height: 14px; }

/* product results, grouped by store */
.search-overlay .sf-search-results {
  position: absolute; inset-inline: 0; bottom: 0; top: var(--sfp-top, 70px); overflow-y: auto; overscroll-behavior: contain;
  background: #fff; color: #111827; scrollbar-width: none; text-align: start; padding: 0 0 110px;
}
.search-overlay .sf-search-results::-webkit-scrollbar { display: none; }
.search-overlay .sf-search-results[hidden] { display: none; }
.sf-search-results .sfr-group { padding: 14px 0 14px; border-bottom: 1px solid #eceef1; }
.sf-search-results .sfr-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0 14px; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.sf-search-results .sfr-head img { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: #f1f2f5; box-shadow: 0 0 0 1px #eceef1; }
.sf-search-results .sfr-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sf-search-results .sfr-info b { font-size: 15px; font-weight: 700; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-search-results .sfr-info small { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: #6b7280; line-height: 1.6; white-space: nowrap; overflow: hidden; }
.sf-search-results .sfr-info small > span { overflow: hidden; text-overflow: ellipsis; }
.sf-search-results .sfr-info small i { font-style: normal; color: #c3c7ce; }
.sf-search-results .sfr-rate { color: #b7791f; font-weight: 600; flex: 0 0 auto; }
.sf-search-results .sfr-rail { display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; padding: 12px 14px 0; scroll-snap-type: x proximity; }
.sf-search-results .sfr-rail::-webkit-scrollbar { display: none; }
.sf-search-results .sfr-item { flex: 0 0 98px; width: 98px; display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; scroll-snap-align: start; }
.sf-search-results .sfr-pic { display: block; width: 98px; height: 98px; border-radius: 12px; overflow: hidden; background: #f6f7f9; margin-bottom: 5px; }
.sf-search-results .sfr-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sf-search-results .sfr-pic.is-logo img { width: 52%; height: 52%; margin: 24%; border-radius: 10px; opacity: .55; }
.sf-search-results .sfr-item strong { font-size: 14px; font-weight: 700; color: #111827; line-height: 1.4; }
.sf-search-results .sfr-item s { font-size: 11px; color: #9ca3af; line-height: 1.3; }
.sf-search-results .sfr-name { font-size: 12px; color: #374151; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sf-search-results .sfr-more { display: block; width: 100%; margin-top: 10px; padding: 4px 14px; border: 0; background: none; color: #6b7280; font: inherit; font-size: 12px; text-align: center; cursor: pointer; }

/* dark mode */
html.dark-mode .search-overlay .sf-search-results { background: var(--dm-bg, #26262e); color: #f4f4f5; }
html.dark-mode .sf-search-results .sfr-group { border-bottom-color: #383a44; }
html.dark-mode .sf-search-results .sfr-info b, html.dark-mode .sf-search-results .sfr-item strong { color: #f4f4f5; }
html.dark-mode .sf-search-results .sfr-info small, html.dark-mode .sf-search-results .sfr-more { color: #a3a8b3; }
html.dark-mode .sf-search-results .sfr-name { color: #d7dae1; }
html.dark-mode .sf-search-results .sfr-pic, html.dark-mode .sf-search-results .sfr-head img { background: #32333c; box-shadow: none; }
html.dark-mode .search-overlay .sf-search-suggest { background: var(--dm-bg, #26262e); color: #f4f4f5; }
html.dark-mode .sf-search-suggest .sfs-row { border-bottom-color: #383a44; color: #d7dae1; }
html.dark-mode .sf-search-suggest .sfs-row:active { background: #2e2f38; }
html.dark-mode .sf-search-suggest .sfs-store b { color: #f4f4f5; }
html.dark-mode .sf-search-suggest .sfs-store small { color: #a3a8b3; }
html.dark-mode .sf-search-suggest .sfs-row img { background: #32333c; box-shadow: 0 0 0 1px #383a44; }
html.dark-mode .search-overlay .form-input .search-clear-btn { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%235d616d'/%3E%3Cpath d='M6.900 6.900l6.200 6.200M13.100 6.900l-6.200 6.200' stroke='%23fff' stroke-width='1.700' stroke-linecap='round'/%3E%3C/svg%3E"); }
html.dark-mode .search-overlay .form-input { background: #32333c; }
html.dark-mode .search-overlay .form-input .search-btn { border-inline-start-color: #4a4c57 !important; }
html.dark-mode .search-overlay .form-input .search-btn svg { stroke: #f4f4f5; }
html.dark-mode .search-overlay .sf-search-panel { background: var(--dm-bg, #26262e); color: #f4f4f5; }
html.dark-mode .sf-search-panel .sfp-chip { background: #32333c; color: #e7e9ee; }
html.dark-mode .sf-search-panel .sfp-store img { background: #32333c; }


/* ===== home: shared-delivery banner ===== */
/* Home: shared-delivery banner (live). Takes the place of the home hero once the store's schedule board has loaded;
   the hero comes back by itself if shared delivery is not offered. Layout tweaks for the plain offer live with the
   other home details (account hub / home section). */
.sf-home .sf-home-feature.ht-share-has-activity > .sf-home-hero { display: none !important; }
/* the offer now sits in the banner, so its copy in the ads row is not repeated (it stays in the page: it opens the shared-trip window) */
html.ht-share-banner-on .sf-home .banner-shared-trip-btn { display: none !important; }
.sf-home .ht-share-home{position:relative;padding:7px 14px 5px;border-radius:18px;background:linear-gradient(115deg,#137d89,#219eac 65%,#2cb3c5);color:#fff;overflow:hidden}
.ht-share-home *{box-sizing:border-box;font-family:'Noto Sans Arabic',Tahoma,sans-serif!important}
.ht-share-home button{font-family:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.ht-share-home .ht-share-meta,.ht-share-home .ht-share-lead,.ht-share-home .ht-share-upcoming-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.ht-share-home .ht-share-meta{margin-bottom:4px;font-size:10px}
.ht-share-brand{display:inline-flex;align-items:center;gap:5px;color:#e0f7f9}
.ht-share-icon{display:inline-flex;flex:none;width:17px;height:17px;color:inherit}
.ht-share-icon svg{display:block;width:100%;height:100%}
.ht-share-home .ht-share-discount{padding:2px 7px;border-radius:6px;background:#ffffff1f;color:#fff;font-size:10px;font-weight:700;white-space:nowrap}
.ht-share-home .ht-share-copy{min-width:0}
.ht-share-home .ht-share-copy h2{margin:0;color:#fff;font-size:18px;font-weight:800;line-height:1.6}
.ht-share-home .ht-share-copy p{margin:2px 0 0;color:#e0f7f9;font-size:10px;line-height:1.8}
.ht-share-home .ht-share-primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:none;min-height:40px;padding:8px 10px;border:0;border-radius:10px;background:#fff;color:#126672;font-size:11px;font-weight:800;white-space:nowrap}
.ht-share-home .ht-share-primary:disabled{opacity:.65}
.ht-share-home .ht-share-upcoming{margin-top:4px;padding-top:2px;border-top:1px solid #ffffff30}
.ht-share-home .ht-share-upcoming-heading{margin-bottom:2px}
.ht-share-home .ht-share-upcoming-heading>strong{font-size:10px;font-weight:600;color:#e0f7f9}
.ht-share-home .ht-share-all{display:inline-flex;align-items:center;gap:4px;min-height:22px;border:0;padding:0 2px;background:none;color:#fff;font-size:10px}
.ht-share-all .ht-share-icon{width:13px;height:13px}
.ht-share-home .ht-share-times{display:grid;grid-template-columns:repeat(var(--ht-share-time-columns,3),minmax(0,1fr));gap:7px}
.ht-share-home .ht-share-time{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-width:0;min-height:50px;padding:2px 3px;border:1px solid #ffffff26;border-radius:10px;background:#ffffff14;color:#fff}
.ht-share-home .ht-share-day{font-size:9px;color:#dcf4f6;line-height:1.5}
.ht-share-home .ht-share-clock{display:flex;align-items:baseline;justify-content:center;gap:4px;white-space:nowrap;line-height:1.4}
.ht-share-home .ht-share-clock bdi{color:#fff;font-size:16px;font-weight:800;font-variant-numeric:tabular-nums}
.ht-share-home .ht-share-clock small{color:#e4f7f9;font-size:9px}
.ht-share-home .ht-share-count{display:inline-flex;align-items:center;justify-content:center;gap:4px;color:#fff;font-size:9px;line-height:1.6}
.ht-share-count .ht-share-icon{width:12px;height:12px}
.ht-share-home button:focus-visible{outline:2px solid #fff;outline-offset:3px}
.ht-share-home button:active{transform:translateY(1px)}
.ht-share-home .ht-share-normal{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:74px}
.ht-share-home .ht-share-normal .ht-share-copy h2{font-size:19px;line-height:1.35}
.ht-share-home .ht-share-normal .ht-share-copy p{font-size:11px;line-height:1.6}
.ht-share-home .ht-share-normal .ht-share-primary{margin-top:2px;min-height:28px;padding:3px 11px}
.ht-share-home .ht-share-normal-saving{display:flex;flex:0 0 40%;flex-direction:column;align-items:center;gap:2px}
.ht-share-home .ht-share-normal-percent{display:flex;align-items:baseline;gap:2px;color:#fff;line-height:1}
.ht-share-home .ht-share-normal-percent b{font-family:Arial,sans-serif!important;font-size:46px;font-weight:800;line-height:1}
.ht-share-home .ht-share-normal-percent>span{font-family:Arial,sans-serif!important;font-size:22px;font-weight:700}
.ht-share-home .ht-share-normal-saving small{font-size:10px;color:#e2f7f9;white-space:nowrap}
@media(max-width:350px){.sf-home .ht-share-home{padding-inline:11px}.ht-share-home .ht-share-copy h2{font-size:15px}.ht-share-home .ht-share-primary{font-size:10px;padding-inline:8px;gap:5px}.ht-share-home .ht-share-count{font-size:8px;gap:2px}.ht-share-home .ht-share-clock bdi{font-size:15px}}
@media(hover:hover){.ht-share-home .ht-share-time:hover{background:#ffffff26}.ht-share-home .ht-share-all:hover{text-decoration:underline}}
/* neighbours' order times: compact heading so the title stays on one line beside the button */
.sf-home .ht-share-home[data-state="upcoming"] .ht-share-copy h2 { font-size: 17px !important; line-height: 1.5 !important; white-space: nowrap; }
.sf-home .ht-share-home[data-state="upcoming"] .ht-share-copy p { font-size: 11px !important; margin-top: 0 !important; }
.sf-home .ht-share-home[data-state="upcoming"] .ht-share-primary { margin-top: 0 !important; }
.sf-home .ht-share-home[data-state="upcoming"] { padding: 10px 14px 10px; }

/* ===== supermarket catalogue ===== */
/* Grocery catalogue for supermarket merchants (live). Built from grocery-preview/catalog.css + cards-compact.css. */
.hg-app{--hg-brand:#2cb3c5;--hg-deep:#137f8d;--hg-ink:#20383d;--hg-muted:#78888d;--hg-bg:#fff;--hg-surface:#f6f8f8;--hg-soft:#eaf8fa;--hg-line:#e9eff0;position:fixed;inset:0;z-index:2147000;background:var(--hg-bg);color:var(--hg-ink);font:14px/1.65 'Noto Sans Arabic',Tahoma,sans-serif;text-align:right;isolation:isolate;animation:hg-enter .24s ease-out}
.hg-app[hidden],.hg-app [hidden]{display:none!important}.hg-app *{box-sizing:border-box}.hg-app button,.hg-app input,.hg-app textarea{font:inherit}.hg-app button{border:0;background:none;color:inherit;padding:0;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.hg-app button:disabled{cursor:default;opacity:.45}.hg-app button:focus-visible,.hg-app input:focus-visible,.hg-app textarea:focus-visible{outline:2px solid var(--hg-brand);outline-offset:2px}.hg-app h1,.hg-app h2,.hg-app h3,.hg-app p{margin:0;color:inherit;font-family:inherit}.hg-app svg{flex:none;vertical-align:middle}.hg-scroll{height:100%;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scroll-padding-top:140px}.hg-header{position:sticky;top:0;z-index:5;background:var(--hg-bg);padding:6px 12px 9px;box-shadow:0 1px 0 var(--hg-line)}.hg-topline{display:flex;gap:8px;align-items:center;min-height:47px}.hg-icon{width:36px;height:38px;display:inline-grid;place-items:center;flex:none;border-radius:50%}.hg-page-title-wrap{flex:1;min-width:0}.hg-page-title{font-size:15px;font-weight:750;line-height:1.65}.hg-page-subtitle{font-size:9px!important;color:var(--hg-muted)!important;line-height:1.5}.hg-bag-mini{position:relative;color:var(--hg-deep)!important}.hg-bag-mini>b{position:absolute;left:0;top:0;min-width:15px;height:15px;padding:0 3px;display:grid;place-items:center;background:var(--hg-brand);border-radius:50%;color:#fff;font:700 9px Arial;border:2px solid var(--hg-bg)}.hg-search-launch,.hg-search{display:flex!important;align-items:center;gap:8px;background:var(--hg-surface)!important;color:var(--hg-muted)!important;border-radius:10px;width:100%;height:37px;text-align:start;padding:0 11px!important;border:0!important}.hg-search-launch{margin-top:5px;font-size:11px!important}.hg-search-form{flex:1;min-width:0;margin:0}.hg-search{margin:0;height:39px}.hg-app .hg-search-input{font-size:12px!important;width:100%;min-width:0;background:transparent!important;color:var(--hg-ink)!important;border:0!important;box-shadow:none!important;outline:0!important;border-radius:0!important;padding:0!important;height:39px!important}.hg-search-input::placeholder{color:var(--hg-muted)!important}.hg-search-input::-webkit-search-cancel-button{display:none}.hg-search button{width:25px;height:32px;display:grid;place-items:center;flex:none}.hg-tabs{display:flex;gap:20px;overflow:auto;scrollbar-width:none;white-space:nowrap;margin:7px -12px -9px;padding:0 12px}.hg-tabs::-webkit-scrollbar{display:none}.hg-tabs button{position:relative;flex:none;font-size:11px;min-height:41px;color:var(--hg-muted);padding:8px 0}.hg-tabs button.active{color:var(--hg-deep);font-weight:700}.hg-tabs button.active:after{content:'';position:absolute;bottom:0;inset-inline:0;height:3px;border-radius:3px;background:var(--hg-brand)}.hg-main{max-width:1100px;margin:auto;padding:0 12px 95px}.hg-category-tiles{display:flex;gap:15px;margin:15px -12px 0;padding:0 12px 12px;overflow:auto;scrollbar-width:none}.hg-category-tiles>button{flex:0 0 70px;width:70px;text-align:center}.hg-category-tiles .hg-photo{width:61px;height:61px;border-radius:13px;margin:0 auto 6px}.hg-category-tiles span:last-child{display:block;font-size:10px;line-height:1.6;min-height:32px}.hg-quick-links{display:flex;gap:8px;margin:13px 0 0}.hg-quick-links>button{display:flex;gap:8px;align-items:center;background:var(--hg-soft);color:var(--hg-deep);border-radius:12px;padding:9px 10px;text-align:start}.hg-quick-links>button:first-child{flex:1}.hg-quick-links>button:first-child>svg:last-child{margin-inline-start:auto}.hg-quick-links>button:last-child{padding-inline:12px;font-size:11px}.hg-quick-links b{display:block;font-size:11px}.hg-quick-links small{display:block;font-size:8px;color:var(--hg-muted)}.hg-shelf{margin-bottom:27px}.hg-shelf-title,.hg-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.hg-shelf-title h2,.hg-section-heading h2{font-size:15px;font-weight:750}.hg-shelf-title>button{font-size:10px;color:var(--hg-deep);display:flex;gap:5px;align-items:center;white-space:nowrap}.hg-rail{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 27px)/3.15);gap:10px;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity;margin-inline:-12px;padding-inline:12px;padding-bottom:3px}.hg-rail::-webkit-scrollbar{display:none}.hg-card{min-width:0;display:flex;flex-direction:column;scroll-snap-align:start}.hg-card-art{position:relative;background:#fff;border-radius:12px;margin-bottom:6px}.hg-product-open{width:100%;display:block!important;border-radius:inherit;overflow:hidden}.hg-photo{display:block;aspect-ratio:1;width:100%;background:#fff;overflow:hidden;border-radius:inherit}.hg-photo img{width:100%;height:100%;object-fit:contain;display:block;padding:7%}.hg-atlas{background-image:none;background-size:400% 400%;background-position:var(--x) var(--y);background-repeat:no-repeat}.hg-card-quantity{position:absolute;bottom:4px;left:4px;max-width:calc(100% - 8px)}.hg-add{width:31px;height:31px;background:var(--hg-bg)!important;border:1px solid var(--hg-line)!important;color:var(--hg-deep)!important;border-radius:9px;display:grid;place-items:center;box-shadow:0 2px 5px #15313908}.hg-stepper{height:31px;display:flex;direction:ltr;align-items:center;justify-content:space-between;gap:2px;min-width:83px;background:var(--hg-deep);color:#fff;border-radius:9px;box-shadow:0 2px 6px #183b3e14}.hg-stepper button{width:29px;height:31px;display:grid;place-items:center}.hg-stepper b{font:700 12px Arial;min-width:15px;text-align:center}.hg-card-name{font-size:11px!important;font-weight:500!important;line-height:1.65!important;text-align:right;min-height:37px;display:block!important;width:100%;overflow-wrap:anywhere}.hg-unit{font-size:9px!important;color:var(--hg-muted)!important;margin:2px 0!important;line-height:1.6}.hg-price{display:block;font:700 13px/1.6 Arial,'Noto Sans Arabic',sans-serif;white-space:nowrap;margin-top:auto}.hg-price small{font:8px 'Noto Sans Arabic',sans-serif;font-weight:500}.hg-stock-label{position:absolute;inset-inline:4px;top:4px;text-align:center;font-size:9px;border-radius:6px;background:#fff5e5;color:#936d36;padding:3px}.hg-soldout .hg-photo{opacity:.5}.hg-soldout .hg-card-quantity{display:none}.hg-products,.hg-list-products{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px 10px}.hg-tools{display:flex;gap:7px;padding:13px 0}.hg-tools button{display:flex;gap:4px;align-items:center;font-size:10px;padding:5px 9px;border:1px solid var(--hg-line);border-radius:8px;min-height:29px}.hg-tools button[aria-pressed=true]{color:var(--hg-deep);background:var(--hg-soft);border-color:transparent}.hg-section-heading h2{font-size:13px;line-height:1.7}.hg-result-count{font-size:9px;color:var(--hg-muted);white-space:nowrap}.hg-all-products{display:flex!important;align-items:center;justify-content:center;gap:10px;font-size:12px!important;color:var(--hg-deep)!important;background:var(--hg-soft)!important;width:100%;padding:12px!important;border-radius:12px}.hg-preview-disclaimer{text-align:center;font-size:9px!important;color:var(--hg-muted)!important;margin-top:25px!important}.hg-bag-bar{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));inset-inline:12px;max-width:1076px;margin:auto;display:flex!important;align-items:center;gap:10px;min-height:52px;padding:9px 12px!important;border-radius:13px;background:var(--hg-deep)!important;color:#fff!important;box-shadow:0 6px 24px #153d4520;z-index:8}.hg-bag-count{display:grid;place-items:center;min-width:29px;height:29px;background:#ffffff22;border-radius:9px;font:700 12px Arial}.hg-bag-bar>b{flex:1;text-align:start;font-size:12px}.hg-bag-bar>strong{font:700 16px Arial;white-space:nowrap}.hg-bag-bar small{font:9px 'Noto Sans Arabic',sans-serif}.hg-search-suggestions{padding:13px 0 0}.hg-search-all,.hg-suggestion{display:flex!important;align-items:center;gap:12px;width:100%;padding:14px 2px!important;border-bottom:1px solid var(--hg-line)!important;text-align:start;font-size:12px!important}.hg-search-all{color:var(--hg-deep)!important}.hg-search-all span,.hg-suggestion span{flex:1}.hg-search-all small{display:block;font-size:9px;color:var(--hg-muted);margin-top:2px}.hg-suggestion>svg{color:var(--hg-muted)}.hg-search-heading{display:flex;align-items:center;justify-content:space-between;margin:7px 0 12px}.hg-search-heading h2,.hg-search-subtitle{font-size:13px!important;font-weight:700;margin:18px 0 12px!important}.hg-search-heading button{font-size:10px;color:var(--hg-muted)}.hg-search-chips{display:flex;flex-wrap:wrap;gap:8px}.hg-search-chips>button{padding:7px 12px;background:var(--hg-surface);border:1px solid var(--hg-line);font-size:11px;border-radius:9px}.hg-search-departments{display:grid;grid-template-columns:1fr 1fr;gap:8px}.hg-search-departments>button{display:flex;justify-content:space-between;align-items:center;gap:7px;background:var(--hg-soft);color:var(--hg-deep);font-size:10px;border-radius:10px;padding:12px}.hg-empty{grid-column:1/-1;text-align:center;padding:40px 12px;color:var(--hg-muted)}.hg-empty h3{font-size:16px;margin:12px 0 6px}.hg-empty p{font-size:12px;margin-bottom:15px}.hg-empty button{padding:9px 14px;border-radius:9px;background:var(--hg-soft);color:var(--hg-deep);font-size:11px}.hg-sheet-wrap{position:absolute;inset:0;z-index:15;display:flex;align-items:flex-end;justify-content:center}.hg-sheet-scrim{position:absolute;inset:0;background:#112c3b60!important;backdrop-filter:blur(3px)}.hg-sheet{position:relative;display:flex;flex-direction:column;width:100%;max-width:570px;height:92%;max-height:820px;background:var(--hg-bg);border-radius:23px 23px 0 0;animation:hg-up .25s ease-out;overflow:hidden}.hg-sheet>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;flex:none}.hg-sheet-body{overflow:auto;overscroll-behavior:contain;flex:1}.hg-sheet-body>.hg-photo{width:min(100%,280px);margin:0 auto 12px;border-radius:16px}.hg-detail-info{padding:8px 18px 25px}.hg-detail-category{font-size:10px;color:var(--hg-deep)}.hg-detail-info h2{font-size:18px;line-height:1.7;margin:6px 0}.hg-detail-info p{font-size:12px;color:var(--hg-muted)}.hg-save-product{display:flex!important;align-items:center;gap:7px;font-size:12px!important;margin:22px 0;padding:8px 0!important;color:var(--hg-deep)!important}.hg-save-product.is-saved svg{fill:var(--hg-soft)}.hg-detail-policy{font-size:10px!important;line-height:1.9;padding-top:12px;border-top:1px solid var(--hg-line)}.hg-detail-dock{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px max(18px,env(safe-area-inset-bottom));box-shadow:0 -2px 16px #122d3509;border-top:1px solid var(--hg-line);flex:none}.hg-detail-dock>strong{font:700 22px Arial}.hg-detail-dock small{font:12px 'Noto Sans Arabic',sans-serif}.hg-detail-dock .hg-add{width:70px;height:40px;background:var(--hg-deep)!important;color:#fff!important}.hg-detail-dock .hg-stepper{min-width:120px;height:40px}.hg-detail-dock .hg-stepper button{width:39px;height:40px}/* Keep the list composer readable and aligned in both themes. */
.hg-list-panel{background:var(--hg-surface);padding:18px;border-radius:18px;max-width:620px;margin:16px auto 24px}
.hg-list-intro{display:flex;align-items:center;gap:11px;margin-bottom:20px}
.hg-list-symbol{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:12px;background:var(--hg-soft);color:var(--hg-deep)}
.hg-list-intro>div{min-width:0}
.hg-list-panel h2{font-size:17px;line-height:1.7;font-weight:750}
.hg-list-intro p{font-size:11px;color:var(--hg-muted);line-height:1.8;margin-top:3px}
.hg-list-label{display:block;font-size:12px;font-weight:650;margin:0 0 8px;color:var(--hg-ink)}
.hg-app .hg-list-input{display:block;width:100%;height:152px;min-height:152px;background:var(--hg-bg)!important;color:var(--hg-ink)!important;border:1px solid var(--hg-line)!important;border-radius:12px;padding:12px 14px;margin:0;font-size:16px!important;line-height:1.9;text-align:start;resize:none;box-shadow:none!important;transition:border-color .18s ease}
.hg-app .hg-list-input::placeholder{color:var(--hg-muted);opacity:.8;font-size:14px}
.hg-app .hg-list-input:focus{border-color:var(--hg-brand)!important;outline:2px solid var(--hg-soft);outline-offset:2px}
.hg-app .hg-list-hint{font-size:10px;color:var(--hg-muted);line-height:1.8;margin-top:8px}
.hg-list-actions{display:flex;gap:10px;align-items:stretch;margin-top:16px}
.hg-list-actions>button{display:flex;justify-content:center;align-items:center;gap:9px;min-height:44px;font-size:12px;font-weight:650;padding:9px 14px;border-radius:11px;color:var(--hg-deep)}
.hg-list-actions>button:first-child{flex:1;background:var(--hg-deep);color:#fff}
.hg-list-actions>button:last-child{flex:0 0 auto;background:var(--hg-bg);border:1px solid var(--hg-line)}
.hg-list-summary{margin-top:18px;padding-top:14px;border-top:1px solid var(--hg-line)}
.hg-app .hg-list-progress{font-size:11px;color:var(--hg-deep);line-height:1.8}
.hg-list-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.hg-list-chips>span{border:1px solid var(--hg-line);padding:4px 8px;border-radius:7px;font-size:10px;background:var(--hg-bg)}.hg-list-chips>span.done{background:var(--hg-deep);color:#fff}.hg-list-group{grid-column:1/-1}.hg-list-group>h3{font-size:14px;margin-bottom:12px}.hg-missing{font-size:11px!important;color:var(--hg-muted)!important}.hg-toast{position:absolute;bottom:80px;left:50%;transform:translateX(-50%);width:max-content;max-width:90%;font-size:11px;padding:10px 14px;border-radius:10px;background:var(--hg-ink);color:var(--hg-bg);z-index:20}.hg-live{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.hg-store-badge{font-size:10px;color:#137f8d}.hg-open #cart-bottom-bar{display:none!important}
@keyframes hg-enter{from{transform:translateX(-20px);opacity:.3}to{transform:translateX(0);opacity:1}}@keyframes hg-up{from{transform:translateY(30px);opacity:.5}to{transform:translateY(0);opacity:1}}
html.dark-mode .hg-app,body.dark-mode .hg-app{--hg-ink:#edf3f4;--hg-muted:#a8b8bc;--hg-bg:#25262d;--hg-surface:#303139;--hg-soft:#203e45;--hg-line:#3a3c44;--hg-deep:#52c5d1}html.dark-mode .hg-stepper,html.dark-mode .hg-bag-bar,html.dark-mode .hg-list-actions>button:first-child,html.dark-mode .hg-list-chips>span.done{background:#198494!important;color:#fff!important}
@media(min-width:650px){.hg-header{padding-inline:max(18px,calc((100% - 1076px)/2))}.hg-main{padding-inline:18px}.hg-rail{grid-auto-columns:calc((100% - 70px)/6.25);gap:14px}.hg-products,.hg-list-products{grid-template-columns:repeat(6,minmax(0,1fr));gap:26px 15px}.hg-card-name{font-size:13px!important;min-height:43px}.hg-unit{font-size:10px!important}.hg-price{font-size:15px}.hg-page-title{font-size:18px}.hg-category-tiles{gap:24px}.hg-category-tiles>button{flex-basis:88px;width:88px}.hg-category-tiles .hg-photo{width:72px;height:72px}.hg-category-tiles span:last-child{font-size:12px}.hg-sheet{align-self:center;border-radius:23px;height:85%}.hg-quick-links{max-width:650px}.hg-shelf-title h2{font-size:18px}}
@media(max-width:350px){.hg-main{padding-inline:9px}.hg-rail{margin-inline:-9px;padding-inline:9px;grid-auto-columns:calc((100% - 18px)/3.1);gap:8px}.hg-products,.hg-list-products{gap:20px 8px}.hg-card-name{font-size:10px!important}.hg-stepper{min-width:76px}.hg-stepper button{width:25px}.hg-price{font-size:12px}.hg-page-title{font-size:14px}.hg-quick-links small{font-size:7px}.hg-category-tiles{gap:12px}}
@media(prefers-reduced-motion:reduce){.hg-app,.hg-sheet{animation:none}}


/* Reuse the supermarket category bag, framing its transparent canvas without changing the artwork. */
.hg-haatly-bag{display:inline-block;width:25px;height:24px;flex:none;background:url("../img/storefront-market-bag.png") no-repeat 50% 76%;background-size:131% auto}.hg-app .hg-bag-mini{width:38px;height:42px}
/* release 88: the cart buttons carry the cart dock's bag mark (drawn by storefront-polish.js), same size, colour and soft shadow */
.hg-app .hg-haatly-mark{display:block;width:25px;height:25px;flex:none;overflow:visible;color:var(--theme-color,var(--hg-brand));filter:drop-shadow(0 2px 2px rgba(var(--theme-color-rgb,44,179,197),.2))}
.hg-bag-mini>b{z-index:1;top:1px;left:0}

/* Compact store identity and tappable information cards. */
.hg-store-photo{width:44px;height:44px;flex:none;object-fit:cover;border-radius:12px;border:1px solid var(--hg-line);background:var(--hg-surface)}
.hg-store-meta{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;margin-top:3px;font-size:10px;line-height:1.6;color:var(--hg-muted)}
.hg-store-rating,.hg-store-delivery{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.hg-store-rating{font-weight:700;color:var(--hg-ink)}
.hg-store-rating svg{color:#efb840}
.hg-delivery-scooter{flex:none;color:#00c5b4}
html.dark-mode .hg-delivery-scooter,body.dark-mode .hg-delivery-scooter{color:#2bb3c0}
.hg-store-delivery{padding-inline-start:10px;border-inline-start:1px solid var(--hg-line)}
.hg-info-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:13px 0 0}
.hg-info-cards>button{display:flex;align-items:center;gap:7px;min-width:0;padding:7px 10px;border:0;border-radius:11px;text-align:start;min-height:52px;background:#eff4f5}
.hg-info-card-icon{display:grid;place-items:center;flex:none;width:30px;height:30px;color:var(--hg-deep);background:var(--hg-soft);border-radius:9px}
.hg-info-card-icon svg{width:20px;height:20px}
html.dark-mode .hg-info-cards>button,body.dark-mode .hg-info-cards>button{background:#202127}
.hg-info-cards b{display:block;font-size:11px;font-weight:700;line-height:1.7}
.hg-info-cards small{display:block;font-size:9px;line-height:1.7;color:var(--hg-muted)}
.hg-info-cards>button>svg:last-child{margin-inline-start:auto;color:var(--hg-muted)}
.hg-info-cards>button:active{background:var(--hg-surface)}
.hg-sheet[data-kind=info]{height:auto;max-height:85%;max-height:85dvh;align-self:flex-end;border-radius:26px 26px 0 0;animation:hg-info-up .32s cubic-bezier(.2,.75,.25,1)}
.hg-sheet[data-kind=info]>header{justify-content:flex-start;padding:16px 16px 0;position:relative;min-height:52px}
.hg-sheet[data-kind=info]>header:after{content:'';position:absolute;top:8px;left:calc(50% - 17px);width:34px;height:4px;border-radius:4px;background:var(--hg-line)}
.hg-sheet[data-kind=info] .hg-sheet-close{width:36px;height:36px;background:var(--hg-surface);border:1px solid var(--hg-line)}
.hg-sheet[data-kind=info]>header>[data-action=bag]{display:none}
.hg-sheet[data-kind=info] .hg-sheet-body{flex:0 1 auto;min-height:0;scrollbar-width:none}
.hg-sheet[data-kind=info] .hg-sheet-body::-webkit-scrollbar{display:none}
.hg-info-content{padding:0 22px max(28px,env(safe-area-inset-bottom));text-align:center}
.hg-info-hero{position:relative;display:grid;place-items:center;width:106px;height:100px;margin:0 auto 13px;border-radius:32px;background:var(--hg-soft);color:var(--hg-deep)}
.hg-price-hero>span{position:absolute;bottom:16px;right:17px;width:24px;height:24px;display:grid;place-items:center;background:var(--hg-deep);border:3px solid var(--hg-soft);color:var(--hg-bg);border-radius:50%}
.hg-choice-hero .hg-haatly-bag{width:80px;height:76px;transform:rotate(-6deg)}
.hg-choice-check{position:absolute;bottom:11px;left:8px;display:grid;place-items:center;width:30px;height:30px;background:var(--hg-deep);color:var(--hg-bg);border:3px solid var(--hg-soft);border-radius:50%}
.hg-info-content h2{font-size:22px;line-height:1.7;font-weight:750;margin:0 0 6px}
.hg-info-content .hg-info-lead{font-size:12px;line-height:1.9;color:var(--hg-muted);max-width:360px;margin:0 auto 21px}
.hg-price-example{text-align:start;border:1px solid var(--hg-line);background:var(--hg-surface);border-radius:17px;overflow:hidden}
.hg-example-caption{display:block;text-align:center;background:var(--hg-soft);color:var(--hg-deep);font-size:11px;font-weight:700;padding:5px 12px}
.hg-example-product{display:flex;align-items:center;gap:10px;padding:8px 12px}
.hg-example-product>.hg-photo{flex:none;width:48px;height:52px;border-radius:9px}
.hg-example-product>div{flex:1;min-width:0}
.hg-example-product b{display:block;font-size:12px;line-height:1.8}
.hg-example-product small{display:block;font-size:10px;color:var(--hg-muted);margin-top:3px}
.hg-price-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:0 13px;padding:0 0 8px;text-align:center}
.hg-price-comparison>div+div{border-inline-start:1px solid var(--hg-line)}
.hg-price-comparison>div>span{display:block;font-size:11px;color:var(--hg-muted);margin-bottom:3px}
.hg-price-comparison strong{font:700 18px Arial;white-space:nowrap}
.hg-price-comparison small{font:10px 'Noto Sans Arabic',sans-serif;color:var(--hg-muted)}
.hg-example-row,.hg-example-total{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 13px;padding:8px 0;border-top:1px solid var(--hg-line);font-size:11px}
.hg-example-row>span{display:flex;align-items:center;gap:7px;color:var(--hg-muted)}
.hg-example-row>b{font:700 14px Arial}
.hg-example-total{font-weight:700;color:var(--hg-deep)}
.hg-example-total>strong{font:700 20px Arial}
.hg-example-row small,.hg-example-total small{font:10px 'Noto Sans Arabic',sans-serif}
.hg-info-content .hg-info-footnote{font-size:10px;line-height:1.8;color:var(--hg-muted);margin-top:13px}
.hg-info-benefits{display:grid;gap:19px;text-align:start;margin-top:23px}
.hg-info-benefits>div{display:flex;gap:12px;align-items:flex-start}
.hg-info-benefits>div>span{display:grid;place-items:center;flex:none;width:39px;height:39px;border-radius:12px;background:var(--hg-soft);color:var(--hg-deep)}
.hg-info-benefits h3{font-size:14px;font-weight:700;line-height:1.8}
.hg-info-benefits p{font-size:11px;line-height:1.9;color:var(--hg-muted);margin-top:3px}
@keyframes hg-info-up{from{transform:translateY(45px);opacity:.4}to{transform:translateY(0);opacity:1}}
@media(max-width:350px){.hg-topline{gap:5px}.hg-store-photo{width:36px;height:36px;border-radius:10px}.hg-store-meta{font-size:9px;gap:4px 6px}.hg-store-delivery{padding-inline-start:6px}.hg-info-cards>button{padding:7px 8px;gap:6px}.hg-info-card-icon{width:27px;height:30px}.hg-info-cards b{font-size:10px}.hg-info-cards small{font-size:8px}.hg-info-content{padding-inline:17px}.hg-info-content h2{font-size:20px}}
@media(prefers-reduced-motion:reduce){.hg-sheet[data-kind=info]{animation:none}}

/* Use Haatly’s existing Saudi riyal font and keep the symbol with its amount in RTL. */
.hg-money{display:inline-flex;flex-direction:row;align-items:center;gap:.3em;direction:ltr;unicode-bidi:isolate;white-space:nowrap;vertical-align:baseline}
.hg-money>.hg-riyal{font-family:'SaudiRiyal',sans-serif!important;font-size:.85em!important;font-weight:400!important;line-height:1;display:inline-block;flex:none;margin:0!important;vertical-align:0;color:inherit}

/* Compact grocery product cards (preview layer): tinted image tile, text packed right under it. */
.hg-app .hg-card-art { background: var(--hg-surface); border-radius: 12px; margin-bottom: 5px; }
.hg-app .hg-card .hg-photo { background-color: transparent; }
.hg-app .hg-card .hg-photo.hg-atlas { mix-blend-mode: multiply; }
.hg-app .hg-card-quantity { bottom: 5px; left: 5px; }
.hg-app .hg-card .hg-add { width: 30px; height: 30px; border-radius: 9px; border-color: transparent !important; box-shadow: 0 1px 4px rgba(21, 49, 57, .14); }
.hg-app .hg-card .hg-stepper { height: 30px; }
.hg-app .hg-card .hg-stepper button { height: 30px; }

.hg-app .hg-card-name {
  min-height: 0 !important; margin: 0; padding: 0; font-size: 12px !important; font-weight: 500 !important; line-height: 1.45 !important;
  display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hg-app .hg-card .hg-unit { margin: 1px 0 0 !important; font-size: 10px !important; line-height: 1.5; }
.hg-app .hg-card .hg-price { margin-top: 1px; font-size: 13.5px; line-height: 1.5; }

.hg-app .hg-products, .hg-app .hg-list-products { gap: 16px 8px; }
.hg-app .hg-rail { gap: 8px; }
.hg-app .hg-shelf { margin-bottom: 20px; }
@media (min-width: 650px) {
  .hg-app .hg-products, .hg-app .hg-list-products { gap: 20px 12px; }
  .hg-app .hg-card-name { font-size: 13px !important; }
  .hg-app .hg-card .hg-price { font-size: 15px; }
}
html.dark-mode .hg-app .hg-card .hg-photo.hg-atlas { mix-blend-mode: normal; }

/* ---------- Store header: a faint brand tint so the top area reads as its own zone ---------- */
.hg-app .hg-header {
  background: linear-gradient(180deg, #eaf7f9 0%, #f4fbfc 100%);
  box-shadow: none;
}
.hg-app .hg-header .hg-search { background: #fff !important; box-shadow: none; }
html.dark-mode .hg-app .hg-header, body.dark-mode .hg-app .hg-header { background: linear-gradient(180deg, #223940 0%, #25303a 100%); box-shadow: none; }
html.dark-mode .hg-app .hg-header .hg-search, body.dark-mode .hg-app .hg-header .hg-search { background: var(--hg-bg) !important; box-shadow: none; }
.hg-app .hg-header button.hg-search-launch, .hg-app .hg-header .hg-search-launch.hg-search { background: #fff !important; box-shadow: none; }
html.dark-mode .hg-app .hg-header button.hg-search-launch { background: var(--hg-bg) !important; box-shadow: none; }

/* home: the two info cards (same store price / your choices first) are hidden */
.hg-app .hg-home > .hg-info-cards { display: none !important; }

/* shelf "view all": sits at the end of the product row as a round arrow button with its label underneath
   (the tile itself is added in catalog.js); the old link beside the shelf title is hidden */
.hg-app .hg-shelf-title > button { display: none !important; }
/* the row becomes a flex line so the tile can be narrower than a product card (cards keep their widths) */
.hg-app .hg-rail { display: flex; }
.hg-app .hg-rail > .hg-card { flex: 0 0 calc((100% - 27px) / 3.15); min-width: 0; }
@media (min-width: 650px) { .hg-app .hg-rail > .hg-card { flex-basis: calc((100% - 70px) / 6.25); } }
@media (max-width: 350px) { .hg-app .hg-rail > .hg-card { flex-basis: calc((100% - 18px) / 3.1); } }
.hg-app .hg-rail > .hg-rail-all { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; align-self: flex-start; aspect-ratio: auto; padding-inline: 4px 2px; scroll-snap-align: end; }
.hg-app .hg-rail > .hg-rail-all { height: calc((100cqw - 27px) / 3.15); }
.hg-app .hg-rail { container-type: inline-size; }
.hg-app .hg-rail-all-art { display: grid; place-items: center; }
.hg-app .hg-rail-all-art i {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--hg-bg); color: var(--hg-deep);
  box-shadow: 0 1px 6px rgba(16, 60, 68, .12), 0 0 0 1px var(--hg-line); transition: transform .15s;
}
.hg-app .hg-rail-all-art svg { width: 16px; height: 16px; stroke-width: 2; }
.hg-app .hg-rail-all b { font-size: 10.5px; font-weight: 650; color: var(--hg-muted); white-space: nowrap; }
.hg-app .hg-rail-all:active .hg-rail-all-art i { transform: scale(.92); }

/* live additions */
.hg-app .hg-photo.hg-noimg { display: grid; place-items: center; background: var(--hg-surface); color: color-mix(in srgb, var(--hg-deep) 45%, transparent); }
.hg-app .hg-category-tiles .hg-photo.hg-noimg { background: var(--hg-soft); }
.hg-app .hg-category-tiles .hg-photo.hg-noimg svg { width: 26px; height: 26px; }
.hg-app .hg-sheet-body > .hg-photo.hg-noimg svg { width: 72px; height: 72px; }
.hg-app .hg-price-before { margin-inline-start: 6px; font-size: 11px; font-weight: 500; color: var(--hg-muted); }
.hg-app .hg-bag-bar:disabled { opacity: .7; }
.hg-app .hg-store-photo[hidden], .hg-app .hg-store-rating[hidden], .hg-app .hg-store-delivery[hidden] { display: none !important; }
.hg-app .hg-preview-disclaimer { opacity: .75; }
/* the tapped supermarket card while its products load */
.zoro-card.hg-loading { opacity: .55; pointer-events: none; transition: opacity .15s; }

/* search bar: the size of the home search bar (44px high, 13px text, 12px corners, 20px icon) */
.hg-app .hg-search-launch,.hg-app .hg-search{height:44px;border-radius:12px;padding:0 13px!important;gap:9px}
.hg-app .hg-search-launch{font-size:13px!important;margin-top:11px} /* a little more air under the store's name row (was 5px) */
.hg-app .hg-search-launch>svg,.hg-app .hg-search>svg{width:20px;height:20px;flex:0 0 auto}
.hg-app .hg-search input{font-size:13px}

/* ===== installed-app safe area ===== */
/* Installed as an app (PWA): full-screen pages start below the phone's status bar and end above the home indicator.
   Same rule the store already uses for its search header: the real safe-area inset when the browser reports it,
   and at least 22px when the page runs standalone. */

/* account hub ("حسابي") and its sub-pages */
#sf-home-tools-dialog .sf-hub-topbar { padding-top: max(12px, env(safe-area-inset-top, 0px)); }
html.sf-pwa-standalone #sf-home-tools-dialog .sf-hub-topbar { padding-top: calc(6px + max(env(safe-area-inset-top, 0px), 22px)); }
#sf-home-tools-dialog .sf-hub-body { padding-bottom: max(28px, env(safe-area-inset-bottom, 0px)); }

/* supermarket catalogue */
.hg-app .hg-header { padding-top: calc(6px + env(safe-area-inset-top, 0px)); }
html.sf-pwa-standalone .hg-app .hg-header { padding-top: calc(6px + max(env(safe-area-inset-top, 0px), 22px)); }
.hg-app .hg-scroll { scroll-padding-top: calc(140px + env(safe-area-inset-top, 0px)); }

/* ===== header: solid icons ===== */
/* Header: solid "الطلبات" and "حسابي" icons (see header-icons-live.js) */
.sf-home-enhanced #header svg.sf-home-header-solid,
.sf-home-enhanced #header svg.sf-home-header-solid path { fill: currentColor !important; stroke: none !important; }
/* the two header buttons stand alone, at one level: the words the home script puts under them are not shown
   (their names stay on the buttons for screen readers) */
.sf-home-enhanced #header .sf-home-more .sf-home-header-action-label,
.sf-home-enhanced #header .sf-home-orders .sf-home-header-action-label { display: none; }

/* ===== shared delivery: redesigned schedule tab ===== */
/* Shared delivery: the redesigned "مواعيد الطلب" tab (generated by schedule-live/build.py) */
#sharedTripModal.ht-trip-design {
    font-family: 'Noto Sans Arabic', Tahoma, sans-serif;
    --ht-trip-bg: #fff;
    --ht-trip-surface: #f5f7f8;
    --ht-trip-ink: #203940;
    --ht-trip-muted: #65767d;
    --ht-trip-line: #e6ecee;
    --ht-trip-accent: #138697;
    --ht-trip-tint: #e9f7f8;
    --ht-trip-brand: #2cb4c4;
}
html.dark-mode #sharedTripModal.ht-trip-design {
    --ht-trip-bg: #25262e;
    --ht-trip-surface: #30313b;
    --ht-trip-ink: #f5f7f8;
    --ht-trip-muted: #aebbc1;
    --ht-trip-line: #3e424b;
    --ht-trip-accent: #70d3df;
    --ht-trip-tint: #203e45;
}
#sharedTripModal.ht-trip-design .shared-trip-modes { margin-bottom: 12px; }
#sharedTripModal.ht-trip-design .shared-trip-modes-switch { background: var(--ht-trip-surface); }
#sharedTripModal.ht-trip-design .shared-trip-mode { color: var(--ht-trip-muted); font-size: 14px; }
#sharedTripModal.ht-trip-design .shared-trip-mode.is-active { background: var(--ht-trip-brand); color: #fff; box-shadow: 0 3px 8px #102a3410; }
#sharedTripModal.ht-trip-design .ht-trips { margin: 0; color: var(--ht-trip-ink); }
#sharedTripModal .ht-trip-icon { display: inline-flex; width: 22px; height: 22px; flex: 0 0 auto; }
#sharedTripModal .ht-trip-icon svg { display: block; width: 100%; height: 100%; }
#sharedTripModal .ht-trip-intro { margin: 0 0 10px; }
#sharedTripModal .ht-trip-intro-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#sharedTripModal .ht-trip-intro h2 { margin: 0; font-family: inherit; font-size: 19px; font-weight: 800; line-height: 1.6; color: var(--ht-trip-ink); }
#sharedTripModal .ht-trip-saving { flex: 0 0 auto; color: var(--ht-trip-accent); background: var(--ht-trip-tint); border-radius: 9px; padding: 4px 8px; font-size: 11px; font-weight: 800; }
#sharedTripModal .ht-trip-intro p { margin: 5px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--ht-trip-muted); }
#sharedTripModal .ht-trip-location-note { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 12px; background: var(--ht-trip-tint); color: var(--ht-trip-accent); font-size: 11.5px; line-height: 1.7; }
#sharedTripModal .ht-trip-location-note .ht-trip-icon { width: 18px; height: 18px; }
#sharedTripModal .ht-trip-day-group { margin-top: 18px; }
#sharedTripModal .ht-trip-day-heading { margin: 0 2px 9px; font-size: 13px; font-weight: 700; color: var(--ht-trip-ink); }
#sharedTripModal .ht-trip-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
#sharedTripModal .ht-trip-option { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 112px; padding: 29px 8px 16px; border: 1px solid var(--ht-trip-line); border-radius: 14px; background: var(--ht-trip-surface); color: var(--ht-trip-ink); font-family: inherit; text-align: center; cursor: pointer; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease; }
#sharedTripModal .ht-trip-option.is-selected { border-color: var(--ht-trip-brand); background: var(--ht-trip-tint); box-shadow: inset 0 0 0 1px var(--ht-trip-brand); }
#sharedTripModal .ht-trip-period { display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--ht-trip-muted); font-size: 12px; line-height: 1.5; white-space: nowrap; }
#sharedTripModal .ht-trip-period .ht-trip-icon { width: 17px; height: 17px; }
#sharedTripModal .ht-trip-option.is-selected .ht-trip-period { color: var(--ht-trip-accent); }
#sharedTripModal .ht-trip-option-main { display: flex; flex-direction: column; align-items: center; min-width: 0; gap: 7px; }
#sharedTripModal .ht-trip-time { font-size: 25px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
#sharedTripModal .ht-trip-participants { color: var(--ht-trip-muted); font-size: 10px; line-height: 1.6; }
#sharedTripModal .ht-trip-radio { position: absolute; inset-inline-end: 9px; top: 9px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--ht-trip-line); background: var(--ht-trip-bg); }
#sharedTripModal .ht-trip-radio .ht-trip-icon { width: 12px; height: 12px; opacity: 0; }
#sharedTripModal .ht-trip-option.is-selected .ht-trip-radio { border-color: var(--ht-trip-brand); background: var(--ht-trip-brand); color: #fff; }
#sharedTripModal .ht-trip-option.is-selected .ht-trip-radio .ht-trip-icon { opacity: 1; }
#sharedTripModal .ht-trip-options.is-single { grid-template-columns: minmax(0, 1fr); }
#sharedTripModal .ht-trip-options.is-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#sharedTripModal .ht-trip-options.is-single .ht-trip-option { flex-direction: row; justify-content: flex-start; min-height: 68px; padding: 14px 17px 14px 45px; gap: 12px; text-align: start; }
#sharedTripModal .ht-trip-options.is-single .ht-trip-option-main { order: -1; flex-direction: row; gap: 15px; }
#sharedTripModal .ht-trip-options.is-single .ht-trip-time { font-size: 23px; }
#sharedTripModal .ht-trip-options.is-single .ht-trip-radio { inset-inline-end: 16px; top: calc(50% - 9px); width: 18px; height: 18px; }
#sharedTripModal .ht-trip-options.is-single .ht-trip-participants { position: absolute; inset-inline-start: 17px; bottom: 10px; }
#sharedTripModal .ht-trip-options.is-single .ht-trip-option:has(.ht-trip-participants) { padding-bottom: 34px; }
#sharedTripModal .ht-trip-timing-note { margin: 10px 0 0; color: var(--ht-trip-muted); font-size: 11px; line-height: 1.7; text-align: center; }
#sharedTripModal .ht-trip-footer { display: none; flex: 0 0 auto; padding: 12px clamp(18px,5vw,28px) max(8px,env(safe-area-inset-bottom)); background: var(--ht-trip-bg); border-top: 1px solid var(--ht-trip-line); color: var(--ht-trip-ink); }
#sharedTripModal[data-trip-mode="schedule"] .ht-trip-footer { display: block; }
#sharedTripModal .ht-trip-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#sharedTripModal .ht-trip-footer-summary { min-width: 0; }
#sharedTripModal .ht-trip-footer-label { display: block; color: var(--ht-trip-muted); font-size: 10px; margin-bottom: 3px; }
#sharedTripModal .ht-trip-selection { display: block; font-size: 12px; line-height: 1.5; }
#sharedTripModal .ht-trip-continue { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-width: 120px; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 12px; background: var(--ht-trip-brand); color: #fff; font-family: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
#sharedTripModal .ht-trip-continue:disabled { background: var(--ht-trip-surface); color: var(--ht-trip-muted); cursor: default; }
#sharedTripModal .ht-trip-continue .ht-trip-icon { width: 19px; height: 19px; }#sharedTripModal .ht-trip-option:focus-visible,
#sharedTripModal .ht-trip-continue:focus-visible { outline: 2px solid var(--ht-trip-accent); outline-offset: 3px; }
#sharedTripModal .ht-trip-details { align-items: flex-end; padding: 0; background: #0c17275c; backdrop-filter: blur(3px); }
#sharedTripModal .ht-trip-sheet { width: 100%; max-height: 90%; overflow-y: auto; padding: 30px 24px max(20px,env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--ht-trip-bg); color: var(--ht-trip-ink); animation: ht-trip-sheet-in .24s ease-out; }
#sharedTripModal .ht-trip-sheet::before { content: ''; display: block; position: absolute; top: 9px; right: calc(50% - 18px); width: 36px; height: 4px; border-radius: 4px; background: var(--ht-trip-line); }
#sharedTripModal .ht-trip-sheet .shared-trip-interest-pop-close { top: 22px; left: 18px; width: 38px; height: 38px; background: var(--ht-trip-surface); color: var(--ht-trip-muted); }
#sharedTripModal .ht-trip-eyebrow { font-size: 12px; font-weight: 700; color: var(--ht-trip-accent); }
#sharedTripModal .ht-trip-sheet h2 { margin: 6px 0; padding-left: 36px; font-size: 23px; line-height: 1.5; font-weight: 800; color: inherit; }
#sharedTripModal .ht-trip-sheet-intro { margin: 0; font-size: 12px; line-height: 1.7; color: var(--ht-trip-muted); }
#sharedTripModal .ht-trip-steps { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 18px; }
#sharedTripModal .ht-trip-step { display: flex; align-items: flex-start; gap: 12px; }
#sharedTripModal .ht-trip-step-number { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 10px; color: var(--ht-trip-accent); background: var(--ht-trip-tint); font-weight: 800; font-size: 13px; }
#sharedTripModal .ht-trip-step strong { font-size: 14px; color: var(--ht-trip-ink); }
#sharedTripModal .ht-trip-step p { margin: 3px 0 0; font-size: 12px; line-height: 1.7; color: var(--ht-trip-muted); }
#sharedTripModal .ht-trip-terms { border-radius: 12px; padding: 11px 13px; background: var(--ht-trip-surface); color: var(--ht-trip-muted); font-size: 11px; line-height: 1.8; margin: 0 0 12px; }
#sharedTripModal .ht-trip-sheet-action { width: 100%; margin-top: 12px; }
@keyframes ht-trip-sheet-in { from { transform: translateY(24px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
@media (max-width: 360px) {
    #sharedTripModal .ht-trip-intro h2 { font-size: 17px; }
    #sharedTripModal .ht-trip-saving { font-size: 10px; padding: 4px 6px; }
    #sharedTripModal .ht-trip-continue { min-width: 104px; gap: 8px; padding-inline: 12px; }
    #sharedTripModal .ht-trip-sheet { padding-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    #sharedTripModal .ht-trip-option { transition: none; }
    #sharedTripModal .ht-trip-sheet { animation: none; }
}

#sharedTripModal.ht-trip-design[data-trip-mode="schedule"] .shared-trip-modal-body { padding: 8px 18px 12px; }
#sharedTripModal.ht-trip-design .shared-trip-modal-scroll { scrollbar-width: none; }
#sharedTripModal.ht-trip-design .shared-trip-modal-scroll::-webkit-scrollbar { display: none; }
#sharedTripModal .ht-trips, #sharedTripModal .ht-trips *,
#sharedTripModal .ht-trip-footer, #sharedTripModal .ht-trip-footer *,
#sharedTripModal .ht-trip-sheet, #sharedTripModal .ht-trip-sheet * { font-family: 'Noto Sans Arabic', Tahoma, sans-serif !important; }
html.dark-mode #sharedTripModal .ht-trip-sheet { background: var(--ht-trip-bg); }

/* ===== favourite stores ===== */
/* Favourite stores: heart in the store window's top bar, "المفضلة" row in the account hub, and the saved list (favorites.js) */
/* heart in the store window's top bar: the window's own round button (.qvc-top-btn), only the drawing is ours */
.qvc-topbar-side .ht-fav-top svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
/* A saved store's heart is filled in the Haatly teal of the rating star beside the store's name (not red). The
   colour is set on the drawing itself: in dark mode the window forces its buttons' own colour to white. */
.qvc-topbar-side .qvc-top-btn.ht-fav-top.ht-fav-top.ht-fav-top.is-on svg,
.qvc-topbar-side .qvc-top-btn.ht-fav-top.ht-fav-top.ht-fav-top.is-on svg path,
html.dark-mode body .qvc-topbar-side .qvc-top-btn.ht-fav-top.ht-fav-top.ht-fav-top.is-on svg,
html.dark-mode body .qvc-topbar-side .qvc-top-btn.ht-fav-top.ht-fav-top.ht-fav-top.is-on svg path { fill: #30b6c5 !important; stroke: #30b6c5 !important; }

/* remove-heart in the saved list */
.ht-fav { display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #5c6b72; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ht-fav svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.ht-fav.is-on { color: #30b6c5; }
.ht-fav.is-on svg { fill: currentColor; }
.ht-fav:active { transform: scale(.9); }

/* hub row: count in grey before the chevron */
#sf-home-tools-dialog .ht-fav-row-end { display: inline-flex; align-items: center; gap: 10px; }
#sf-home-tools-dialog .ht-fav-count { font-size: 13px; color: var(--hub-muted, #8a979d); white-space: nowrap; }

/* the list page */
#sf-home-tools-dialog .ht-fav-page {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: var(--hub-bg, #fff); color: var(--hub-ink, #17252b);
}
#sf-home-tools-dialog .ht-fav-page[hidden] { display: none; }
#sf-home-tools-dialog .ht-fav-bar {
  flex: 0 0 auto; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: max(12px, env(safe-area-inset-top, 0px)) 10px 8px;
}
html.sf-pwa-standalone #sf-home-tools-dialog .ht-fav-bar { padding-top: calc(6px + max(env(safe-area-inset-top, 0px), 22px)); }
#sf-home-tools-dialog .ht-fav-bar h2 { margin: 0; text-align: center; font-size: 17px; font-weight: 700; color: inherit; }
#sf-home-tools-dialog .ht-fav-back { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: none; color: inherit; cursor: pointer; }
#sf-home-tools-dialog .ht-fav-back svg { width: 22px; height: 22px; }
#sf-home-tools-dialog .ht-fav-body { flex: 1 1 auto; overflow-y: auto; padding: 6px 16px max(24px, env(safe-area-inset-bottom, 0px)); }
#sf-home-tools-dialog .ht-fav-item { display: flex; align-items: center; gap: 8px; min-height: 68px; }
#sf-home-tools-dialog .ht-fav-go { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
#sf-home-tools-dialog .ht-fav-go:disabled { cursor: default; opacity: .55; }
#sf-home-tools-dialog .ht-fav-pic { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: var(--hub-line, #e9edef); }
#sf-home-tools-dialog .ht-fav-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
#sf-home-tools-dialog .ht-fav-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#sf-home-tools-dialog .ht-fav-text strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sf-home-tools-dialog .ht-fav-text small { font-size: 12px; color: var(--hub-muted, #8a979d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sf-home-tools-dialog .ht-fav-remove { position: static; flex: 0 0 auto; width: 36px; height: 36px; background: none; }
#sf-home-tools-dialog .ht-fav-remove svg { width: 19px; height: 19px; }
#sf-home-tools-dialog .ht-fav-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 18vh 24px 0; color: var(--hub-muted, #8a979d); }
#sf-home-tools-dialog .ht-fav-empty svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.5; margin-bottom: 8px; }
#sf-home-tools-dialog .ht-fav-empty strong { font-size: 16px; font-weight: 700; color: var(--hub-ink, #17252b); }
#sf-home-tools-dialog .ht-fav-empty p { margin: 0; font-size: 13.5px; line-height: 1.8; }

/* ---- Order card total + «زيادة سعر التوصيل»: the theme's own surfaces and accent ----
   The total row was a tinted teal block (dark: green-looking), the boost fold, amounts and note used the engine's
   slate-blue dark colours. All of them now sit on the chat's neutral surface with a hairline, and only the numbers
   carry the accent. The swipe-to-confirm bar keeps the store's theme colour. */
#order-chat-modal .order-chat-invoice-total { background: var(--oc-incoming) !important; border: 1px solid var(--oc-line) !important; color: var(--oc-ink) !important; box-shadow: none !important; }
#order-chat-modal .order-chat-invoice-total-label { color: var(--oc-ink) !important; }
#order-chat-modal .order-chat-invoice-total-amt,
#order-chat-modal .order-chat-invoice-total-amt .sar-money,
#order-chat-modal .order-chat-invoice-total-amt .sar-symbol { color: var(--oc-accent-deep) !important; }
html.dark-mode #order-chat-modal .order-chat-invoice-total-amt,
html.dark-mode #order-chat-modal .order-chat-invoice-total-amt .sar-money,
html.dark-mode #order-chat-modal .order-chat-invoice-total-amt .sar-symbol { color: var(--oc-accent) !important; }
#order-chat-modal .order-chat-delivery-boost__title { color: var(--oc-ink) !important; }
#order-chat-modal .order-chat-delivery-boost__subtitle { color: var(--oc-muted) !important; }
#order-chat-modal .order-chat-delivery-boost__fold { background: var(--oc-incoming) !important; border: 1px solid var(--oc-line) !important; color: var(--oc-ink) !important; box-shadow: none !important; }
#order-chat-modal .order-chat-delivery-boost__fold [data-order-chat-boost-fold-amt] { color: var(--oc-accent-deep) !important; }
html.dark-mode #order-chat-modal .order-chat-delivery-boost__fold [data-order-chat-boost-fold-amt] { color: var(--oc-accent) !important; }
#order-chat-modal .order-chat-delivery-boost__fold-chevron { color: var(--oc-muted) !important; }
#order-chat-modal .order-chat-delivery-boost__note { background: transparent !important; border: 1px dashed var(--oc-line) !important; color: var(--oc-muted) !important; }
#order-chat-modal .order-chat-delivery-boost__amount { background: var(--oc-incoming) !important; border: 1.5px solid var(--oc-line) !important; color: var(--oc-ink) !important; box-shadow: none !important; }
#order-chat-modal .order-chat-delivery-boost__amount.is-selected { border-color: var(--oc-accent) !important; background: color-mix(in srgb, var(--oc-accent) 14%, var(--oc-incoming)) !important; }
#order-chat-modal .order-chat-delivery-boost__amount-label { color: var(--oc-accent-deep) !important; }
html.dark-mode #order-chat-modal .order-chat-delivery-boost__amount-label { color: var(--oc-accent) !important; }
#order-chat-modal .order-chat-delivery-boost__swipe-caption { color: var(--oc-muted) !important; }

/* ---- Chat header while searching for a delegate: «البحث عن مندوب» and three bouncing dots ----
   The engine writes «محادثة مع المندوب • جاري البحث عن مندوب». The script marks that state with .oc-searching and
   changes the leading words to «البحث عن مندوب»; the sentence's place shows two more dots like the engine's own
   separator dot (same 5px size, same theme colour), the three rising and falling one after another.
   --oc-sd is the animation phase the script sets, so the dots do not restart each time the engine redraws the header. */
#order-chat-modal .order-chat-modal-subtitle-inner.oc-searching .order-chat-header-delegate-dot { margin: 0 !important; top: 0 !important; animation: oc-search-dot 3.6s ease-in-out infinite; animation-delay: var(--oc-sd, 0s); }
#order-chat-modal .order-chat-modal-subtitle-inner.oc-searching .order-chat-header-delegate-name { display: inline-flex !important; align-items: center; gap: 0; margin-inline-start: -4px; font-size: 0 !important; line-height: 0 !important; max-width: none !important; overflow: visible !important; }
#order-chat-modal .order-chat-modal-subtitle-inner.oc-searching .order-chat-header-delegate-name::before,
#order-chat-modal .order-chat-modal-subtitle-inner.oc-searching .order-chat-header-delegate-name::after { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--theme-color, #15803d); animation: oc-search-dot 3.6s ease-in-out infinite; }
#order-chat-modal .order-chat-modal-subtitle-inner.oc-searching .order-chat-header-delegate-name::before { animation-delay: calc(var(--oc-sd, 0s) + .16s); margin-inline-end: 4px; }
#order-chat-modal .order-chat-modal-subtitle-inner.oc-searching .order-chat-header-delegate-name::after { animation-delay: calc(var(--oc-sd, 0s) + .32s); }
/* three motions of 1.2s each, repeating: hop, swell, dim */
@keyframes oc-search-dot {
  0%, 20%, 33.33% { transform: translateY(0) scale(1); opacity: .55; }
  10% { transform: translateY(-4px) scale(1); opacity: 1; }
  43.33% { transform: translateY(0) scale(1.7); opacity: 1; }
  53.33%, 66.66% { transform: translateY(0) scale(1); opacity: .55; }
  76.66% { transform: translateY(0) scale(.55); opacity: .15; }
  86.66%, 100% { transform: translateY(0) scale(1); opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  #order-chat-modal .order-chat-modal-subtitle-inner.oc-searching .order-chat-header-delegate-dot,
  #order-chat-modal .order-chat-modal-subtitle-inner.oc-searching .order-chat-header-delegate-name::before,
  #order-chat-modal .order-chat-modal-subtitle-inner.oc-searching .order-chat-header-delegate-name::after { animation: none; opacity: 1; }
}

/* ---- «زيادة سعر التوصيل»: the heading's words live on the fold button; the standalone heading goes ----
   The script renames the button and marks the block (.oc-boost-merged); only then is the heading hidden, so a
   block the script has not touched keeps its heading. */
#order-chat-modal .order-chat-delivery-boost.oc-boost-merged .order-chat-delivery-boost__title { display: none !important; }

/* ---- Orders list: the cancel reason is a plain line under the progress track, not a boxed strip ----
   The engine draws it as a small tinted box (10.4px text). Here: no background, no padding, a little larger and
   medium weight, in the muted text colour of the card. */
.notification-card .order-progress-cancel-reason { margin-top: 8px !important; padding: 0 !important; background: none !important; border: 0 !important; border-radius: 0 !important; font-size: 12.5px !important; font-weight: 500 !important; line-height: 1.6 !important; color: #64748b !important; text-align: start; }
html.dark-mode .notification-card .order-progress-cancel-reason { color: #a8b4c4 !important; }

/* ---- Shared-delivery banner: no flash of the default hero on a return visit ----
   The banner is drawn by the script after it has asked the store's schedule board, so the default hero used to show
   first. The script now keeps the board's last answer in the browser, and the page's head (theme1/index) marks the
   page html.ht-share-pending when there is one: until the banner is back, a plain block in the banner's own colour
   stands in its place instead of the default hero. */
html.ht-share-pending .sf-home .sf-home-feature > .sf-home-hero { display: none !important; }
html.ht-share-pending .sf-home .sf-home-feature:not(.ht-share-has-activity)::after { content: ''; display: block; height: 135px; border-radius: 20px; background: linear-gradient(115deg, #137d89, #219eac 65%, #2cb3c5); }

/* ===== release 46: shared delivery window — the «المشاركة / مواعيد الطلب» switch, a little smaller and calmer in weight ===== */
#sharedTripModal.ht-trip-design .shared-trip-modes-switch { gap: 3px; padding: 3px; border-radius: 12px; }
#sharedTripModal.ht-trip-design .shared-trip-mode { min-height: 36px; padding: 0 10px; border-radius: 9px; font-size: 13px; font-weight: 500; line-height: 1.3; }
#sharedTripModal.ht-trip-design .shared-trip-mode.is-active { font-weight: 600; box-shadow: 0 2px 6px #102a3410; }

/* ===== release 47: checkout — the «توصيل / استلام شخصي» switch sits flush inside the summary card =====
   The switch pulls itself out by the card's original 16px side padding and expects no top padding; this design
   gives the card 12px 10px, so the switch stuck out 6px on each side and hung 12px below the card's top.
   In dark mode the switch's strip has the page's own colour, so this one card gets the thin outline the cards have
   in light mode — otherwise the strip reads as lying outside the card. */
#card-summary .checkout-fields .order-summary-card:has(> .sf-fulfillment) { padding-top: 0 !important; }
#card-summary .checkout-fields .order-summary-card > .sf-fulfillment { margin: 0 -10px 14px !important; }
#card-summary .checkout-fields .order-summary-card > .sf-fulfillment .sf-fulfillment__options { border-radius: 15px 15px 0 0 !important; }
html.dark-mode #card-summary .checkout-fields .order-summary-card:has(> .sf-fulfillment),
body.dark-mode #card-summary .checkout-fields .order-summary-card:has(> .sf-fulfillment) { border: 1px solid var(--dm-border, rgba(255, 255, 255, .08)) !important; }

/* ===== release 49: home categories — new artwork for every category except the supermarket and the produce bag =====
   One PNG per category (public/custom/img/sf-cat-*.png, 264px, transparent; PNG because the site's .htaccess sends
   .webp requests to Laravel instead of the file — release 48 used WebP and was rolled back for that) instead of the 3x3 atlas and the
   single PNGs. Not touched, at the owner's word: the supermarket tile (sf-home-art--market + sf-home-market-still)
   and «خضار و فواكه» (its bag is set earlier in this file).
   «صنعة يدوية» and «شحنة» share the class sf-home-art--gifts, so they are told apart by the tile's aria-label
   (home rail only). */
.sf-home-enhanced .sf-home-art--family,
.sf-home-enhanced .sf-home-art--food,
.sf-home-enhanced .sf-home-art--best-dishes,
.sf-home-enhanced .sf-home-art--coffee,
.sf-home-enhanced .sf-home-art--sweets,
.sf-home-enhanced .sf-home-art--juice,
.sf-home-enhanced .sf-home-art--pharmacy,
.sf-home-enhanced .sf-home-art--flowers,
.sf-home-enhanced .sf-home-art--butcher,
.sf-home-category-rail li[aria-label^="صنعة"] .sf-home-art,
.sf-home-category-rail li[aria-label^="شحنة"] .sf-home-art { background-size: contain !important; background-position: center !important; background-repeat: no-repeat !important; }
/* release 90: a tiramisu in an H.Chefs tray, coffee, and a hand adding the last touch (again a new file name: phones keep stored pictures) */
.sf-home-enhanced .sf-home-art--family { background-image: url("../img/sf-cat-family-4.png") !important; }
.sf-home-enhanced .sf-home-art--food { background-image: url("../img/sf-cat-food.png") !important; }
.sf-home-enhanced .sf-home-art--best-dishes { background-image: url("../img/sf-cat-best-dishes.png") !important; }
.sf-home-enhanced .sf-home-art--coffee { background-image: url("../img/sf-cat-coffee.png") !important; }
.sf-home-enhanced .sf-home-art--sweets { background-image: url("../img/sf-cat-sweets.png") !important; }
.sf-home-enhanced .sf-home-art--juice { background-image: url("../img/sf-cat-juice.png") !important; }
.sf-home-enhanced .sf-home-art--pharmacy { background-image: url("../img/sf-cat-pharmacy.png") !important; }
/* release 82: the calla-lily bouquet (a new file name, so phones do not keep showing the stored old picture) */
.sf-home-enhanced .sf-home-art--flowers { background-image: url("../img/sf-cat-flowers-2.png") !important; }
.sf-home-enhanced .sf-home-art--butcher { background-image: url("../img/sf-cat-butcher.png") !important; }
.sf-home-category-rail li[aria-label^="صنعة"] .sf-home-art { background-image: url("../img/sf-cat-handmade.png") !important; }
.sf-home-category-rail li[aria-label^="شحنة"] .sf-home-art { background-image: url("../img/sf-cat-parcel.png") !important; }

/* release 49: home categories — no scrollbar under the category grid / strip while swiping between its pages.
   The theme sets `scrollbar-width: thin` on ul.tabs after its own `none`, which also switches off the
   ::-webkit-scrollbar rules that used to hide it. */
.sf-home-enhanced .sf-home-category-rail ul.category-tab { scrollbar-width: none !important; -ms-overflow-style: none; }
.sf-home-enhanced .sf-home-category-rail ul.category-tab::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }

/* ==========================================================================
   Account hub — «ملفي الشخصي» (the signed-in customer's details).
   A plain form page in the hub's own colours: label over field, the two actions at the foot of the page.
   Scope: #sf-home-tools-dialog [data-hub-panel="profile"] only.
   ========================================================================== */
#sf-home-tools-dialog[data-panel="profile"] .sf-hub-body { display: flex; flex-direction: column; }
#sf-home-tools-dialog [data-hub-panel="profile"]:not([hidden]) { flex: 1 0 auto; display: flex; flex-direction: column; padding: 4px 20px 0; }
#sf-home-tools-dialog .sf-profile { flex: 1 0 auto; display: flex; flex-direction: column; margin: 0; }
#sf-home-tools-dialog .sf-profile-heading { margin: 4px 0 0; font-size: 18px; font-weight: 700; line-height: 1.6; color: var(--hub-ink); text-align: start; }
#sf-home-tools-dialog .sf-profile-label { display: block; margin: 16px 2px 8px; font-size: 13.5px; font-weight: 700; line-height: 1.6; color: var(--hub-ink); text-align: start; }
#sf-home-tools-dialog .sf-profile-input,
#sf-home-tools-dialog .sf-profile-phone,
#sf-home-tools-dialog .sf-profile-gender button {
  box-sizing: border-box; width: 100%; height: 52px; margin: 0; border: 1px solid var(--hub-line); border-radius: 12px;
  background: var(--hub-card); color: var(--hub-ink); font: 400 15px/1.5 'Noto Sans Arabic', Tahoma, sans-serif; box-shadow: none;
}
#sf-home-tools-dialog .sf-profile-input { padding: 0 14px; text-align: start; outline: none; -webkit-appearance: none; appearance: none; }
#sf-home-tools-dialog .sf-profile-input::placeholder { color: var(--hub-muted); opacity: 1; }
#sf-home-tools-dialog .sf-profile-input:focus { border-color: var(--hub-accent); box-shadow: 0 0 0 3px var(--hub-accent-soft); }
#sf-home-tools-dialog .sf-profile-input:disabled,
#sf-home-tools-dialog .sf-profile-gender button:disabled { opacity: .6; }
#sf-home-tools-dialog #sf-profile-email:not(:placeholder-shown) { direction: ltr; text-align: end; }

/* gender: two equal choices; the chosen one is tinted */
#sf-home-tools-dialog .sf-profile-gender { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#sf-home-tools-dialog .sf-profile-gender button {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px; font-weight: 600; color: var(--hub-muted); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
#sf-home-tools-dialog .sf-profile-gender svg { width: 20px; height: 20px; flex: none; }
#sf-home-tools-dialog .sf-profile-gender button[aria-pressed="true"] { border-color: var(--hub-accent); background: var(--hub-accent-soft); color: var(--hub-accent-deep); }
html.dark-mode #sf-home-tools-dialog .sf-profile-gender button[aria-pressed="true"] { color: var(--hub-accent); }

/* the verified number: shown, not editable */
#sf-home-tools-dialog .sf-profile-phone { display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--hub-bg); color: var(--hub-muted); }
html:not(.dark-mode) #sf-home-tools-dialog .sf-profile-phone { background: #f5f7f8; }
html.dark-mode #sf-home-tools-dialog .sf-profile-phone { background: #272932; }
#sf-home-tools-dialog .sf-profile-phone img { flex: none; width: 28px; height: 19px; border-radius: 3px; object-fit: cover; }
#sf-home-tools-dialog .sf-profile-phone b { font: 700 15px/1 Arial, sans-serif; color: var(--hub-ink); }
#sf-home-tools-dialog .sf-profile-phone i { flex: none; width: 1px; height: 20px; background: var(--hub-muted); opacity: .5; }
#sf-home-tools-dialog .sf-profile-phone bdi { flex: 1 1 auto; font: 400 15px/1 Arial, sans-serif; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
#sf-home-tools-dialog .sf-profile-phone svg { flex: none; width: 17px; height: 17px; opacity: .7; }

/* birth date: the phone's own picker opens on a tap anywhere in the field, but the date is written by the line
   beside it (the script keeps it in step), not by the picker's own text: phones place that text differently — on
   iPhone it sat at the top of the field — and write it in their own digits. A calendar mark at the end. */
#sf-home-tools-dialog .sf-profile-date { position: relative; }
#sf-home-tools-dialog .sf-profile-date .sf-profile-input { padding-inline-end: 44px; min-width: 0; text-align: start; color: transparent; -webkit-text-fill-color: transparent; }
#sf-home-tools-dialog .sf-profile-date .sf-profile-input::-webkit-date-and-time-value,
#sf-home-tools-dialog .sf-profile-date .sf-profile-input::-webkit-datetime-edit { color: transparent; -webkit-text-fill-color: transparent; }
#sf-home-tools-dialog .sf-profile-date .sf-profile-input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
#sf-home-tools-dialog .sf-profile-date-hint {
  display: flex; position: absolute; inset-inline-start: 15px; top: 1px; height: 50px; align-items: center;
  font-size: 15px; line-height: 1; color: var(--hub-muted); pointer-events: none;
}
#sf-home-tools-dialog .sf-profile-date-hint.has-value { color: var(--hub-ink); font: 400 15px/1 Arial, sans-serif; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
#sf-home-tools-dialog .sf-profile-date > svg { position: absolute; inset-inline-end: 14px; top: 16px; width: 20px; height: 20px; color: var(--hub-muted); pointer-events: none; }

#sf-home-tools-dialog .sf-profile-status { min-height: 22px; margin: 12px 2px 0; font-size: 12.5px; line-height: 1.7; color: var(--hub-accent-deep); text-align: start; }
html.dark-mode #sf-home-tools-dialog .sf-profile-status { color: var(--hub-accent); }
#sf-home-tools-dialog .sf-profile-status.is-error { color: #b23a36; }
html.dark-mode #sf-home-tools-dialog .sf-profile-status.is-error { color: #ff9a94; }

/* the two actions stay at the foot of the page */
#sf-home-tools-dialog .sf-profile-actions { margin-top: auto; padding-top: 18px; display: grid; gap: 10px; }
#sf-home-tools-dialog .sf-profile-save,
#sf-home-tools-dialog .sf-profile-logout {
  width: 100%; min-height: 52px; padding: 10px 16px; border-radius: 12px; font: 700 15px/1.6 'Noto Sans Arabic', Tahoma, sans-serif; cursor: pointer;
}
#sf-home-tools-dialog .sf-profile-save { border: 0; background: var(--home-brand, var(--hub-accent)); color: #062f35; }
#sf-home-tools-dialog .sf-profile-save:disabled { background: var(--hub-line); color: var(--hub-muted); cursor: default; }
#sf-home-tools-dialog .sf-profile-logout { border: 1px solid var(--hub-line); background: var(--hub-card); color: var(--hub-ink); }
#sf-home-tools-dialog .sf-profile-logout:disabled { opacity: .55; cursor: default; }
#sf-home-tools-dialog .sf-profile button:focus-visible { outline: 2px solid var(--hub-accent); outline-offset: 2px; }

/* ==========================================================================
   Sign-in by phone («الحساب الشخصي») as a page of the account hub, not a pop-up.
   The dialog takes the hub's own frame (full screen on a phone), top bar (back arrow, centred title) and colours,
   and its content follows «ملفي الشخصي»: text at the start side, label over field. The main button sits right
   under the field, not at the foot: a phone's number keypad has no "go" key and would cover a button down there.
   Scope: #sf-home-account-dialog only. The dialog's script and markup are untouched.
   ========================================================================== */
#sf-home-account-dialog {
  --hub-bg: #ffffff; --hub-card: #ffffff; --hub-ink: #10272d; --hub-muted: #6d8087; --hub-line: #e9edef;
  --hub-accent: #2fb3c2; --hub-accent-deep: #17899a; --hub-accent-soft: #e7f6f8;
  position: fixed; inset: 0; width: min(440px, calc(100vw - 32px)); height: min(700px, calc(100dvh - 40px));
  max-width: none; max-height: none; margin: auto; padding: 0; overflow: hidden;
  border: 1px solid var(--hub-line); border-radius: 24px; background: var(--hub-bg) !important; color: var(--hub-ink);
  text-align: start; box-shadow: 0 24px 80px #071e3026;
}
html.dark-mode #sf-home-account-dialog {
  --hub-bg: #1f2027; --hub-card: #1f2027; --hub-ink: #e9f1f3; --hub-muted: #9fb0b6; --hub-line: #32343d; --hub-accent-soft: #17343a;
}
#sf-home-account-dialog[open] { display: flex; flex-direction: column; }
#sf-home-account-dialog::backdrop { background: #071e304d; backdrop-filter: blur(3px); }
@media (max-width: 600px) {
  #sf-home-account-dialog { width: 100vw; height: 100dvh; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
}

/* top bar: the same as the hub's — back arrow at the start, title in the middle */
#sf-home-account-dialog .sf-home-dialog-head {
  flex: none; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px;
  min-height: 56px; margin: 0; padding: max(12px, env(safe-area-inset-top, 0px)) 10px 8px;
}
html.sf-pwa-standalone #sf-home-account-dialog .sf-home-dialog-head { padding-top: calc(6px + max(env(safe-area-inset-top, 0px), 22px)); }
#sf-home-account-dialog .sf-home-dialog-head h2 { grid-column: 2; grid-row: 1; margin: 0; text-align: center; font-size: 17px; font-weight: 700; line-height: 1.6; color: var(--hub-ink); }
#sf-home-account-dialog .sf-home-close {
  grid-column: 1; grid-row: 1; position: relative; display: block; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px;
  background: none; color: var(--hub-ink); font-size: 0 !important; line-height: 0; cursor: pointer;
}
/* the × becomes the hub's back arrow (it points to the page's start side) */
#sf-home-account-dialog .sf-home-close::before {
  content: ''; position: absolute; inset: 0; margin: auto; width: 24px; height: 24px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
[dir="ltr"] #sf-home-account-dialog .sf-home-close::before { transform: scaleX(-1); }

/* the page's content */
#sf-home-account-dialog .sf-phone-demo { flex: none; margin: 0 20px 4px; text-align: start; }
#sf-home-account-dialog .sf-phone-welcome { display: none; }
#sf-home-account-dialog > form:not([hidden]),
#sf-home-account-dialog > [data-phone-profile]:not([hidden]) {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; margin: 0; padding: 4px 20px 0;
}
#sf-home-account-dialog h3 { margin: 4px 0 0; font-size: 18px; font-weight: 700; line-height: 1.6; text-align: start; color: var(--hub-ink); }
#sf-home-account-dialog > form > p,
#sf-home-account-dialog > [data-phone-profile] > p { margin: 2px 0 0; font-size: 13px; line-height: 1.8; text-align: start; color: var(--hub-muted); }
#sf-home-account-dialog label { display: block; margin: 18px 2px 8px; font-size: 13.5px; font-weight: 700; line-height: 1.6; text-align: start; color: var(--hub-ink); }

/* the number: one field — country code, a hairline, the digits — in the page's own colours */
#sf-home-account-dialog .sf-phone-number {
  box-sizing: border-box; display: flex; align-items: center; direction: ltr; gap: 10px; height: 52px; padding: 0 14px;
  border: 1px solid var(--hub-line); border-radius: 12px; background: var(--hub-card); outline: 0;
}
#sf-home-account-dialog .sf-phone-number:focus-within { border-color: var(--hub-accent); box-shadow: 0 0 0 3px var(--hub-accent-soft); outline: 0; }
#sf-home-account-dialog .sf-phone-number > span { flex: none; padding: 0 10px 0 0; border: 0; border-right: 1px solid var(--hub-line); font: 700 15px/20px Arial, sans-serif; color: var(--hub-ink); font-variant-numeric: tabular-nums; }
/* the box inside the box and its green edge came from the site's general field styles: none of them here */
#sf-home-account-dialog .sf-phone-number input {
  flex: 1 1 auto; min-width: 0; width: auto; height: 100%; margin: 0; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important; outline: 0 !important;
  color: var(--hub-ink) !important; -webkit-text-fill-color: var(--hub-ink); font: 400 16px/1.4 Arial, sans-serif !important; letter-spacing: .3px;
  font-variant-numeric: tabular-nums; text-align: left;
}
#sf-home-account-dialog .sf-phone-number input::placeholder { color: var(--hub-muted); -webkit-text-fill-color: var(--hub-muted); opacity: 1; }
#sf-home-account-dialog .sf-phone-hint { margin: 8px 2px 0; font-size: 12px; line-height: 1.7; text-align: start; color: var(--hub-muted); }

/* the code step */
#sf-home-account-dialog .sf-phone-recipient { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 0; font-variant-numeric: tabular-nums; }
#sf-home-account-dialog .sf-phone-recipient bdi { font: 400 15px/1.6 Arial, sans-serif; color: var(--hub-ink); }
#sf-home-account-dialog .sf-phone-code {
  box-sizing: border-box; display: block; width: 100%; height: 52px; margin: 0; padding: 0 0 0 8px !important; border: 1px solid var(--hub-line) !important; border-radius: 12px !important;
  background: var(--hub-card) !important; box-shadow: none !important; color: var(--hub-ink) !important; -webkit-text-fill-color: var(--hub-ink);
  text-align: center; font: 400 22px/1 Arial, sans-serif !important; letter-spacing: 8px; font-variant-numeric: tabular-nums;
}
#sf-home-account-dialog .sf-phone-code:focus { border-color: var(--hub-accent) !important; box-shadow: 0 0 0 3px var(--hub-accent-soft) !important; outline: 0; }
#sf-home-account-dialog small { display: block; margin: 8px 2px 0; font-size: 12px; line-height: 1.7; text-align: start; color: var(--hub-muted); }
#sf-home-account-dialog .sf-phone-resend { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 2px 12px; margin: 14px 2px 0; }
#sf-home-account-dialog .sf-phone-resend > span { width: auto; font-size: 12.5px; text-align: start; color: var(--hub-muted); }
#sf-home-account-dialog .sf-phone-link { padding: 8px 2px; border: 0; background: none; color: var(--hub-accent-deep); font: 700 12.5px/1.6 'Noto Sans Arabic', Tahoma, sans-serif; cursor: pointer; }
html.dark-mode #sf-home-account-dialog .sf-phone-link { color: var(--hub-accent); }

/* the main button: the profile page's, placed under the field */
#sf-home-account-dialog .sf-phone-primary {
  flex: none; width: 100%; height: auto; min-height: 52px; margin: 20px 0 0; padding: 10px 16px; border: 0; border-radius: 12px;
  background: var(--home-brand, var(--hub-accent)); color: #062f35; font: 700 15px/1.6 'Noto Sans Arabic', Tahoma, sans-serif; cursor: pointer;
}
#sf-home-account-dialog > form:not([hidden])::after,
#sf-home-account-dialog > [data-phone-profile]:not([hidden])::after { content: ''; flex: none; height: max(20px, env(safe-area-inset-bottom, 0px)); }
#sf-home-account-dialog button:disabled { opacity: .5; cursor: default; }

/* the short "signed in" view (seen for a moment before the profile page opens) */
#sf-home-account-dialog .sf-phone-verified { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 0; padding: 14px; border-radius: 12px; background: var(--hub-accent-soft); color: var(--hub-accent-deep); font-size: 12.5px; font-variant-numeric: tabular-nums; }
html.dark-mode #sf-home-account-dialog .sf-phone-verified { color: var(--hub-accent); }
#sf-home-account-dialog .sf-phone-logout { align-self: center; margin: 8px 0 0; }

/* messages: above the foot, at the start side */
#sf-home-account-dialog .sf-phone-status { flex: none; margin: 0; padding: 8px 22px 0; font-size: 12.5px; line-height: 1.7; text-align: start; color: var(--hub-muted); }
#sf-home-account-dialog .sf-phone-status:empty { display: none; }
#sf-home-account-dialog .sf-phone-error { flex: none; margin: 8px 20px max(16px, env(safe-area-inset-bottom, 0px)); padding: 10px 12px; border-radius: 10px; text-align: start; font-size: 12.5px; line-height: 1.7; }
#sf-home-account-dialog .sf-phone-error[hidden] { display: none; }

/* ==========================================================================
   The old card skeleton (#skeleton-loader: six grey merchant cards from the shared header partial) is not shown on
   the new home. This page's loading screen is the first-paint cover; when the cover lifted on a fast connection the
   old skeleton showed for a couple of seconds between the cover and the page, and pushed the home down.
   ========================================================================== */
#skeleton-loader { display: none !important; }

/* ==========================================================================
   Order chat: the time of a plain text message is not shown in its bubble. Like a voice note's, it appears under
   the bubble while the message is pressed or tapped (the script adds .oc-time-on for a few seconds) and the bubble
   makes room for it only then. Pictures, invoices, receipts, maps and the support's notes keep their time.
   ========================================================================== */
#order-chat-modal :is(.order-chat-bubble-customer, .order-chat-bubble-delegate) .order-chat-bubble:not(.order-chat-bubble--voice-msg):not(.order-chat-bubble--store-receipt):not(.order-chat-bubble--map):not(.oc-album):has(> .order-chat-bubble-row > .order-chat-bubble-text):not(:has(.order-chat-bubble-media, .order-chat-bubble-total)) { margin-bottom: 0; padding-bottom: 8px; overflow: visible; transition: margin-bottom .2s var(--oc-ease, ease); }
#order-chat-modal :is(.order-chat-bubble-customer, .order-chat-bubble-delegate) .order-chat-bubble:not(.order-chat-bubble--voice-msg):not(.order-chat-bubble--store-receipt):not(.order-chat-bubble--map):not(.oc-album):has(> .order-chat-bubble-row > .order-chat-bubble-text):not(:has(.order-chat-bubble-media, .order-chat-bubble-total)).oc-time-on { margin-bottom: 17px; }
#order-chat-modal :is(.order-chat-bubble-customer, .order-chat-bubble-delegate) .order-chat-bubble:not(.order-chat-bubble--voice-msg):not(.order-chat-bubble--store-receipt):not(.order-chat-bubble--map):not(.oc-album):has(> .order-chat-bubble-row > .order-chat-bubble-text):not(:has(.order-chat-bubble-media, .order-chat-bubble-total)) .order-chat-bubble-time {
  position: absolute; top: 100%; left: 6px; right: auto; margin: 4px 0 0; padding: 0; white-space: nowrap; font-size: 11px; line-height: 1;
  color: #7d8b91 !important; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
/* it stays on the side the bubble's tail comes out of: left for incoming messages, right for your own */
#order-chat-modal .order-chat-bubble-customer .order-chat-bubble:not(.order-chat-bubble--voice-msg):not(.order-chat-bubble--store-receipt):not(.order-chat-bubble--map):not(.oc-album):has(> .order-chat-bubble-row > .order-chat-bubble-text):not(:has(.order-chat-bubble-media, .order-chat-bubble-total)) .order-chat-bubble-time { left: auto; right: 6px; }
#order-chat-modal :is(.order-chat-bubble-customer, .order-chat-bubble-delegate) .order-chat-bubble:not(.order-chat-bubble--voice-msg):not(.order-chat-bubble--store-receipt):not(.order-chat-bubble--map):not(.oc-album):has(> .order-chat-bubble-row > .order-chat-bubble-text):not(:has(.order-chat-bubble-media, .order-chat-bubble-total)).oc-time-on .order-chat-bubble-time { opacity: 1; transform: none; }
html.dark-mode #order-chat-modal :is(.order-chat-bubble-customer, .order-chat-bubble-delegate) .order-chat-bubble:not(.order-chat-bubble--voice-msg):not(.order-chat-bubble--store-receipt):not(.order-chat-bubble--map):not(.oc-album):has(> .order-chat-bubble-row > .order-chat-bubble-text):not(:has(.order-chat-bubble-media, .order-chat-bubble-total)) .order-chat-bubble-time { color: #9aa6ab !important; }
/* the delivery marks leave the teal bubble with the time: on the page's colour they take the usual tones again */
#order-chat-modal .order-chat-bubble-customer .order-chat-bubble:not(.order-chat-bubble--voice-msg):not(.order-chat-bubble--store-receipt):not(.order-chat-bubble--map):not(.oc-album):has(> .order-chat-bubble-row > .order-chat-bubble-text):not(:has(.order-chat-bubble-media, .order-chat-bubble-total)) .oc-tick[data-state="read"] { color: #30b6c5; }
#order-chat-modal .order-chat-bubble-customer .order-chat-bubble:not(.order-chat-bubble--voice-msg):not(.order-chat-bubble--store-receipt):not(.order-chat-bubble--map):not(.oc-album):has(> .order-chat-bubble-row > .order-chat-bubble-text):not(:has(.order-chat-bubble-media, .order-chat-bubble-total)) .oc-tick:not([data-state="read"]) { opacity: .8; }

/* ==========================================================================
   Order chat only: the header, the phone's status zone above it and the pinned line under it are one surface in
   one shade. The platform draws the header as glass (82% of the page colour, blurred) with a drop shadow: the
   shadow fell on the line under the header and made a darker band there (a grey one in light mode). The header
   takes the same solid colour as the zone above it (the overlay's own) and has no shadow; its hairline stays.
   ========================================================================== */
#order-chat-modal .order-chat-header-overlay .order-chat-modal-header {
  background: #fff !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
html.dark-mode #order-chat-modal .order-chat-header-overlay .order-chat-modal-header { background: var(--dm-bg, #26262e) !important; }

/* ==========================================================================
   Account hub: «المظهر» is a row of the hub's own list, and its control is the sun / moon mark of real Haatly's
   header button (not a slide switch): the moon shows while the page is light, the sun while it is dark. The mark
   sits where the other rows have their chevron.
   ========================================================================== */
#sf-home-tools-dialog .sf-hub-theme-toggle { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-inline-end: -5.5px; color: var(--hub-ink); }
#sf-home-tools-dialog .sf-hub-theme-toggle svg { width: 18px; height: 18px; display: block; }
#sf-home-tools-dialog .sf-hub-theme-toggle .sf-hub-theme-sun { display: none; }
html.dark-mode #sf-home-tools-dialog .sf-hub-theme-toggle .sf-hub-theme-sun, body.dark-mode #sf-home-tools-dialog .sf-hub-theme-toggle .sf-hub-theme-sun { display: block; }
html.dark-mode #sf-home-tools-dialog .sf-hub-theme-toggle .sf-hub-theme-moon, body.dark-mode #sf-home-tools-dialog .sf-hub-theme-toggle .sf-hub-theme-moon { display: none; }

/* ==========================================================================
   Shared-delivery window: «رحلات الطريق» as a third tab (storefront-polish.js adds the tab and its panel when the
   store has route trips on). While it is shown the other two panels and both footers are away; the panel uses the
   window's own colours (--ht-trip-*).
   ========================================================================== */
#sharedTripModal .ht-route-panel { display: none; }
#sharedTripModal[data-trip-mode="routes"] .ht-route-panel { display: block; padding: 14px 2px 18px; color: var(--ht-trip-ink, #203940); text-align: start; }
#sharedTripModal[data-trip-mode="routes"] #sharedTripInvite,
#sharedTripModal[data-trip-mode="routes"] #sharedTripSchedule,
#sharedTripModal[data-trip-mode="routes"] .shared-trip-modal-footer,
#sharedTripModal[data-trip-mode="routes"] .ht-trip-footer { display: none !important; }
/* three tabs share the bar evenly */
#sharedTripModal .shared-trip-modes-switch > .shared-trip-mode { flex: 1 1 0; min-width: 0; white-space: nowrap; }
#sharedTripModal .ht-route-head h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.6; color: var(--ht-trip-ink, #203940); }
#sharedTripModal .ht-route-head p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.8; color: var(--ht-trip-muted, #65767d); }
#sharedTripModal .ht-route-list { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
#sharedTripModal .ht-route-note { margin: 0; padding: 22px 14px; border-radius: 14px; background: var(--ht-trip-surface, #f5f7f8); color: var(--ht-trip-muted, #65767d); font-size: 13px; line-height: 1.8; text-align: center; }
#sharedTripModal .ht-route-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 14px; background: var(--ht-trip-surface, #f5f7f8); }
#sharedTripModal .ht-route-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#sharedTripModal .ht-route-name { font-size: 14.5px; font-weight: 700; line-height: 1.6; color: var(--ht-trip-ink, #203940); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sharedTripModal .ht-route-way { font-size: 12.5px; line-height: 1.7; color: var(--ht-trip-muted, #65767d); }
#sharedTripModal .ht-route-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; font-size: 12px; line-height: 1.7; color: var(--ht-trip-muted, #65767d); }
#sharedTripModal .ht-route-num { display: inline-block; unicode-bidi: isolate; font-variant-numeric: tabular-nums; color: var(--ht-trip-ink, #203940); }
#sharedTripModal .ht-route-price { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: end; }
#sharedTripModal .ht-route-price-label { font-size: 11px; line-height: 1.6; color: var(--ht-trip-muted, #65767d); }
#sharedTripModal .ht-route-price-max { font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--ht-trip-accent, #138697); font-variant-numeric: tabular-nums; }
#sharedTripModal .ht-route-price-full { font-size: 11px; line-height: 1.6; color: var(--ht-trip-muted, #65767d); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Shared-delivery window: the tab bar keeps one size in every tab. «مواعيد الطلب» narrows the window's side padding
   to 18px for its own layout, and the bar sat in that same padding: it grew when the tab was entered and shrank
   again when it was left (504px -> 524px on a 560px-wide window). The side padding is now one value in every tab,
   and the schedule panel alone reaches out to the 18px it was designed for.
   ========================================================================== */
#sharedTripModal.ht-trip-design { --ht-trip-side: clamp(18px, 5vw, 28px); }
#sharedTripModal.ht-trip-design .shared-trip-modal-body,
#sharedTripModal.ht-trip-design[data-trip-mode="schedule"] .shared-trip-modal-body { padding-inline: var(--ht-trip-side); }
#sharedTripModal.ht-trip-design[data-trip-mode="schedule"] #sharedTripSchedule { margin-inline: calc(18px - var(--ht-trip-side)); }

/* ==========================================================================
   Order card at the top of the chat: the total and the «تم تأكيد الطلب» line are the card's footer — two strips
   that run from edge to edge and follow the card's bottom corners (the user: «اجعلهم اسفل الكرت بشكل مرتب ممتد»,
   the second of three numbered candidates). The card's own padding is 10px 12px 12px inside a 1px border with an
   18px radius, so the strips reach out by 12px and the last one closes the card with a 17px radius. Before the
   customer confirms, the «تأكيد الطلب» button keeps its place under the total strip; with nothing under it, the
   total strip closes the card itself.
   ========================================================================== */
#order-chat-modal .order-chat-invoice-card .order-chat-invoice-total {
  margin: 12px -12px 0 !important; padding: 11px 16px !important;
  border: 0 !important; border-top: 1px solid var(--oc-line) !important; border-radius: 0 !important;
}
#order-chat-modal .order-chat-invoice-card .order-chat-invoice-total:last-child { margin-bottom: -12px !important; border-radius: 0 0 17px 17px !important; }
#order-chat-modal .order-chat-invoice-card .order-chat-invoice-confirmed {
  margin: 0 -12px -12px !important; padding: 8px 16px 9px !important;
  background: var(--oc-accent-soft); color: var(--oc-accent-deep) !important;
  font-size: 11px !important; font-weight: 700 !important; line-height: 1.4;
  border-top: 1px solid var(--oc-line); border-radius: 0 0 17px 17px;
}
html.dark-mode #order-chat-modal .order-chat-invoice-card .order-chat-invoice-confirmed { color: var(--oc-accent) !important; }

/* ==========================================================================
   Shared-delivery window, «على طريقك» tab: each trip's seats under its card — the customers' seats (people), then the
   delegate's (a car) — and beside them how many are left and whether a delegate is ready. In the window's own
   colours (--ht-trip-*), so night mode follows by itself: an empty seat is the window's colour with a faint icon, a
   taken one is in ink, the delegate's seat when he is ready — and every seat once the number is complete — in the brand.
   ========================================================================== */
#sharedTripModal .ht-route-card { flex-wrap: wrap; }
#sharedTripModal .ht-route-when { font-size: 12px; line-height: 1.7; color: var(--ht-trip-muted, #65767d); }
#sharedTripModal .ht-route-seats { flex: 0 0 100%; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#sharedTripModal .ht-route-seats-row { display: inline-flex; align-items: center; gap: 6px; flex: none; }
#sharedTripModal .ht-route-seats-row i { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--ht-trip-bg, #fff); color: var(--ht-trip-muted, #65767d); }
#sharedTripModal .ht-route-seats-row i svg { display: block; width: 17px; height: 17px; opacity: .42; }
#sharedTripModal .ht-route-seats-row i.is-car { width: 38px; border-radius: 11px; margin-inline-start: 8px; }
#sharedTripModal .ht-route-seats-row i.is-car svg { width: 19px; height: 19px; }
#sharedTripModal .ht-route-seats-row i.is-on { background: var(--ht-trip-ink, #203940); color: var(--ht-trip-bg, #fff); }
#sharedTripModal .ht-route-seats-row i.is-on svg { opacity: 1; }
#sharedTripModal .ht-route-seats-row i.is-car.is-on,
#sharedTripModal .ht-route-seats.is-full .ht-route-seats-row i { background: var(--ht-trip-brand, #30b6c5); color: #fff; }
#sharedTripModal .ht-route-seats[data-cap="4"] .ht-route-seats-row { gap: 5px; }
#sharedTripModal .ht-route-seats[data-cap="4"] .ht-route-seats-row i { width: 28px; height: 28px; }
#sharedTripModal .ht-route-seats[data-cap="4"] .ht-route-seats-row i.is-car { width: 34px; margin-inline-start: 6px; }
#sharedTripModal .ht-route-seats-say { min-width: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: end; }
#sharedTripModal .ht-route-seats-left { font-size: 13px; font-weight: 700; line-height: 1.6; color: var(--ht-trip-ink, #203940); white-space: nowrap; }
#sharedTripModal .ht-route-seats-driver { font-size: 11.5px; line-height: 1.6; color: var(--ht-trip-muted, #65767d); white-space: nowrap; }

/* ==========================================================================
   «على طريقك» tab: the plus on a trip's first empty seat (a press puts the customer's waiting order into the trip),
   the customer's own seat in the brand colour, and the line that says what a press was told.
   ========================================================================== */
#sharedTripModal .ht-route-seats-row i.is-plus { color: var(--ht-trip-brand, #30b6c5); }
#sharedTripModal .ht-route-seat-plus { display: grid; place-items: center; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: inherit; background: transparent; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; position: relative; }
#sharedTripModal .ht-route-seat-plus::after { content: ""; position: absolute; inset: -7px; }
#sharedTripModal .ht-route-seats-row i.is-plus svg { width: 16px; height: 16px; opacity: 1; }
#sharedTripModal .ht-route-seat-plus.is-busy { opacity: .45; pointer-events: none; }
#sharedTripModal .ht-route-seat-plus:focus-visible { outline: 2px solid var(--ht-trip-brand, #30b6c5); outline-offset: 2px; }
#sharedTripModal .ht-route-seats-row i.is-mine { background: var(--ht-trip-brand, #30b6c5); color: #fff; }
#sharedTripModal .ht-route-msg { flex: 0 0 100%; margin: 0; font-size: 12px; line-height: 1.7; color: var(--ht-trip-muted, #65767d); }
#sharedTripModal .ht-route-msg.is-warn { color: #d1344b; }
html.dark-mode #sharedTripModal .ht-route-msg.is-warn { color: #fb7185; }

/* ==========================================================================
   «على طريقك», the customer's seat (release 135).
   In the tab: «ترك المقعد», a quiet line under his trip's card.
   In the cart: while he holds a seat that waits for its cart, «اعتمد سلتي للرحلة» stands in the send button's place
   (the send buttons are hidden by the class on <html>), with which trip it is above it and a quiet way out below.
   One flat block, no outlines; the button is the send button's twin.
   ========================================================================== */
#sharedTripModal .ht-route-seat-leave { flex: 0 0 auto; margin: 0; padding: 2px 0; border: 0; background: transparent; color: var(--ht-trip-muted, #65767d); font: inherit; font-size: 12px; font-weight: 500; line-height: 1.7; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#sharedTripModal .ht-route-seat-leave.is-busy { opacity: .45; pointer-events: none; }
html.ht-oyw-waiting #order-telegram, html.ht-oyw-waiting #order-whatsapp, html.ht-oyw-waiting #cash_on_delivery, html.ht-oyw-waiting #bank_transfer { display: none !important; }
#htOnYourWayCart { display: block; margin: 0 0 28px; padding: 0; border: 0; background: transparent; direction: rtl; text-align: right; color: #203940; }
#htOnYourWayCart p { margin: 0; padding: 0; }
#htOnYourWayCart .ht-oyw-cart-trip { font-size: 14px; font-weight: 700; line-height: 1.7; color: inherit; }
#htOnYourWayCart .ht-oyw-cart-say { font-size: 12.5px; font-weight: 500; line-height: 1.8; color: #65767d; }
#htOnYourWayCart .ht-oyw-cart-go, #htOnYourWayCart .ht-oyw-cart-done { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; margin: 12px 0 0; padding: 8px 16px; border: 0; border-radius: 12px; background: var(--theme-color, #2cb4c4); color: #fff; font: inherit; font-size: 16px; font-weight: 600; line-height: 1.5; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#htOnYourWayCart .ht-oyw-cart-leave { display: block; margin: 8px auto 0; padding: 4px 10px; border: 0; background: transparent; color: #65767d; font: inherit; font-size: 12.5px; font-weight: 500; line-height: 1.7; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#htOnYourWayCart .is-busy { opacity: .55; pointer-events: none; }
#htOnYourWayCart .ht-oyw-cart-msg { margin: 10px 0 0; font-size: 13px; font-weight: 600; line-height: 1.8; color: inherit; }
#htOnYourWayCart .ht-oyw-cart-msg.is-warn { color: #d1344b; }
#htOnYourWayCart[data-done="1"] .ht-oyw-cart-msg { margin-top: 0; font-size: 14px; }
html.dark-mode #htOnYourWayCart { color: #f5f7f8; }
html.dark-mode #htOnYourWayCart .ht-oyw-cart-say, html.dark-mode #htOnYourWayCart .ht-oyw-cart-leave { color: #aebbc1; }
html.dark-mode #htOnYourWayCart .ht-oyw-cart-msg.is-warn { color: #fb7185; }

/* ==========================================================================
   «على طريقك», news of a handed-over cart (release 136): one line at the top of the page, said once — the trip
   completed and the order was sent, or the cart was given back. A filled pill in the page's ink, no outline; a tap
   puts it away.
   ========================================================================== */
#htOnYourWayNote { position: fixed; z-index: 2147483000; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); box-sizing: border-box; width: calc(100% - 24px); max-width: 420px; margin: 0; padding: 12px 16px; border: 0; border-radius: 16px; background: #203940; color: #fff; direction: rtl; text-align: right; font-size: 13.5px; font-weight: 600; line-height: 1.8; cursor: pointer; -webkit-tap-highlight-color: transparent; }
html.dark-mode #htOnYourWayNote { background: #f5f7f8; color: #203940; }

/* ==========================================================================
   «على طريقك», a customer starts a trip from his cart (release 138).
   Under the send button, a quiet filled button «ابدأ رحلة «على طريقك»»; a press opens, in place, what the trip costs
   him, its day and hour, and one button — the send button's twin. In the tab, one quiet line under a customer's
   trip says whether the visitor's own place is on its road. Filled surfaces, no outlines.
   ========================================================================== */
#sharedTripModal .ht-route-fit { flex: 0 0 100%; margin: 0; font-size: 12px; font-weight: 600; line-height: 1.7; color: var(--ht-trip-accent, #138697); }
#sharedTripModal .ht-route-fit.is-off { color: var(--ht-trip-muted, #65767d); font-weight: 500; }
html.ht-oyw-can-start body.cart-overlay-active .main-right-col .checkout-fields #order-telegram { margin-bottom: 0 !important; }
#htOnYourWayStart { display: block; margin: 10px 0 max(52px, calc(40px + env(safe-area-inset-bottom, 0px))); padding: 0; border: 0; background: transparent; direction: rtl; text-align: right; color: #203940; }
#htOnYourWayStart p { margin: 0; padding: 0; }
#htOnYourWayStart .ht-oyw-start-open { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; margin: 0; padding: 6px 16px; border: 0; border-radius: 12px; background: #f5f7f8; color: #203940; font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.5; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#htOnYourWayStart .ht-oyw-start-panel { margin: 12px 0 0; }
#htOnYourWayStart .ht-oyw-start-trip { font-size: 14px; font-weight: 700; line-height: 1.7; color: inherit; }
#htOnYourWayStart .ht-oyw-start-say { font-size: 12.5px; font-weight: 500; line-height: 1.8; color: #65767d; }
#htOnYourWayStart .ht-oyw-start-when { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; }
#htOnYourWayStart .ht-oyw-start-day { flex: 0 0 auto; min-width: 64px; height: 42px; margin: 0; padding: 0 14px; border: 0; border-radius: 12px; background: #f5f7f8; color: #203940; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#htOnYourWayStart .ht-oyw-start-day.is-on { background: var(--theme-color, #2cb4c4); color: #fff; }
/* the theme paints every field itself (in night mode with !important): this one is a filled surface like the two chips beside it */
#htOnYourWayStart .ht-oyw-start-time { flex: 1 1 auto; min-width: 0; height: 42px; margin: 0; padding: 0 12px; border: 0 !important; border-radius: 12px; outline: 0; box-shadow: none !important; background: #f5f7f8 !important; color: #203940 !important; font: inherit; font-size: 16px; font-weight: 600; text-align: center; direction: ltr; }
#htOnYourWayStart .ht-oyw-start-go, #htOnYourWayStart .ht-oyw-start-done { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; margin: 12px 0 0; padding: 8px 16px; border: 0; border-radius: 12px; background: var(--theme-color, #2cb4c4); color: #fff; font: inherit; font-size: 16px; font-weight: 600; line-height: 1.5; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#htOnYourWayStart .is-busy { opacity: .55; pointer-events: none; }
#htOnYourWayStart .ht-oyw-start-msg { margin: 10px 0 0; font-size: 13px; font-weight: 600; line-height: 1.8; color: inherit; }
#htOnYourWayStart .ht-oyw-start-msg.is-warn { color: #d1344b; }
#htOnYourWayStart[data-done="1"] .ht-oyw-start-msg { margin-top: 0; font-size: 14px; }
html.dark-mode #htOnYourWayStart { color: #f5f7f8; }
html.dark-mode #htOnYourWayStart .ht-oyw-start-open, html.dark-mode #htOnYourWayStart .ht-oyw-start-day { background: #30313b; color: #f5f7f8; }
html.dark-mode #htOnYourWayStart .ht-oyw-start-time { background: #30313b !important; color: #f5f7f8 !important; }
html.dark-mode #htOnYourWayStart .ht-oyw-start-day.is-on { background: var(--theme-color, #2cb4c4); color: #fff; }
html.dark-mode #htOnYourWayStart .ht-oyw-start-say { color: #aebbc1; }
html.dark-mode #htOnYourWayStart .ht-oyw-start-msg.is-warn { color: #fb7185; }

/* ==========================================================================
   «على طريقك», release 145: «أضف مبلغًا» — a customer whose cart is with his seat adds money that brings the trip's
   empty seats down. A filled pill on the card's ground; a press opens one filled row in its place: the amount, the
   send button (the plus's brand colour) and one line that says what the money does. No outlines; night mode by the
   window's own colours.
   ========================================================================== */
#sharedTripModal .ht-route-extra-open { flex: 0 0 auto; margin: 0; padding: 7px 12px; border: 0; border-radius: 10px; background: var(--ht-trip-bg, #fff); color: var(--ht-trip-ink, #203940); font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.6; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#sharedTripModal .ht-route-extra { flex: 0 0 100%; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
#sharedTripModal .ht-route-extra-field { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; border-radius: 12px; background: var(--ht-trip-bg, #fff); }
#sharedTripModal .ht-route-extra-amount { flex: 1 1 0; min-width: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0 !important; border-radius: 0; outline: 0; box-shadow: none !important; background: transparent !important; color: var(--ht-trip-ink, #203940) !important; -webkit-text-fill-color: var(--ht-trip-ink, #203940); font: inherit; font-size: 16px; font-weight: 600; line-height: 1.4; text-align: start; font-variant-numeric: tabular-nums; -webkit-appearance: none; appearance: none; }
#sharedTripModal .ht-route-extra-amount::placeholder { color: var(--ht-trip-muted, #65767d); -webkit-text-fill-color: var(--ht-trip-muted, #65767d); font-weight: 500; opacity: .85; }
#sharedTripModal .ht-route-extra-unit { flex: none; font-size: 12.5px; line-height: 1.6; color: var(--ht-trip-muted, #65767d); }
#sharedTripModal .ht-route-extra-go { flex: none; height: 44px; margin: 0; padding: 0 20px; border: 0; border-radius: 12px; background: var(--ht-trip-brand, #30b6c5); color: #fff; font: inherit; font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#sharedTripModal .ht-route-extra-go.is-busy, #sharedTripModal .ht-route-extra-open.is-busy { opacity: .45; pointer-events: none; }
#sharedTripModal .ht-route-extra-hint { flex: 0 0 100%; margin: 0; padding: 0; font-size: 12px; line-height: 1.7; color: var(--ht-trip-muted, #65767d); }
#sharedTripModal .ht-route-extra-hint.is-warn { color: #d1344b; }
#sharedTripModal .ht-route-extra + .ht-route-seat-leave, #sharedTripModal .ht-route-extra-open + .ht-route-seat-leave { margin-inline-start: auto; }   /* «ترك المقعد» stays at the far side, whether the pill or its row stands before it */
html.dark-mode #sharedTripModal .ht-route-extra-hint.is-warn { color: #fb7185; }

/* ==========================================================================
   «على طريقك», the seats of a trip a customer starts (release 146).
   In the cart's «ابدأ رحلة» panel, above the day and hour: two filled chips sharing the row — «3 مقاعد» and «مقعدان» —
   in the day chips' own look; the chosen one takes the store's colour and the price line above follows it.
   ========================================================================== */
#htOnYourWayStart .ht-oyw-start-seats { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; }
#htOnYourWayStart .ht-oyw-start-seat { flex: 1 1 0; min-width: 0; height: 42px; margin: 0; padding: 0 14px; border: 0; border-radius: 12px; background: #f5f7f8; color: #203940; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#htOnYourWayStart .ht-oyw-start-seat.is-on { background: var(--theme-color, #2cb4c4); color: #fff; }
html.dark-mode #htOnYourWayStart .ht-oyw-start-seat { background: #30313b; color: #f5f7f8; }
html.dark-mode #htOnYourWayStart .ht-oyw-start-seat.is-on { background: var(--theme-color, #2cb4c4); color: #fff; }
