/*
 * Shared additive chrome for the legacy /en/help landing and search pages.
 * Both pages share one Vue skin (data-v-62eab134), so they share one theme
 * layer; each file links this sheet with an absolute href.
 *
 * Sources of truth: the main site's navy token #0f0b23, its logo asset
 * /hummix-logo-orange.png, and its navbar clip-box technique — a 120x44
 * (desktop) / 100x37 (mobile) box that over-renders the PNG by 125% x
 * 119.68% to cancel the asset's internal padding, i.e. background-size
 * 150px x 52.7px (mobile 125px x 44.3px) shifted by the negative offsets
 * below.
 *
 * Everything here is additive: shared utility classes (.bg-blue, .bg-white)
 * are never redefined, because other elements on other pages reuse them.
 * All behaviour survives the legacy bundle's client-side re-renders without
 * scripts — the logo box lives on the anchor and every <img> inside it is
 * hidden by CSS, so hydration can swap the markup underneath freely.
 */

/* --- Navbar + mobile drawer bar: the main site's navy --- */
header div.bg-blue {
  background-color: #0f0b23;
}
aside div.bg-white[class*="h-[72px]"] {
  background-color: #0f0b23;
}

/* --- Drawer close control: black X is invisible on navy; flip it white --- */
aside div[class*="h-[72px]"] svg rect {
  fill: #fff;
  stroke: #fff;
}

/* --- Navbar logo: paint the orange mark on the anchor itself ---
   The box dimensions carry !important because the skin ships a scoped
   `.logo-link-ru[data-v] { width: auto }` rule inside a media query that
   would otherwise collapse the flex-item anchor to zero width. Display
   stays low-specificity (:where) so the skin's display utilities
   (max-md:hidden / md:hidden) keep picking which variant shows. */
header :where(a.logo-link) {
  display: inline-block;
  overflow: hidden;
  width: 120px !important;
  height: 44px !important;
  background-image: url("/hummix-logo-orange.png");
  background-repeat: no-repeat;
  background-position: -15px -4.3px;
  background-size: 150px 52.7px;
}
header :where(a.logo-link) img {
  display: none;
}
/* Mirror of the compiled max-md breakpoint. */
@media not all and (min-width: 768px) {
  header :where(a.logo-link) {
    width: 100px !important;
    height: 37px !important;
    background-position: -12.5px -4.6px;
    background-size: 125px 44.3px;
  }
}

/* --- Accessible name for the painted logo, hydration-proof ---
   Vue's hydration patches the anchors from vnodes that carry no
   aria-label, stripping the one in the static markup; the img inside is
   display:none, so its alt cannot supply the name either. Visually hidden
   generated content keeps the link named through any re-render. The static
   aria-label stays as the pre-hydration name and for assistive-tech
   clarity; aria-label simply overrides the (identical) content name. */
header :where(a.logo-link)::after,
aside div[class*="h-[72px]"] > a:first-child::after {
  content: "HUMMIX";
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Mobile drawer bar logo: same technique at the ~100x37 box --- */
aside div[class*="h-[72px]"] img {
  display: none;
}
aside div[class*="h-[72px]"] > a:first-child {
  display: inline-block;
  overflow: hidden;
  width: 100px !important;
  height: 37px !important;
  background-image: url("/hummix-logo-orange.png");
  background-repeat: no-repeat;
  background-position: -12.5px -4.6px;
  background-size: 125px 44.3px;
}

/* --- Category icon chips: ignite-tinted border tiles ---
   The seven quick-nav icons (Platform, ECM, CRM, Projects, Service,
   Solutions, FAQ) draw as #ff4c39 line art on transparent SVGs. The main
   site's /ai-agents "การใช้งาน AI ในองค์กรอย่างปลอดภัย" checklist frames the
   same kind of accent line icon in a rounded chip — 1px #ff4c39 @ 14% border
   over a 9% #ff4c39 wash (AiAgents.tsx SecuritySection: size-[44px]
   rounded-[13px] border-ignite/[0.14] bg-ignite/9). The help assets are
   32/36px with the glyph already inset to the same ~44%-of-box proportion,
   so the chip paints straight onto the <img> box with a proportionally
   scaled 10px radius. Attribute-substring selectors match the skin's
   re-rendered src spellings (img/submenu/… and img//submenu/…) equally, so
   the chip survives client-side hydration; the border-box preflight keeps
   the bordered glyph within 2px of its natural size. */
img[src*="submenu/1.svg"],
img[src*="submenu/4.svg"],
img[src*="submenu/11.svg"],
img[src*="submenu/14.svg"],
img[src*="submenu/15.svg"],
img[src*="submenu/16.svg"],
img[src*="submenu/17.svg"] {
  border: 1px solid rgba(255, 76, 57, 0.14);
  background-color: rgba(255, 76, 57, 0.09);
  border-radius: 10px;
}

/* --- Redundant HUMMIX text link: hidden by href, so the hiding survives
   client re-renders. The static export carries the absolute URL, the client
   bundle re-renders the bare /en/ path; the header nav has no other link to
   exactly these addresses. --- */
header nav a[href="https://www.hummix.co/en/"],
header nav a[href="/en/"] {
  display: none;
}
header nav li:has(> a[href="https://www.hummix.co/en/"]),
header nav li:has(> a[href="/en/"]) {
  display: none;
}
