/* FAP AI Theme for LibreChat */
:root {
  --brand-purple: #4B594C;
  --surface-submit: #B19349;
  --surface-submit-hover: #C0A871;
  --text-primary: #4B594C;
  --text-secondary: #000000;
  --surface-primary: #FFFFFF;
  --surface-secondary: #F8F9FA;
  --border-light: #B19349;
  --border-medium: #D8C9A6;
  
  --text-tertiary: #595959;
  --text-secondary-alt: #595959;
  --text-warning: #B19349;
  --surface-tertiary: #ececec;
  --surface-destructive: #dc2626;
  --surface-destructive-hover: #b91c1c;
  --surface-dialog: #FFFFFF;
  --surface-chat: #F8F9FA;
  --surface-active: #ffffff;
  --surface-active-alt: #e3e3e3;
  --surface-hover: #e3e3e3;
  --surface-primary-alt: #f7f7f8;
  --border-heavy: #999696;
  --border-xheavy: #595959;
  --presentation: #F8F9FA;
  --ring-primary: #B19349;
  
  --primary: 355 85% 32%;
  --primary-foreground: 0 0% 98%;
  --secondary: 210 40% 98%;
  --secondary-foreground: 222.2 84% 4.9%;
  --muted: 210 40% 96%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96%;
  --accent-foreground: 222.2 84% 4.9%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 222.2 84% 4.9%;
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
}

.dark {
  --brand-purple: #6B7B6E;
  --surface-submit: #C0A871;
  --surface-submit-hover: #D4C4A0;
  --text-primary: #E5E7EB;
  --text-secondary: #F9FAFB;
  --surface-primary: #1F2937;
  --surface-secondary: #171717;
  --border-light: #C0A871;
  --border-medium: #6B7280;
  
  --text-tertiary: #9CA3AF;
  --text-secondary-alt: #9CA3AF;
  --text-warning: #C0A871;
  --surface-tertiary: #4B5563;
  --surface-destructive: #dc2626;
  --surface-destructive-hover: #b91c1c;
  --surface-dialog: #1F2937;
  --surface-chat: #171717;
  --surface-active: #4B5563;
  --surface-active-alt: #6B7280;
  --surface-hover: #4B5563;
  --surface-primary-alt: #171717;
  --border-heavy: #6B7280;
  --border-xheavy: #9CA3AF;
  --presentation: #171717;
  --ring-primary: #C0A871;
  
  --primary: #ffffff;
  --primary-foreground: 0 0% 98%;
  --secondary: 217.2 32.6% 17.5%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 217.2 32.6% 17.5%;
  --accent-foreground: 210 40% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 40% 98%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;
  --ring: 212.7 26.8% 83.9%;
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --card: 222.2 84% 4.9%;
  --card-foreground: 210 40% 98%;
  --popover: 222.2 84% 4.9%;
  --popover-foreground: 210 40% 98%;
}


.hover\:bg-surface-submit-hover:hover {
  background-color: #C0A871 !important;
  background-color: var(--surface-submit-hover) !important;
}

.bg-surface-submit {
  background-color: #B19349 !important;
  background-color: var(--surface-submit) !important;
}

.text-text-primary {
  color: #4B594C;
  color: var(--text-primary) !important;
}

.text-text-secondary {
  color: #000000 !important;
  color: var(--text-secondary) !important;
}

.text-text-secondary-alt {
  color: #000000 !important;
  color: var(--text-secondary-alt) !important;
}

.text-text-tertiary {
  color: #595959 !important;
  color: var(--text-tertiary) !important;
}

.text-text-warning {
  color: #B19349 !important;
  color: var(--text-warning) !important;
}

.bg-surface-secondary {
  background-color: #F8F9FA !important;
  background-color: var(--surface-secondary) !important;
}

.bg-surface-tertiary {
  background-color: #ececec !important;
  background-color: var(--surface-tertiary) !important;
}

.bg-surface-destructive {
  background-color: #000000 !important;
  background-color: var(--surface-destructive) !important;
}

.bg-surface-destructive-hover {
  background-color: #b91c1c !important;
  background-color: var(--surface-destructive-hover) !important;
}

.bg-surface-dialog {
  background-color: #FFFFFF !important;
  background-color: var(--surface-dialog) !important;
}

.bg-surface-chat {
  background-color: #F8F9FA !important;
  background-color: var(--surface-chat) !important;
}

