/* BrainChat rebrand — overrides Revolt design tokens to match the brains web app.
   Loaded after the Revolt bundle so these win specificity ties. Indigo accent
   (#4f46e5 / #818cf8 dark), system font stack, soft surfaces. */

:root,
:root.dark,
:root.light,
:root[data-theme],
html {
  /* Brand */
  --accent: #4f46e5;
  --brand: #4f46e5;
  --brand-secondary: #818cf8;

  /* Status — keep semantic, just nudge */
  --error: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;

  /* Typography — system stack to match brains web */
  --primary-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --monospace-font: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

/* Dark theme (Revolt's default) — mapped onto brains dark tokens */
:root,
:root.dark,
:root[data-theme="dark"] {
  --background: #09090b;
  --secondary-background: #111114;
  --tertiary-background: #18181b;
  --primary-background: #09090b;
  --message-box: #111114;
  --hover: rgba(129, 140, 248, 0.08);

  --foreground: #fafafa;
  --secondary-foreground: #a1a1aa;
  --tertiary-foreground: #71717a;
  --primary-header: #111114;
  --secondary-header: #18181b;

  --tooltip: #18181b;
  --status-online: #10b981;
  --status-idle: #f59e0b;
  --status-busy: #ef4444;
  --status-streaming: #818cf8;
  --status-invisible: #71717a;

  --scrollbar-thumb: #27272a;
  --scrollbar-track: transparent;

  --block: #1f1f23;
  --mention: rgba(129, 140, 248, 0.2);
}

/* Light theme — when Revolt is set to light */
:root.light,
:root[data-theme="light"] {
  --background: #fafafa;
  --secondary-background: #ffffff;
  --tertiary-background: #f4f4f5;
  --primary-background: #fafafa;
  --message-box: #ffffff;
  --hover: rgba(79, 70, 229, 0.06);

  --foreground: #09090b;
  --secondary-foreground: #52525b;
  --tertiary-foreground: #71717a;
  --primary-header: #ffffff;
  --secondary-header: #f4f4f5;

  --tooltip: #18181b;
  --block: #f4f4f5;
  --mention: rgba(79, 70, 229, 0.12);
  --scrollbar-thumb: #d4d4d8;
}

/* Polish: gentler radii on chat surfaces, subtle accent shadow on focused inputs */
input:focus,
textarea:focus,
[contenteditable="true"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.35);
}

/* Login / landing — Revolt shows a centered card; warm it up */
body {
  font-family: var(--primary-font);
}

/* Buttons that use --accent get a tasteful gradient on hover */
button[class*="primary"]:hover,
a[class*="primary"]:hover {
  background-image: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
}

/* Scrollbar — match brains web */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 8px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

/* Selection */
::selection {
  background: rgba(129, 140, 248, 0.35);
  color: inherit;
}
