/* The blue endpoints and paper are sampled from the approved opening masters. */
:root {
  --identity-blue: #0836c4;
  --identity-blue-high: #6384da;
  --identity-paper: #f0e9dd;
  --identity-card: #f9f4e9;
  --identity-stone: #f5efe5;
  --identity-control: #e8dfd0;
  --identity-line: #d6ccbc;
  --identity-brown: #4c3a2a;
  --identity-on-blue: #fcf7ef;
  --identity-blue-pressed: color-mix(in srgb,var(--identity-blue) 80%,#10192f);
  --identity-blue-tint: color-mix(in srgb,var(--identity-blue) 9%,var(--identity-card));
}

/* Majal uses the same materials throughout the provider workspace. */
html[data-majal-app] #ab2.hy[data-w=p] {
  --majal-ground: var(--identity-paper);
  --majal-card: var(--identity-card);
  --majal-inset: var(--identity-control);
  --majal-line: var(--identity-line);
  --majal-seen: var(--identity-stone);
  --majal-ink: #242821;
  --majal-secondary: var(--identity-brown);
  --majal-muted: #65584a;
  --majal-field-rim: #897866;
  --majal-blue: var(--identity-blue);
  --majal-blue-pressed: var(--identity-blue-pressed);
  --majal-blue-ink: var(--identity-blue);
  --majal-blue-tint: var(--identity-blue-tint);
  --majal-on-blue: var(--identity-on-blue);
  --h-g: var(--majal-ground);
  --h-s: var(--majal-card);
  --h-s2: var(--majal-inset);
  --h-hl: var(--majal-line);
  --h-hl2: var(--majal-seen);
  --h-i: var(--majal-ink);
  --h-i2: var(--majal-secondary);
  --h-i3: var(--majal-muted);
  --h-fe: var(--majal-field-rim);
  --h-ac: var(--majal-blue);
  --h-ac-d: var(--majal-blue-pressed);
  --h-ac-i: var(--majal-blue-ink);
  --h-ac-on: var(--majal-on-blue);
  --h-ac-t: var(--majal-blue-tint);
  --h-ac-ts: var(--majal-blue-tint);
  --h-brand: var(--identity-blue);
  --h-sig: var(--majal-blue-ink);
  --h-sig-t: var(--majal-blue-tint);
  --h-sel: var(--majal-blue-tint);
  --h-sel-i: var(--majal-blue-ink);
  --h-off: var(--majal-line);
  --h-veil: color-mix(in srgb,var(--majal-ground) 62%,transparent);
  --rw-go-sh: 0 8px 18px -8px color-mix(in srgb,var(--majal-blue) 50%,transparent);
  --bg: var(--majal-ground);
  --side: var(--majal-seen);
  --surf: var(--majal-card);
  --well: var(--majal-inset);
  --line: var(--majal-line);
  --line2: var(--majal-line);
  --fld-rim: var(--majal-field-rim);
  --ink: var(--majal-ink);
  --ink2: var(--majal-secondary);
  --ink3: var(--majal-muted);
  --ph: var(--majal-muted);
  --btn: var(--majal-blue);
  --btn-d: var(--majal-blue-pressed);
  --btn-ink: var(--majal-on-blue);
  --acc: var(--majal-blue-ink);
  --acc-ink: var(--majal-blue-ink);
  --acc-d: var(--majal-blue-pressed);
  --acc-t: var(--majal-blue-tint);
  --acc-tt: color-mix(in srgb,var(--majal-blue) 22%,var(--majal-card));
  --focus-edge: var(--majal-blue-ink);
  --focus-line: inset 0 0 0 1.5px var(--majal-blue-ink);
  --focus-halo: 0 0 0 3px var(--majal-blue-tint);
  --sel: var(--majal-blue-tint);
  --sel-ink: var(--majal-blue-ink);
  --sel-rim: color-mix(in srgb,var(--majal-blue) 40%,var(--majal-card));
}

html[data-majal-app] #ab2.hy[data-w=p][data-th="داكن"] {
  --majal-ground: #211c18;
  --majal-card: #2d2520;
  --majal-inset: #382e27;
  --majal-line: #4c4035;
  --majal-seen: #29221d;
  --majal-ink: var(--identity-paper);
  --majal-secondary: #d9cbb9;
  --majal-muted: #c6b59f;
  --majal-field-rim: #93806d;
  /* Lift the source blue for dark stone and use dark ink on filled actions. */
  --majal-blue: color-mix(in srgb,var(--identity-blue-high) 72%,var(--identity-card));
  --majal-blue-pressed: color-mix(in srgb,var(--identity-blue-high) 53%,var(--identity-card));
  --majal-blue-ink: color-mix(in srgb,var(--identity-blue-high) 48%,var(--identity-card));
  --majal-blue-tint: color-mix(in srgb,var(--identity-blue-high) 19%,var(--majal-card));
  --majal-on-blue: #10192f;
}

