/* MazayaChat brand (navy #072032, lime #ACE601): the few things the dashboard theme file cannot express.
   Loaded by the app shell (client/public/index.html). The dashboards' colours themselves come from the theme file
   routes/themes/theme-sassly.json (set in Admin > Theme); the compiled app puts html[data-mz-mode="light|dark"] on <html>. */

/* The logo is navy + lime on a transparent background. On the dark theme it sits on a pale tile so the navy parts stay
   visible (the sign-in page is always light and keeps the plain logo). */
html[data-mz-mode='dark']:not(.mz-login) img[src*='/media/mazayachat-logo'] {
  background: #eef3e9;
  border-radius: 8px;
  padding: 3px 4px;
  box-sizing: border-box;
  object-fit: contain;
}

::selection { background: rgba(172, 230, 1, 0.4); color: #072032; }

/* ── typography: the website's heading font for headings; body text is the theme's DM Sans / Almarai ─────────────────────── */
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url('/mz-site/fonts/InstrumentSans-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 700; font-style: normal; font-display: swap; src: url('/mz-site/fonts/InstrumentSans-Bold.ttf') format('truetype'); }
.MuiTypography-h1, .MuiTypography-h2, .MuiTypography-h3, .MuiTypography-h4, .MuiTypography-h5, .MuiTypography-h6 {
  font-family: 'Instrument Sans', 'DM Sans', 'Almarai', sans-serif;
  letter-spacing: 0;
}
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── buttons: the website's pill shape (22 px = half the height of a normal button). The theme keeps its 8 px radius because the app derives every `borderRadius: n` from it;
   `html` in front makes these rules win over a screen's own `sx`. ─────────────────────────────────────────────────────── */
html[data-mz-mode='light'] { --mz-focus: #072032; }
html[data-mz-mode='dark'] { --mz-focus: #ace601; }
html .MuiButton-root { border-radius: 22px; } /* fully round for a one-line button, still tidy when a label wraps on a phone */
html .MuiButton-root:focus-visible { outline: 2px solid var(--mz-focus, #072032); outline-offset: 2px; }
html .MuiButton-contained:active { transform: translateY(1px); }

/* ── side menus (admin + user): one set of sizes, the brand's selected state ───────────────────────────────────────────── */
.mz-side .MuiListItemButton-root { min-height: 44px; border-radius: 12px; }
.mz-side .MuiCollapse-root .MuiListItemButton-root { min-height: 38px; }
.mz-side .MuiListItemText-root { min-width: 0; }
.mz-side .MuiListItemText-primary { white-space: nowrap; overflow: hidden; }
.mz-side .MuiListItemText-primary > div { min-width: 0; }
.mz-side .MuiListItemText-primary > div > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; } /* a long label shortens; its NEW tag stays whole */
.mz-side .MuiChip-root { flex-shrink: 0; }
.mz-side .MuiListItemText-primary .MuiChip-root { display: none; }
.mz-side .MuiCollapse-root .MuiListItemText-primary { font-size: 13px; }
.mz-side .MuiListItemButton-root:hover { background-color: rgba(172, 230, 1, 0.12); }
.mz-side .MuiListItemButton-root.Mui-selected { background-color: rgba(172, 230, 1, 0.24); }
.mz-side .MuiListItemButton-root.Mui-selected:hover { background-color: rgba(172, 230, 1, 0.32); }
.mz-side .MuiListItemButton-root:focus-visible { outline: 2px solid var(--mz-focus, #072032); outline-offset: -2px; }
.mz-side ::-webkit-scrollbar { width: 6px; }
.mz-side ::-webkit-scrollbar-thumb { background: rgba(92, 105, 114, 0.35); border-radius: 3px; }
.mz-side ::-webkit-scrollbar-track { background: transparent; }

/* ── motion: people who ask their system for less motion get none of the looping decoration ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ── Permanently disable and suppress full-screen splash loader ────────── */
.MuiBackdrop-root:has(img[src*="mazayachat-logo"]),
.MuiBackdrop-root:has([class*="MuiCircularProgress-root"]),
.MuiBackdrop-root:has(svg[data-testid*="WhatsApp"]),
.MuiBackdrop-root:has(path[d*="M12.04 2c-5.46"]),
.MuiBackdrop-root[style*="z-index: 1399"],
.MuiBackdrop-root[style*="z-index: 1400"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ── Prevent FOUC & sidebar jumping ─────────────────────────────────────── */
.mz-side, .MuiDrawer-paper {
  contain: layout style;
  transition: width 0.15s ease, transform 0.15s ease;
}

