/* ============================================================================
   YOUR LAUNDRY CHROME OVERRIDES
   ----------------------------------------------------------------------------
   Your Laundry-branded recolour of the two fixed controls every page carries,
   for yourlaundry.ae only: the back-to-top tile and the assistant launcher and
   its panel head.

   WHY A SEPARATE FILE AND NOT ANOTHER BLOCK IN laundry-theme.css: the theme
   layer loads BEFORE sdeira-search.css / sdeira-assistant.css /
   sdeira-nav-controls.css (see scripts/generate_pages.py::head()), so an
   equal-specificity override there loses on source order to the shared sheet
   that sets the group's colours. This file loads after all of them, so a plain
   selector wins by order alone - no !important, no specificity gymnastics.

   WHY THESE CANNOT BE DONE BY REASSIGNING THE ROLE TOKENS OR THE --brand-*
   PRIMITIVES: the launcher and the message avatar paint the official Sdeira
   emblem artwork (images/brand/sdeira-emblem-fullcolour.svg), and a group
   --brand-* primitive may never be redefined by a brand mode. So the mark is
   swapped here for this company's own emblem, which is what Khadamat's chrome
   sheet does for the same two elements and the same reason. The main
   sdeiragroup.ae site never links this file, so its own launcher is untouched.

   Colours are the Your Laundry brand primitives from sdeira-tokens.css, reused
   rather than re-declared: Deep Tide (#26347C), Clean Current (#3F68BE) and
   Linen (#E5E4E3), the last as --laundry-focus-on-dark and the footer heading
   tone.
   ========================================================================== */

/* ---- Back-to-top: neutral at rest, brand blue on interaction ------------- */
/* ONLY THE TWO INTERACTIVE STATES ARE DECLARED. The rest state used to be
   restated here as well, down to the shared sheet's own rgba(65, 64, 66, .55)
   literal - a third copy of a value sdeira-subpage.css already states and
   which this brand does not change. Rest is the shared sheet's. Same lifecycle
   every other icon-tile control on the site uses: rest is neutral, interaction
   carries the brand. */
.scroll-top:is(:hover, :focus-visible) {
  background: var(--brand-laundry-fresh-mist);
  color: var(--brand-white);
  opacity: 1;
}

/* ---- Assistant launcher -------------------------------------------------- */
/* The launcher button is white at rest. Its glyph colour was the group's
   Sweihan orange; here it is the brand's deep tone, and the mark inside it is
   the company's own emblem rather than the group's - the same "whose assistant
   is this" argument the panel head below answers. */
.ai-chat-toggle,
.ai-chat-toggle:is(:hover, :focus-visible) {
  color: var(--brand-laundry-fresh-mist);
}

/* THE EMBLEM FILE DIRECTLY, NOT A MASK, NO GLOW - the treatment
   sdeira-assistant.css already retired site-wide for the group's own mark.
   THE ARTWORK IS THE CLIENT'S OWN FILE AT ITS OWN VALUE, AND THAT VALUE IS NOT
   THE TOKEN. Every supplied emblem file paints the disc in #6DB6DA, while the
   guide's page 17 prints Fresh Mist as #89B3D3 for digital - so the disc and
   the marks around it are two neighbouring blues, not one. That is the client's
   artwork rather than a colour decision this repo made, and the artwork is not
   recoloured here: an identity mark drawn in the supplied file is what the
   brand pack is for. It is recorded because a later reader will measure the
   difference. */
.ai-star-field::before,
.ai-message-avatar::before {
  background: url("../images/brand/your-laundry-mark.svg?v=db16679c6c24fc1d") center / contain no-repeat;
  -webkit-mask: none;
  mask: none;
  filter: none;
}

/* The five orbiting sparks belong to the group mark's treatment and are not
   this company's. The launcher keeps the emblem alone. */
.ai-brand-star {
  display: none;
}