html[data-majal-app] #ab2.hy[data-w=p][data-th="داكن"] .inb__list .h-irow {
  background-image: linear-gradient(var(--majal-inset),var(--majal-card));
}
html[data-majal-app] #ab2.hy[data-w=p] .pv.hy-pv--pin {
  --st-t1: color-mix(in srgb,var(--h-g) 97%,transparent);
  --st-t2: color-mix(in srgb,var(--h-g) 74%,transparent);
}
/* The light workspace uses stone for the header tint over scrolling content. */
html[data-majal-app] #ab2.hy[data-w=p][data-th="فاتح"] .pv.hy-pv--pin {
  --st-t1: color-mix(in srgb,var(--majal-seen) 97%,transparent);
  --st-tm: color-mix(in srgb,var(--majal-seen) 90%,transparent);
  --st-t2: color-mix(in srgb,var(--majal-seen) 74%,transparent);
  --st-t3: color-mix(in srgb,var(--majal-seen) 40%,transparent);
}
html[data-majal-app] #ab2.hy[data-w=p][data-th="فاتح"] .pv.hy-pv--pin .pv__hd {
  --edge-top-tint: var(--majal-seen);
}
/* The request header also has a second blur layer. Tint it where it covers
   the underlying card, while its existing mask softens the lower edge. */
html[data-majal-app] #ab2.hy[data-w=p][data-th="فاتح"] .pdw > .hd.h-nav::after {
  background: color-mix(in srgb,var(--majal-seen) 85%,transparent) !important;
}
/* Light settings use the lighter stone under their translucent header. */
html[data-majal-app] #ab2.hy[data-w=p][data-th="فاتح"] .pg.hy-st > .h-mhead {
  --st-t1: color-mix(in srgb,var(--majal-seen) 97%,transparent);
  --st-tm: color-mix(in srgb,var(--majal-seen) 90%,transparent);
  --st-t2: color-mix(in srgb,var(--majal-seen) 74%,transparent);
  --st-t3: color-mix(in srgb,var(--majal-seen) 40%,transparent);
}
html[data-majal-app] #ab2.hy[data-w=p] .pv.hy-pv--pin .h-roombar.h-bxrow1 > :is(.h-srchfab,.h-bxfilt) {
  background: var(--h-s2); color: var(--h-i2); box-shadow: none;
}
html[data-majal-app] #ab2.hy[data-w=p] .pv.hy-pv--pin .h-roombar.h-bxrow1 > :is(.h-srchfab,.h-bxfilt):active {
  background: var(--h-hl);
}
/* (2026-11-29, owner: «فلاتر عروضي خلها بنفس لون الفلاتر المعتمدة بطلبات العملاء … الوان واحجام … وتتحول من فاتح حجري لحجري من
   هويتنا او ازرق») One filter family in every room: the «عروضي» chips wear the inbox pills — the same stone, the same 44
   height, no hairline, no glass — and the chosen one turns identity blue. A chip with nothing behind it stays quiet. */
