/* Grouvi AI Theme Override */

:root, .dark, :root.dark, html {
  color-scheme: dark !important;
  --color-bg: #111111 !important;
  --color-bg-alt: #161616 !important;
  --color-bg-primary: #111111 !important;
  --color-bg-subtle: #1a1a1a !important;
  --color-surface: #161616 !important;
  --color-card: #1c1c1c !important;
  --color-sidebar: #111111 !important;
  --color-border: rgba(255,255,255,0.06) !important;
  --color-text-main: #e5e5e5 !important;
  --color-text-primary: #e5e5e5 !important;
  --color-text-muted: #777777 !important;
  --color-primary: #F4EDE4 !important;
  --color-primary-hover: #e8e1d8 !important;
  --color-primary-foreground: #111111 !important;
  --color-accent: #F4EDE4 !important;
  --color-accent-hover: #e8e1d8 !important;
  --color-accent-light: #d9d2c9 !important;
  --color-fd-background: #111111 !important;
  --color-fd-foreground: #e5e5e5 !important;
  --color-fd-muted: #1a1a1a !important;
  --color-fd-muted-foreground: #777777 !important;
  --color-fd-popover: #161616 !important;
  --color-fd-popover-foreground: #e5e5e5 !important;
  --color-fd-card: #1c1c1c !important;
  --color-fd-card-foreground: #e5e5e5 !important;
  --color-fd-border: rgba(255,255,255,0.06) !important;
  --color-fd-primary: #F4EDE4 !important;
  --color-fd-primary-foreground: #111111 !important;
  --color-fd-secondary: #1a1a1a !important;
  --color-fd-secondary-foreground: #e5e5e5 !important;
  --color-fd-accent: rgba(244,237,228,0.08) !important;
  --color-fd-accent-foreground: #e5e5e5 !important;
  --color-fd-ring: #F4EDE4 !important;
  --shadow-soft: 0 1px 3px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.12) !important;
  --shadow-warm: 0 2px 12px -2px rgba(244,237,228,0.06) !important;
  --shadow-elevated: 0 12px 28px -4px rgba(0,0,0,0.35) !important;
  --color-error: #ef4444 !important;
  --color-success: #22c55e !important;
  --color-warning: #f59e0b !important;
  --color-white: #ffffff !important;
}

body { background: #111111 !important; color: #e5e5e5 !important; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(244,237,228,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(244,237,228,0.2); }

.bg-card, [class*="bg-card"] { background-color: #1c1c1c !important; }

/* === BUTTON CONTRAST FIX === */
/* Order matters! Semi-transparent exceptions FIRST, then dark-text overrides LAST to win */

/* 1. Semi-transparent bg-primary/N keeps inherited/light text (goes first, lowest priority) */
[class*="bg-primary\/"] { color: inherit !important; }
[class*="bg-primary\/"] * { color: inherit !important; }

/* 2. text-primary on dark backgrounds stays beige */
.text-primary:not([class*="from-primary"]):not([class~="bg-primary"]) {
  color: var(--color-primary) !important;
}

/* 3. Solid bg-primary: dark text (higher priority, comes after) */
[class~="bg-primary"] { color: #111111 !important; }
[class~="bg-primary"] * { color: #111111 !important; }

/* 4. Gradient buttons: dark text on beige gradient (LAST = highest cascade priority) */
button[class*="from-primary"],
a[class*="from-primary"],
[class*="from-primary"][class*="bg-gradient"] {
  color: #111111 !important;
}
button[class*="from-primary"] *,
a[class*="from-primary"] *,
[class*="from-primary"][class*="bg-gradient"] * {
  color: #111111 !important;
}

/* 5. Submit buttons always dark text */
button[type="submit"],
button[type="submit"] * {
  color: #111111 !important;
}

/* Hide theme toggle */
button[aria-label*="theme" i], button[aria-label*="Theme" i], button[title*="theme" i] {
  display: none !important;
}