.bg-surface-active {
  background-color: #000000 !important;
  background-color: var(--surface-active) !important;
}

.bg-surface-active-alt {
  background-color: #e3e3e3 !important;
  background-color: var(--surface-active-alt) !important;
}

.bg-surface-hover {
  background-color: #e3e3e3 !important;
  background-color: var(--surface-hover) !important;
}

.bg-surface-primary-alt {
  background-color: #f7f7f8 !important;
  background-color: var(--surface-primary-alt) !important;
}

.bg-presentation {
  background-color: #000000 !important;
  background-color: var(--presentation) !important;
}

.border-border-light {
  border-color: #B19349 !important;
  border-color: var(--border-light) !important;
}

.border-border-medium {
  border-color: #D8C9A6 !important;
  border-color: var(--border-medium) !important;
}

.border-border-heavy {
  border-color: #999696 !important;
  border-color: var(--border-heavy) !important;
}

.border-border-heavy {
  border-color: #595959 !important;
  border-color: var(--border-xheavy) !important;
}

.bg-brand-purple {
  background-color: #000000 !important;
  background-color: var(--brand-purple) !important;
}

.text-brand-purple {
  color: #4B594C !important;
  color: var(--brand-purple) !important;
}

.ring-ring-primary {
  --tw-ring-color: var(--ring-primary) !important;
}

.hover\:bg-surface-submit-hover:hover {
  background-color: #C0A871 !important;
  background-color: var(--surface-submit-hover) !important;
}

.hover\:bg-surface-destructive-hover:hover {
  background-color: #b91c1c !important;
  background-color: var(--surface-destructive-hover) !important;
}

.hover\:text-text-primary:hover {
  color: #000000 !important;
  color: var(--text-primary) !important;
}

.hover\:text-brand-purple:hover {
  color: #4B594C !important;
  color: var(--brand-purple) !important;
}

.hover\:border-border-light:hover {
  border-color: #B19349 !important;
  border-color: var(--border-light) !important;
}

.hover\:border-border-medium:hover {
  border-color: #D8C9A6 !important;
  border-color: var(--border-medium) !important;
}

.hover\:border-border-heavy:hover {
  border-color: #999696 !important;
  border-color: var(--border-heavy) !important;
}

.hover\:border-border-heavy:hover {
  border-color: #595959 !important;
  border-color: var(--border-heavy) !important;
}

.focus\:bg-surface-submit:focus {
  background-color: #B19349 !important;
  background-color: var(--surface-submit) !important;
}

.focus\:bg-surface-secondary:focus {
  background-color: #F8F9FA !important;
  background-color: var(--surface-secondary) !important;
}

.focus\:bg-surface-tertiary:focus {
  background-color: #ececec !important;
  background-color: var(--surface-tertiary) !important;
}

.focus\:bg-surface-hover:focus {
  background-color: #e3e3e3 !important;
  background-color: var(--surface-hover) !important;
}

.focus\:text-text-primary:focus {
  color: #4B594C !important;
  color: var(--text-primary) !important;
}

.focus\:border-border-light:focus {
  border-color: #B19349 !important;
  border-color: var(--border-light) !important;
}

.focus\:border-border-medium:focus {
  border-color: #D8C9A6 !important;
  border-color: var(--border-medium) !important;
}

.focus\:border-border-heavy:focus {
  border-color: #999696 !important;
  border-color: var(--border-heavy) !important;
}

.focus\:ring-ring-primary:focus {
  --tw-ring-color: var(--ring-primary) !important;
}

.placeholder\:text-text-secondary::-moz-placeholder {
  color: #000000 !important;
  color: var(--text-secondary) !important;
}

.placeholder\:text-text-secondary::placeholder {
  color: #000000 !important;
  color: var(--text-secondary) !important;
}

.placeholder\:text-text-secondary-alt::-moz-placeholder {
  color: #595959 !important;
  color: var(--text-secondary-alt) !important;
}

.placeholder\:text-text-secondary-alt::placeholder {
  color: #595959 !important;
  color: var(--text-secondary-alt) !important;
}

.placeholder\:text-text-tertiary::-moz-placeholder {
  color: #595959 !important;
  color: var(--text-tertiary) !important;
}

.placeholder\:text-text-tertiary::placeholder {
  color: #595959 !important;
  color: var(--text-tertiary) !important;
}

.before\:bg-border-medium:before {
  background-color: #D8C9A6 !important;
  background-color: var(--border-medium) !important;
}

