/* ============================================================
   Stacy branding-stylesheet
   ------------------------------------------------------------
   Wordt door Caddy als <link> in de <head> van LibreChat
   geinjecteerd. Bestand zelf wordt via docker-compose.override.yml
   gemount op /app/client/dist/assets/branding/stacy.css.
   
   Bij LibreChat-versie-upgrade verifieren of:
   - Lucide-icon-classes (lucide-bot, lucide-file-image) nog matchen
   - .shadow-stroke nog de welcome-bubble-container is
   - CSS-vars --surface-submit etc. nog bestaan
   ============================================================ */

/* --- Barlow lettertype ---------------------------------- */

@font-face {
	font-family: 'Barlow';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/assets/branding/fonts/Barlow-Regular.woff2') format('woff2');
}

@font-face {
	font-family: 'Barlow';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('/assets/branding/fonts/Barlow-Medium.woff2') format('woff2');
}

/* Body-text overal Barlow, behalve code-blokken (monospace behouden) */
html, body, button, input, textarea, select {
	font-family: 'Barlow', ui-sans-serif, system-ui, -apple-system,
	             BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

code, pre, kbd, samp, .font-mono {
	font-family: ui-monospace, 'SF Mono', Monaco, 'Cascadia Code',
	             'Roboto Mono', Consolas, monospace !important;
}

/* --- Staete-blauw kleurschema --------------------------- */
/* Scope bewust beperkt: verzendknop + active-state in side panel.
   --brand-purple, --text-primary, --presentation NIET aanraken
   (te breed; raakt body-text en bubble-backgrounds). */

:root,
.dark {
	--surface-submit: #0070b8;
	--surface-submit-hover: #005a94;
	/* Onderstaande twee zijn een probeerballon — bijslijpen als
	   de side-panel-active-state niet visueel oplicht. */
	--surface-active: #0070b8;
	--surface-active-alt: #005a94;
}

/* --- Lucide-icon-vervangingen --------------------------- */

/* (Bestaand, gemigreerd uit Caddyfile)
   Verberg "Upload to Provider"-knop op beide plekken
   (paperclip-menu + drag-overlay). */
button:has(svg.lucide-file-image),
[role="menuitem"]:has(svg.lucide-file-image) {
	display: none !important;
}

/* Welcome-bubble (centrum boven "Good morning, Nick Fitters"):
   verberg robotje-icoon, Stacy-logo als background op de cirkel. */
.shadow-stroke svg.lucide-bot {
	display: none;
}

.shadow-stroke {
	background-image: url('/assets/logo.svg');
	background-size: 65%;
	background-repeat: no-repeat;
	background-position: center;
}

/* Side panel preset-button (naast tekst "Stacy"):
   verberg robotje-icoon, voeg pseudo-element toe met logo. */
button svg.lucide-bot.icon-md {
	display: none;
}

button:has(svg.lucide-bot.icon-md) > div::before {
	content: "";
	display: inline-block;
	width: 20px;
	height: 20px;
	background-image: url('/assets/logo.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	vertical-align: middle;
}

/* --- Zijbalk: Staete-blauw met witte tekst ------------- */
/* Targeting via <nav>-class. Bij LibreChat-versie-upgrade
   verifieren of nav.flex.h-full.flex-col nog matcht. */

nav.flex.h-full.flex-col {
	background-color: #0070b8 !important;
}

/* Tekst in zijbalk wit. Targets bewust beperkt tot
   tekst-elementen — niet alles, anders kleuren we ook
   <input>-velden en zoekbalken wit-op-wit. */
nav.flex.h-full.flex-col,
nav.flex.h-full.flex-col span,
nav.flex.h-full.flex-col a,
nav.flex.h-full.flex-col h3,
nav.flex.h-full.flex-col [role="button"] {
	color: #ffffff !important;
}

/* SVG-icons in de zijbalk wit (bookmarks, edit, etc.) */
nav.flex.h-full.flex-col svg {
	color: #ffffff !important;
	stroke: #ffffff !important;
}

/* Section headers ("Chats", "Previous 7 days") iets gedempter */
nav.flex.h-full.flex-col h3 {
	color: rgba(255, 255, 255, 0.7) !important;
}

/* Active chat: wit-transparante highlight ipv blauw-op-blauw.
   Overschrijft onze eerdere --surface-active op deze plek. */
nav.flex.h-full.flex-col .bg-surface-active,
nav.flex.h-full.flex-col [aria-current="page"] {
	background-color: rgba(255, 255, 255, 0.18) !important;
}

/* Hover-state: subtieler dan active */
nav.flex.h-full.flex-col [role="button"]:hover,
nav.flex.h-full.flex-col a:hover {
	background-color: rgba(255, 255, 255, 0.1) !important;
}

/* User-pill onderin (NF + Nick Fitters): border houdbaar op blauw */
nav.flex.h-full.flex-col [class*="border-t"] {
	border-color: rgba(255, 255, 255, 0.2) !important;
}

/* --- Zijbalk fine-tuning: chat-items zonder gradient ---- */
/* Standaard chat-items: transparant (matcht zijbalk-achtergrond),
   geen gradient, geen border. */
nav#chat-history-nav a,
nav#chat-history-nav [role="button"] {
	background: transparent !important;
	background-image: none !important;
	border: 1px solid transparent !important;
}

/* Hover: subtiele wit-transparante achtergrond, geen border */
nav#chat-history-nav a:hover,
nav#chat-history-nav [role="button"]:hover {
	background: rgba(255, 255, 255, 0.08) !important;
	background-image: none !important;
}

/* Active chat: witte border + iets duidelijkere highlight */
nav#chat-history-nav .bg-surface-active,
nav#chat-history-nav [aria-current="page"],
nav#chat-history-nav .active {
	background: rgba(255, 255, 255, 0.12) !important;
	background-image: none !important;
	border: 1px solid rgba(255, 255, 255, 0.6) !important;
}

/* Verbergt LibreChat's title-fade gradient: wit-naar-transparant overlay
   die normaal lange chat-titels uitfaadt. Op blauwe achtergrond rommelig.
   Targeting op unieke class-combinatie pointer-events-none + bg-gradient-to-l. */
nav#chat-history-nav div.pointer-events-none.bg-gradient-to-l {
	display: none !important;
}

/* Lange titels nu hard afkappen met ellipsis */
nav#chat-history-nav [role="button"] span,
nav#chat-history-nav a span {
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
}