/* ---- The header logo ------------------------------------------------------ */
/* RESTATED HERE BECAUSE TWO SHARED RULES UNDERSIZED IT, and neither could be
   corrected from laundry-theme.css, which loads before the sheets declaring them.

   `#hd #navLogo { height: var(--logo-h) }` and `#hd { --logo-h: ... }` live in
   sdeira-nav-controls.css at two ids of specificity, so while this brand had no
   rule of its own the group's value won and its own token never reached the DOM.
   `#navLogo { max-width: 180px }` in sdeira-subpage.css was the binding cap: it
   drew the supplied lockup 68% narrower than its own height asked for, with the
   "By Sdeira Group" subline at roughly 5px. That cap exists for the group's mark
   and is released here so this brand's lockup renders at its own width.

   THE HEIGHT IS THREE SIZES AND NOT THE GROUP'S ONE, because the group's 64px
   cannot fit this lockup beside this navigation. The arithmetic is in the block
   below, and check_laundry_site.cjs asserts the clearance. */
#hd,
#hd.scrolled {
  --logo-h: var(--laundry-logo-height);
}
#hd #navLogo,
#hd .menu-logo img {
  height: var(--laundry-logo-height);
}
/* THE MAX-WIDTH CAP IS RELEASED ONLY WHERE IT WOULD SQUASH THE MARK, and leaving
   it released everywhere cost the mobile menu. sdeira-subpage.css caps #navLogo at
   180px from 981px up and at `min(42vw, 158px)` / `min(39vw, 146px)` at 560px and
   420px down. Those narrow tiers are not decoration: they are what keeps the row's
   burger inside the viewport. Measured at 320px, the four sibling sites all hold
   a fully visible 44px burger with their logo capped to 125px; this brand's
   lockup was rendering at its own 189px, which put the burger at x321-365 in a
   320px viewport - entirely outside it, and `html { overflow-x: hidden }` means
   it could not be scrolled to either. So the cap is released from 481px up, where
   the lockup is 266px or 360px and the row has the number checked below, and left
   alone below that, where the shared tiers do their job. */
@media (min-width: 481px) {
  #hd #navLogo,
  #hd .menu-logo img {
    max-width: none;
    width: auto;
    object-fit: contain;
  }
}

/* THE MENU'S OWN GAP, ONE STEP DOWN, BECAUSE THIS MARK LEAVES IT NO ROOM.
   Bootstrapped measurement at 1281px: #hd .menu's box is 636px and its six items
   span 652px, so 16px of them sit outside it; at 1920 the box is 655px against
   661px. `justify-content: center` bleeds that symmetrically, so the visible
   gutter between the lockup and "About Us" is whatever is left rather than the
   declared gap - which is why the clearance reads 15-19px where the siblings
   read 92-188px. The five inter-item gaps are the only slack this row has: at the
   shared clamp (12-20px) they cost up to 100px, and 12px costs 60px, which clears
   both overflows with room. The four siblings keep the shared value; their
   lockups are 0.86:1 to 2.81:1 and leave the menu 765-881px. */
html[data-brand="laundry"] #hd .menu {
  gap: 12px;
}
/* THIS BRAND'S LOGO IS NOT THE GROUP'S 64px, AND THE ARITHMETIC SAYS WHY.
   The shared rule (sdeira-nav-controls.css, 18 Sep 2026) is one fixed 64px nav
   logo on all five sites, and it is right for the other four: their lockups run
   0.86:1 to 2.81:1 and draw 55px to 180px of the header row at that height.
   This brand's supplied lockup is 8.571:1, so 64px draws 549px. The same row must
   also carry the six navigation items, which need 654px, and the icon controls,
   which need 213px:
     549 + 654 + 213 + 36 of gaps = 1452px, against a row that is 1280px.
   That is 172px short, and no viewport closes it, because the row stops widening
   at 1280px - the header's own max width, not the screen's. So 64px is not
   available to this mark at any width.

   WHAT IS LEFT IS THE GUIDE'S OWN HEADER, WHICH IS ALSO WHAT THE OWNER ASKED FOR.
   Page 47 draws this site's header and the lockup inside it at about 262x31px;
   31px is the height every width from 481px up now uses, and the clearance below
   is the box gap from the lockup's right edge to whatever starts first beside it,
   read from getBoundingClientRect:
     >= 481px  31px -> 266px wide, measured 30-86px of clearance
     <= 480px  22px -> the shared cap applies, 146-158px wide, 10px at 390
   check_laundry_site.cjs asserts an 8px floor at every width, that the file
   selected is the supplied lockup, and that object-fit is contain so a cap
   letterboxes rather than stretches. */