[data-active-item] {
  background-color: #000000 !important;
  color: #000000 !important;
  background-color: var(--surface-hover) !important;
  color: var(--text-primary) !important;
}

/* Dark mode specific overrides */
.dark .dark\:bg-surface-tertiary {
  background-color: #4B5563 !important;
  background-color: var(--surface-tertiary) !important;
}

.dark .dark\:hover\:bg-surface-tertiary:hover {
  background-color: #4B5563 !important;
  background-color: var(--surface-tertiary) !important;
}

.dark .dark\:data-\[active-item\]\:bg-white\/10[data-active-item] {
  background-color: rgba(255, 255, 255, 0.1) !important;
}


.dark .dark\:data-\[state\=open\]\:bg-gray-800[data-state=open] {
  background-color: #000000 !important;
  background-color: var(--surface-primary) !important;
}

.dark .dark\:data-\[active-item\]\:text-white[data-active-item] {
  color: #000000 !important;
  color: var(--text-secondary) !important;
}

.dark .dark\:data-\[active-item\]\:before\:bg-white[data-active-item]:before {
  background-color: #000000 !important;
  background-color: var(--text-secondary) !important;
}

.focus\:ring-offset-surface-primary:focus {
  --tw-ring-offset-color: var(--surface-primary) !important;
}

* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html {
  --text-primary: var(--text-primary);
  --text-secondary: var(--text-secondary);
  --text-secondary-alt: var(--text-secondary-alt);
  --text-tertiary: var(--text-tertiary);
  --text-warning: var(--text-warning);
  --surface-primary: var(--surface-primary);
  --surface-secondary: var(--surface-secondary);
  --surface-tertiary: var(--surface-tertiary);
  --surface-submit: var(--surface-submit);
  --surface-submit-hover: var(--surface-submit-hover);
  --surface-destructive: var(--surface-destructive);
  --surface-destructive-hover: var(--surface-destructive-hover);
  --surface-dialog: var(--surface-dialog);
  --surface-chat: var(--surface-chat);
  --surface-active: var(--surface-active);
  --surface-active-alt: var(--surface-active-alt);
  --surface-hover: var(--surface-hover);
  --surface-primary-alt: var(--surface-primary-alt);
  --border-light: var(--border-light);
  --border-medium: var(--border-medium);
  --border-heavy: var(--border-heavy);
  --border-xheavy: var(--border-xheavy);
  --brand-purple: var(--brand-purple);
  --presentation: var(--presentation);
  --ring-primary: var(--ring-primary);
}


/* FAP: enlarge landing logo area */
div.mt-6.h-10.w-full.bg-cover {
  /* from h-10 (~2.5rem) to h-20 (~5rem) */
  height: 7rem !important;
}

/* Ensure the logo image fills the new height without cropping */
div.mt-6.h-10.w-full.bg-cover img[src$="logo.svg"],
div.mt-6.h-10.w-full.bg-cover img[alt*="Logo"],
div.mt-6.h-10.w-full.bg-cover img {
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

.dark .bg-background {
  background-color: #121212 !important;
}

.dark .data-\[state\=checked\]\:bg-primary[data-state=checked] {
  background-color: #ffffff !important;
}

/* FAP: Hide Presets and Add Multi Conversation buttons */
#presets-button {
  display: none !important;
}

#add-multi-conversation-button {
  display: none !important;
}

/* FAP: Hide Share/Export button */
#export-menu-button {
  display: none !important;
}

/* FAP: Hide Marketplace Admin Settings button (gear icon next to search) */
div[role="search"] + button {
  display: none !important;
}

/* FAP: Hide Temporary/Private Chat button (all languages, identified by icon) */
button:has(.lucide-message-circle-dashed) {
  display: none !important;
}

/* FAP: Tools button visibility is controlled by JS based on active model */

#attach-file-menu > [role="menuitem"]:not(:last-child) {
  display: none !important;
}

/* FAP: Hide My Agents dropdown item and related buttons (all languages) */
/*
#endpoint-agents-menu,
button[aria-label*="agent" i],
a[aria-label*="agent" i],
a[href*="/agents"],
nav button[id*="agent"],
header button[id*="agent"],
#agents-button,
#new-agent-button {
  display: none !important;
}
*/

/* FAP: Hide LibreChat footer branding */
[role="contentinfo"] {
  display: none !important;
}