/* TCHAHIT — «مساعد تشهيت» launcher only (V129 split). Render-blocking on every page that shows the
 * launcher, so it stays tiny; the chat panel rules (public/tchahit-assistant.css, which repeats these)
 * load only when the panel opens. Keep both copies of the launcher rules identical. */
:root {
  --as-gap: 16px;
  --as-launch: 56px;
  --as-top: calc(var(--tc-header-h, 64px) + 12px);
  --as-bottom: calc(var(--as-gap) + var(--as-launch) + 12px + env(safe-area-inset-bottom, 0px));
  --as-ink: var(--tc-text, #1f1a17);
  --as-ink-2: var(--tc-text-2, #5f5650);
  --as-line: var(--tc-border, #efe2d4);
  --as-field: var(--tc-field-border, #dccdbe);
  --as-surface: var(--tc-surface, #fff);
  --as-soft: var(--tc-cream-50, #fff8f1);
  --as-action: var(--tc-action, #c2410c);
  --as-action-hover: var(--tc-action-hover, #9a3412);
  --as-on-action: var(--tc-on-action, #fff);
  --as-night: var(--tc-night-900, #111814);
  --as-focus: var(--tc-focus, #c2410c);
  --as-radius: var(--tc-r-xl, 24px);
}
.assistant-launcher { position: fixed; inset-inline-start: calc(var(--as-start, 0px) + max(var(--as-gap), env(safe-area-inset-left, 0px))); inset-inline-end: auto; bottom: calc(var(--as-gap) + env(safe-area-inset-bottom, 0px)); z-index: 70; min-height: var(--as-launch); max-width: calc(100vw - 2 * var(--as-gap)); padding-block: 0; padding-inline: 16px 20px; border: 0; border-radius: var(--tc-r-pill, 999px); display: inline-flex; align-items: center; gap: 10px; background: var(--as-night); color: #fff; font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; box-shadow: var(--tc-shadow-2, 0 14px 32px rgba(31, 26, 23, .18)); cursor: pointer; transition: transform var(--tc-dur-2, 180ms) var(--tc-ease-out, ease), background var(--tc-dur-2, 180ms); }
/* The launcher floats over the bottom-start corner: the shared footer keeps that
   corner free, so the last links and the © line can always scroll clear of it. */
footer.tc-footer { padding-bottom: calc(var(--as-gap) + var(--as-launch) + 16px + env(safe-area-inset-bottom, 0px)); }
.assistant-launcher svg { width: 22px; height: 22px; flex: none; color: var(--tc-flame, #ff5728); }
.assistant-launcher span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The alert count is a chip inside the pill (never outside its box). */
.assistant-launcher .assistant-badge { position: static; margin-inline-start: 2px; box-shadow: none; }
/* Tucked away while a customer page scrolls down on a phone (comes back on scroll up or keyboard focus). */
.assistant-launcher.is-tucked:not(:focus-visible) { transform: translateY(calc(100% + 96px)); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .assistant-launcher { transition: transform var(--tc-dur-3, 240ms) var(--tc-ease-out, ease), opacity var(--tc-dur-2, 180ms), background var(--tc-dur-2, 180ms); } }
.assistant-launcher:hover { background: var(--tc-night-800, #17201c); transform: translateY(-1px); }
.assistant-launcher:focus-visible { outline: 3px solid var(--as-focus); outline-offset: 3px; }
@media (max-width: 640px) {
  .assistant-launcher { width: var(--as-launch); height: var(--as-launch); padding: 0; justify-content: center; }
  .assistant-launcher span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* On the round launcher the count sits on the top corner, inside the button box. */
  .assistant-launcher .assistant-badge { position: absolute; top: 0; inset-inline-end: 0; margin: 0; height: 20px; min-width: 20px; font-size: 11px; }
  .assistant-launcher[aria-expanded="true"] { display: none; }
}

@media (prefers-reduced-motion: reduce) { .assistant-launcher { transition: none; } }
@media print { .assistant-launcher { display: none !important; } }
.assistant-badge { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: #8f5600; color: #fff; font-style: normal; font-size: 12px; font-weight: 800; box-shadow: 0 0 0 2px #fff; }
.assistant-badge.critical { background: #b42318; }
.pos-helper-launcher { inset-inline-end: auto; inset-inline-start: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); min-height: 44px; font-size: 13px; opacity: .92; }
@media (max-width: 640px) { .pos-helper-launcher { width: 44px; height: 44px; } }
