/* TechieCRM Help on the public site and the signed-out pages
   (templates/parent/base_parent.html) -- SiteMessenger's --sm-* variables
   mapped onto the public site's --tc-* tokens.

   Loaded AFTER {% site_messenger_theme %}; same selector, later in the cascade,
   so these win. The --tc-* tokens are redefined for system-dark and for an
   explicit data-theme="dark", so Help follows the visitor's theme choice.

   z-index 1034: above the sticky nav (1030), below the phone menu's scrim
   (1035) and panel (1040), so an open menu covers Help rather than the
   reverse; the cookie notice (1080) stays on top until it is dismissed.

   Colour (Shannon, 2026-09-30): Help is painted in the site's green ACCENT,
   --tc-accent (#0FA657, the logo green), not the darker action green
   --tc-primary (#0C8847) that buttons and links use. The accent is the same in
   light and dark, so one value covers both themes. It is a bright green, so
   white text on it is only 3.18:1 (fails AA); the label and icon on it are a
   near-black instead: #101214 is 5.91:1 on the accent and 5.09:1 on the
   package's darkened button hover (brightness 0.92, #0E9950); the Help button
   itself keeps the accent on hover (0.1.6 lifts it instead). The jobs the
   accent cannot do on a light ground (text links, the unread badge's number,
   focus rings) go on colours measured for them, through the package's 0.1.6
   variables below. */

:root {
  --sm-font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;  /* the body font */
  --sm-color-primary: var(--tc-accent);    /* #0FA657 in both themes */
  --sm-color-on-primary: #101214;           /* 5.91:1 on #0FA657, 5.09:1 on its hover */
  --sm-color-surface: var(--tc-surface);
  --sm-color-surface-alt: var(--tc-bg-alt);
  --sm-color-text: var(--tc-text);
  --sm-color-text-muted: var(--tc-muted);
  --sm-color-border: var(--tc-border);
  --sm-color-bubble-mine: color-mix(in srgb, var(--tc-primary) 14%, var(--tc-surface));
  --sm-color-bubble-theirs: var(--tc-bg-alt);
  --sm-color-danger: #C62828;
  --sm-z-index: 1034;
  /* .sm-back and .sm-dock__full are painted in --sm-color-link (unset, the
     primary FILL colour; the accent is 3.18:1 as text on white). The site's
     link colour is lifted by the dark theme. */
  --sm-color-link: var(--tc-primary-text);
  /* The unread badge draws its number in --sm-color-on-danger on
     --sm-color-danger: white on #C62828 is 5.62:1 (near-black would be 2.93:1). */
  --sm-color-on-danger: #FFFFFF;
  /* Focus rings: the accent is 2.91:1 on the #F5F5F5 alt ground, under the 3:1 a
     focus indicator needs, so on a LIGHT page the ring is the action green
     (4.16:1 there, 4.54:1 on white). */
  --sm-color-focus: var(--tc-primary);
}
/* Dark (by system preference unless the visitor chose light, or chosen): the
   light red, near-black on it (8.22:1; white was 2.28:1), and the accent ring
   (5.09:1 or better on the dark grounds). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sm-color-danger: #FF8A80;
    --sm-color-on-danger: #101214;
    --sm-color-focus: var(--tc-accent);
  }
}
:root[data-theme="dark"] {
  --sm-color-danger: #FF8A80;
  --sm-color-on-danger: #101214;
  --sm-color-focus: var(--tc-accent);
}

/* Plain anchors inside Help: the package does not colour them. (.sm-back and
   .sm-dock__full follow --sm-color-link above.) */
.sm-help a, .sm-popups a, .sm-dock a { color: var(--tc-primary-text); }

