/* ------------------------------------------------------------------------- *
 * Andefena brand theme for LibreChat.
 *
 * Overrides LibreChat's CSS-variable theme (ChatGPT-style: --brand-purple
 * accent, --surface-* backgrounds, --text-* text, switched between :root/.dark).
 * Loaded AFTER the app bundle and marked !important so it wins regardless of the
 * bundle's exact selectors/specificity. Palette + type from andefena.com.
 * ------------------------------------------------------------------------- */

/* ---- Light theme (warm cream + deep-green accent) ---- */
:root {
  --brand-purple: #2E5A3A !important;            /* accent: Andefena deep green */

  --surface-primary: #FAF8F4 !important;         /* main chat area (warm white) */
  --surface-primary-alt: #F5F1E8 !important;     /* cream */
  --surface-primary-contrast: #ECE7DB !important;
  --surface-secondary: #F5F1E8 !important;       /* sidebar / panels (cream) */
  --surface-secondary-alt: #E4DDD0 !important;
  --surface-tertiary: #ECE7DB !important;
  --surface-tertiary-alt: #FAF8F4 !important;
  --surface-hover: #E9E2D5 !important;
  --surface-hover-alt: #E4DDD0 !important;
  --surface-active: #E4DDD0 !important;
  --surface-active-alt: #D9D2C4 !important;
  --surface-dialog: #FAF8F4 !important;
  --surface-chat: #FAF8F4 !important;
  --surface-submit: #2E5A3A !important;          /* send button (green) */
  --surface-submit-hover: #244A2E !important;

  --text-primary: #1A1A1A !important;            /* charcoal */
  --text-secondary: #4A4A4A !important;
  --text-secondary-alt: #6A6A6A !important;
  --text-tertiary: #6A6A6A !important;

  --border-light: #E4DDD0 !important;
  --border-medium: #D4CFC6 !important;
  --border-medium-alt: #D4CFC6 !important;
  --border-heavy: #C4BEB2 !important;
  --border-xheavy: #B4AE9F !important;
  --header-primary: #F5F1E8 !important;
}

/* ---- Dark theme (Andefena navy + brighter green accent) ---- */
.dark {
  --brand-purple: #4AAA6A !important;            /* accent: brighter green on navy */

  --surface-primary: #0C1524 !important;         /* navy main */
  --surface-primary-alt: #142032 !important;
  --surface-primary-contrast: #1E2E44 !important;
  --surface-secondary: #142032 !important;       /* sidebar / panels */
  --surface-secondary-alt: #1E2E44 !important;
  --surface-tertiary: #1E2E44 !important;
  --surface-tertiary-alt: #142032 !important;
  --surface-hover: #1E2E44 !important;
  --surface-hover-alt: #24344C !important;
  --surface-active: #24344C !important;
  --surface-active-alt: #2A3344 !important;
  --surface-dialog: #142032 !important;
  --surface-chat: #0C1524 !important;
  --surface-submit: #2D9A5A !important;
  --surface-submit-hover: #24482E !important;

  --text-primary: #F2EFE8 !important;            /* warm off-white */
  --text-secondary: #C4C0B8 !important;
  --text-secondary-alt: #9A968E !important;
  --text-tertiary: #9A968E !important;

  --border-light: #2A3344 !important;
  --border-medium: #2A3344 !important;
  --border-medium-alt: #3A4557 !important;
  --border-heavy: #3A4557 !important;
  --border-xheavy: #4A5567 !important;
  --header-primary: #142032 !important;
}

/* ---- Typography: DM Sans body, Cormorant Garamond for the big greeting ---- */
body { font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, sans-serif; }
.font-sans, [class*="font-sans"] {
  font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, sans-serif !important;
}
/* keep code monospaced */
code, pre, kbd, samp, .font-mono, [class*="font-mono"] {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace !important;
}
/* elegant serif only for the large empty-state greeting (h1) */
h1 {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  letter-spacing: 0.01em;
  font-weight: 600;
}

/* Focus ring / links pick up the green accent automatically via --brand-purple. */
