/*
 * tailwind-overrides.css
 *
 * Loaded AFTER the Tailwind Play CDN script so these rules beat generated
 * utilities. Fixes systemic button-label contrast:
 *
 *   • text-page / text-background-dark map to --lm-bg (page canvas colour).
 *     On bg-primary that is correct in spirit but the CDN utility often loses
 *     to specificity ties; --lm-on-accent is theme-aware (dark + light).
 *   • The same utilities on bg-surface-* make labels vanish (page bg ≈ surface).
 *
 * Prefer text-on-accent on new filled CTAs; these guards cover existing markup.
 */

/* ── Solid brand / success CTAs ─────────────────────────────────────── */
button.bg-primary,
a.bg-primary,
input[type='submit'].bg-primary,
input[type='button'].bg-primary,
.bg-primary.text-page,
.bg-primary.text-background-dark {
  color: var(--lm-on-accent);
}

button.bg-emerald-600,
a.bg-emerald-600,
.bg-emerald-600.text-page,
.bg-emerald-600\/90 {
  color: var(--lm-on-accent);
}

/* ── Surface buttons — never use page-bg colour as label ────────────── */
.bg-surface-overlay.text-page,
.bg-surface-raised.text-page,
.bg-surface-input.text-page,
.bg-surface-deep.text-page,
.bg-surface.text-page {
  color: var(--lm-text);
}

/* Inbox own-message bubble: tinted primary panel */
.bg-primary\/10.text-page {
  color: var(--lm-accent);
}