html[data-majal-app] #ab2.hy[data-w=p] .inb__list > .h-roombar:is(.h-ofrow,.h-bxfrow) .h-filchips > .h-chip.h-lg,
html[data-majal-app] #ab2.hy[data-w=p][data-th="داكن"] .inb__list > .h-roombar:is(.h-ofrow,.h-bxfrow) .h-filchips > .h-chip.h-lg {
  box-sizing: border-box; min-height: max(44px, calc(44px * var(--ui))); border: 0; border-radius: 12px;
  background: var(--h-s2); color: var(--h-i2); box-shadow: none; font-weight: 600;
}
html[data-majal-app] #ab2.hy[data-w=p] .inb__list > .h-roombar:is(.h-ofrow,.h-bxfrow) .h-filchips > .h-chip.h-lg:not(.h-on):active { background: var(--h-hl); }
html[data-majal-app] #ab2.hy[data-w=p] .inb__list > .h-roombar.h-ofrow .h-filchips > .h-chip.h-lg.h-on,
html[data-majal-app] #ab2.hy[data-w=p][data-th="داكن"] .inb__list > .h-roombar.h-ofrow .h-filchips > .h-chip.h-lg.h-on {
  background: var(--majal-blue); color: var(--majal-on-blue);
}
/* (BX-CHIPS، ٢٠٢٦-١١-٣٠ — حكمُ المشرف على الفيلم) والمرشِّحاتُ المطبَّقةُ في «طلبات العملاء» تلبس ظلَّ الهويّة الخفيف بحبرها لا الأزرقَ الممتلئ — فلا تثقل بجوار زرَّي العدسة والتصفية الحجريّين. ✕ بحبر الرقاقة نفسِه. */
html[data-majal-app] #ab2.hy[data-w=p] .inb__list > .h-roombar.h-bxfrow .h-filchips > .h-chip.h-lg.h-on,
html[data-majal-app] #ab2.hy[data-w=p][data-th="داكن"] .inb__list > .h-roombar.h-bxfrow .h-filchips > .h-chip.h-lg.h-on {
  background: var(--majal-blue-tint); color: var(--majal-blue-ink); box-shadow: none;
}
html[data-majal-app] #ab2.hy[data-w=p] .inb__list > .h-roombar:is(.h-ofrow,.h-bxfrow) .h-filchips > .h-chip.h-lg.h-on .h-cnt { color: inherit; opacity: .82; }
html[data-majal-app] #ab2.hy[data-w=p] .inb__list > .h-roombar:is(.h-ofrow,.h-bxfrow) .h-filchips > .h-chip.h-lg.h-chip--0:not(.h-on) { color: var(--h-i3); }
html[data-majal-app] #ab2.hy[data-w=p] .pv.hy-pv--pin .inb__list .h-irow--ag:not(.h-fresh,.h-cur,.h-news,.h-dimrow) {
  background: var(--majal-seen); border-color: transparent;
}
html[data-majal-app] #ab2.hy[data-w=p] .pv.hy-pv--pin .h-irow--ag .h-bxc__go:not(.h-bxc__go--nu) {
  background: var(--h-s2); color: var(--h-i2); box-shadow: none;
}
html[data-majal-app]:not([data-lqg="h"]) #ab2.hy[data-w=p] nav.dk > [data-biz-dock] {
  --dk-lens: var(--majal-inset);
}
html[data-majal-app] #ab2.hy[data-w=p] :is(
  .dk__b.on, .h-seg > button.h-on,
  .h-biztabs[role="tablist"] .h-biztabs__b.h-on
) {
  color: var(--majal-blue-ink);
}
html[data-majal-app] #ab2.hy[data-w=p] .h-bizname > svg.h-bizname__chev {
  color: var(--majal-blue-ink) !important; /* The masthead sets direct SVG ink with !important. */
}
html[data-majal-app] #ab2.hy[data-w=p] .h-tok.h-tok--off {
  background: var(--majal-blue); color: var(--majal-on-blue);
}
html[data-majal-app] #ab2.hy[data-w=p] .h-biztabs[role="tablist"][data-ink] .h-biztabs__t:not([data-empty]) {
  background-image: linear-gradient(90deg,var(--bz-off,var(--h-i2)) var(--ia,0px),var(--majal-blue-ink) var(--ia,0px),var(--majal-blue-ink) var(--ib,0px),var(--bz-off,var(--h-i2)) var(--ib,0px));
}
html[data-majal-app] #ab2.hy[data-w=p] .h-biztabs[role="tablist"][data-ink] .h-biztabs__t[data-empty]::after {
  -webkit-text-fill-color: var(--majal-blue-ink);
}
html[data-majal-app] #ab2.hy[data-w=p][data-th="داكن"] .h-sw.h-on::after {
  background: var(--majal-on-blue);
}
html[data-majal-app][data-kbnav="1"] #ab2.hy[data-w=p] :where(button,[href],[role=tab]):focus-visible {
  outline-color: var(--majal-blue-ink);
}

/* The store name and welcome need more room together past the in-app text sizes. */
html[data-majal-app][data-lay="stack"] #ab2.hy[data-w=p] .h-majal-hd {
  --majal-header-growth: max(0px,calc((var(--zf) - 1.3) * 22px));
  --majal-switcher-height: max(var(--h-header-control-size),calc(44px * var(--zf) + var(--majal-header-growth)));
}
html[data-majal-app][data-lay="stack"] #ab2.hy[data-w=p] .h-majal-hd > .h-bizbar {
  height: max(calc(56px * var(--ui)),calc(var(--majal-switcher-height) + 12px * var(--ui)));
}
html[data-majal-app][data-lay="stack"] #ab2.hy[data-w=p] .h-majal-hd .h-bizbar > .h-bizname {
  height: var(--majal-switcher-height);
}
html[data-majal-app][data-lay="stack"] #ab2.hy[data-w=p] .h-majal-hd > .h-bizline {
  margin-block-start: calc(-4px * var(--ui) + var(--majal-header-growth) * .35);
}

