/* ======================================================================
   Cognitudo Workspace — Light mode only, primary #7d39ee
   ====================================================================== */

:root, html[data-theme='dark'], html.dark {
  color-scheme: light !important;
}

/* Force light mode — override LibreChat's dark class if set */
html.dark, html[data-theme='dark'], body.dark {
  background-color: #ffffff !important;
  color: #111 !important;
}
html.dark *, body.dark * {
  /* Reset dark-mode color tokens to light variants */
  --tw-bg-opacity: 1 !important;
}

/* Tailwind / LibreChat CSS variables — primary brand purple */
:root {
  --brand-purple: #7d39ee;
  --brand-purple-hover: #6a29d4;
  --brand-purple-soft: #f3ecff;

  /* LibreChat theme variables (v0.7+) */
  --presentation: #ffffff;
  --surface-primary: #ffffff;
  --surface-secondary: #f7f7f8;
  --surface-tertiary: #eeeef1;
  --surface-chat: #ffffff;
  --surface-submit: var(--brand-purple);
  --surface-submit-hover: var(--brand-purple-hover);
  --surface-primary-alt: #fafafa;
  --surface-primary-contrast: #ffffff;
  --surface-hover: #f1ebfd;
  --surface-active: #e9deff;
  --surface-active-alt: #e0d0ff;

  --text-primary: #111;
  --text-secondary: #444;
  --text-tertiary: #6b6b6b;
  --text-warning: #d12c2c;

  --border-light: #e5e5ea;
  --border-medium: #d1d1d6;
  --border-heavy: #a6a6ad;
  --border-xheavy: #7d7d82;

  --ring-primary: var(--brand-purple);
  --header-primary: #ffffff;
  --header-hover: #f1ebfd;
  --header-button-hover: #e9deff;
}

/* Force light tokens even if .dark class is on <html> */
html.dark {
  --presentation: #ffffff;
  --surface-primary: #ffffff;
  --surface-secondary: #f7f7f8;
  --surface-tertiary: #eeeef1;
  --surface-chat: #ffffff;
  --surface-submit: var(--brand-purple);
  --surface-submit-hover: var(--brand-purple-hover);
  --surface-hover: #f1ebfd;
  --surface-active: #e9deff;
  --text-primary: #111;
  --text-secondary: #444;
  --text-tertiary: #6b6b6b;
  --border-light: #e5e5ea;
  --border-medium: #d1d1d6;
  --header-primary: #ffffff;
}

/* Primary purple for buttons, highlights */
.bg-green-500, .bg-brand-purple,
[data-testid='send-button'],
button[type='submit'][aria-label*='Send'],
button[data-state='active'].bg-gray-50 {
  background-color: var(--brand-purple) !important;
  color: #fff !important;
}
.bg-green-500:hover, .bg-brand-purple:hover {
  background-color: var(--brand-purple-hover) !important;
}

/* Links + accent */
a, .text-green-500, .text-blue-500, .text-blue-600 {
  color: var(--brand-purple) !important;
}

/* Focus rings */
*:focus-visible {
  outline-color: var(--brand-purple) !important;
  box-shadow: 0 0 0 2px rgba(125,57,238,0.25) !important;
}

/* Selected/active menu items */
.bg-surface-active-alt, .bg-gray-200, [data-state='active'] {
  background-color: var(--brand-purple-soft) !important;
}

/* Logo in the sidebar / header — replace with Cognitudo brand image */
img[alt='Chat' i], img[alt='LibreChat' i], img[src*='logo.svg'] {
  content: url('/assets/logo.png') !important;
  background: transparent !important;
}

/* Scrollbar tint */
::-webkit-scrollbar-thumb {
  background-color: #d8cff0 !important;
}

/* Hide theme toggle (light-only) */
button[aria-label*='theme' i],
button[aria-label*='t\u00e9ma' i],
[data-testid='dark-mode-toggle'] {
  display: none !important;
}

/* Welcome title accent */
.text-token-text-primary, h1, h2 {
  color: var(--text-primary);
}