html[data-brand="laundry"] #hd > .nav {
  /* THE GUIDE'S CLEAR SPACE IS 4.0mm / 15px, ALL SIDES (page 11), and "whenever
     the layout allows it should be increased". The bar's own padding is a 6-8px
     slimming, which held the lockup 6-8px off the pill's edge - less than the
     rule, with the artwork itself carrying no internal margin to make up the
     difference (its ink reaches x=0 and x=2399). Vertically the space is already
     larger than 15px, because the lockup is centred in a 56-96px bar. */
  padding-inline: 15px;
}

@media (max-width: 480px) {
  #hd,
  #hd.scrolled {
    --logo-h: var(--laundry-logo-height-mobile);
  }
  #hd #navLogo,
  #hd .menu-logo img {
    height: var(--laundry-logo-height-mobile);
  }
}

/* ---- The drawer's close control, on a light drawer --------------------- */
/* SAME DEFECT, AND THE SAME CORRECTION, that khadamat-theme.css already makes
   three times (its .lang hover, its .nav-search/.burger hover, and its
   row-list arrow): this brand maps --accent-text to White, because that role is
   the ink for a SOLID accent fill. The shared rule the drawer's X reads -
   .menu-close:is(:hover, :focus-visible) in sdeira-nav-controls.css - pairs it
   with --accent-wash, which is a 12% tint over a WHITE drawer panel, so the
   glyph is painted white on nearly white: measured 1.09:1, invisible. It is not
   only a hover state: :focus-visible is in the same selector list, so a
   keyboard user loses the X the moment it takes focus.
   --accent-strong is the token the repo uses for small marks on a light ground,
   and it is what the other three cases above already reach for. Deep Tide on
   this brand, 10.35:1 on the wash against the 1.09:1 it replaces.
   DECLARED HERE AND NOT IN THE SHARED SHEET, deliberately: sdeira-nav-controls
   .css states its own contract in as many words - it "declares only this
   family - it cannot reach anything else" and loads last on purpose so that a
   page CANNOT tune it - so the correction belongs in the brand layer that
   exists to reconcile a brand's roles with the shared components. This file
   loads after that one, so a plain selector wins on order alone.
   NOTE FOR THE OTHER THREE: Khadamat, Zoad and Eskan each fix other members of
   this pair in their own theme sheets and none of them fixes this one, so the
   drawer's X is invisible on all four brand sites. It is not this site's to
   change, and it is reported rather than patched here. */
.menu-close:is(:hover, :focus-visible) {
  color: var(--accent-strong);
  background-color: var(--accent-wash);
}

/* ---- Panel head: the group's Black bar -> the brand's own deep tone ------ */
/* Closed, the launcher is branded; open, the panel head was still the group's
   identity twice over: a Black ground and the Sdeira wordmark. The ground is
   regrounded on the guide's Fresh Mist (#89B3D3), the brand's main accent
   (owner, 19 Oct 2026: the Deep Tide head read as a colour outside the brand).
   THE LOGO IS NOT SWAPPED HERE. It used to be, with `content: url(...)`, and
   that is a browser-only trick applied from a stylesheet; the mark now comes
   from partials/assistant-en.html through scripts/assistant.py's own brand
   table, which is where Zoad's mark has always come from and where the alt
   text and the intrinsic size are rewritten with it. One mechanism, not two. */
.ai-chat-head {
  background: var(--brand-laundry-fresh-mist);
}