html[data-majal-app][data-lay="stack"]:not([data-ndock]) #ab2.hy[data-w=p] nav.dk {
  container: majal-dock / inline-size;
  font-size: calc(11px * var(--zf));
}
html[data-majal-app][data-lay="stack"] #ab2.hy[data-w=p] nav.dk > [data-biz-dock] {
  height: auto;
  min-height: max(48px,calc(49px * var(--ui)));
}
html[data-majal-app][data-lay="stack"] #ab2.hy[data-w=p] nav.dk > [data-biz-dock] .dk__t {
  width: 100%; max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; text-wrap: balance;
}
html[data-majal-app][data-lay="stack"] #ab2.hy[data-w=p] nav.dk > [data-biz-dock] .dk__t[data-empty]::before,
html[data-majal-app][data-lay="stack"] #ab2.hy[data-w=p] nav.dk > [data-biz-dock] .dk__t[data-empty]::after {
  white-space: inherit; overflow-wrap: inherit; text-wrap: inherit;
}

/* At large text sizes the labels reflow with their dock buttons. */
@container majal-dock (max-width: 16.6em) {
  html[data-majal-app][data-lay="stack"] #ab2.hy[data-w=p] nav.dk > [data-biz-dock] {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  html[data-majal-app][data-lay="stack"] #ab2.hy[data-w=p] nav.dk > [data-biz-dock] > .dk__b {
    padding-block: calc(4px * var(--ui));
  }
  html[data-majal-app][data-lay="stack"] #ab2.hy[data-w=p] nav.dk > [data-biz-dock] > .dk__b.on {
    background: var(--dk-lens);
  }
  html[data-majal-app][data-lay="stack"] #ab2.hy[data-w=p] nav.dk > [data-biz-dock] > .h-tbar {
    visibility: hidden;
  }
}

html[data-majal-app][data-lay="stack"] #ab2.hy[data-w=p] .h-irow--ag {
  container: majal-request / inline-size;
}
@container majal-request (max-width: 12em) {
  html[data-majal-app] #ab2.hy[data-w=p] .h-irow--ag .h-bxc__end {
    display: grid;
    grid-template-columns: minmax(0,1fr);
  }
  html[data-majal-app] #ab2.hy[data-w=p] .h-irow--ag .h-bxc__go {
    min-height: max(44px,calc(44px * var(--ui)));
  }
}

/* Majal request and account headers paint the same light glass at the safe-area edge. */
html[data-majal-app] #ab2.hy[data-w=p][data-th="فاتح"] .pdw > .hd.h-nav,
html[data-majal-app] #ab2.hy[data-w=p][data-th="فاتح"] .pg.hy-st > .h-mhead {
  --edge-top-tint: var(--majal-seen);
}

/* Keep the activity switcher's lifted shadow above the lower safe-area row. */
html[data-majal-app][data-lay="stack"] #ab2.hy[data-th="فاتح"] .md--stores > .md__c {
  box-shadow: 0 -8px 32px -12px rgb(16 24 40 / 14%);
}

/* (2026-11-29, owner on his iPhone: «في مجال اقتطاعة هنا بالتنبيه ذا») The pinned filter row under the inbox's notify card
   pulls itself up (margin-top:-8px under data-lqg) and paints an 8px ground band above itself, covering 16px of the card's
   bottom edge. After that card the row keeps a real gap, deeper than its band. */
html #ab2.hy .inb__list > .h-notify + .h-intbar.h-roombar { margin-top: calc(16px * var(--ui)); }

/* (2026-11-30, owner: «بدج كل الطلبات بالفلتر مقصوص… البدج يحتوي على كل الكلمة عادي طوله شوي») A filter chip never shrinks
   to fit the strip: it keeps its whole label and the strip scrolls sideways instead. */
html[data-majal-app] #ab2.hy .h-filchips > .h-chip.h-bxchip { flex: 0 0 auto; max-width: none; }
html[data-majal-app] #ab2.hy .h-bxchip__l { overflow: visible; text-overflow: clip; }
