/* ============================================================
   PANVOXX — custom.css (minimal)
   LibreChat's own theme system handles light/dark mode.
   ============================================================ */

/* --- Hide LibreChat branding --- */
a[href*="librechat.ai"],
[class*="text-xs"]:has(a[href*="librechat"]) {
  display: none !important;
}

/* --- Hide Extended Thinking blocks (all models) --- */
/* Keeps thinking active server-side for better quality, just hides UI */
/* Uses attribute selectors — immune to CSS escape issues with "/" in class names */
/* "group/thinking" substring matches both group/thinking AND group/thinking-container */
[class*="group/reasoning"],
[class*="group/thinking"] {
  display: none !important;
}
/* Hide thinking content but KEEP the empty loading indicator visible.
   When .result-thinking is :empty, it hosts the pulsing-dot animation
   (.submitting .result-thinking:empty:last-child:after) — hiding it
   makes users see nothing while waiting for a response. */
.result-thinking:not(:empty) {
  display: none !important;
}

/* --- Hide web search toggle in chat input --- */
button[aria-label="Search"],
button[aria-label="Sök"] {
  display: none !important;
}

/* --- Loading indicator: Panvoxx branded --- */
/* Logo icon with pulse glow + flowing blue→green gradient bar */
.submitting .result-thinking:empty:last-child {
  display: flex !important;
  align-items: center;
  gap: 14px;
  padding: 10px 4px;
  min-height: 40px;
}
/* Panvoxx logo icon — pulses with brand glow */
.submitting .result-thinking:empty:last-child:before {
  content: '' !important;
  display: inline-block !important;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: url('/assets/icon-192x192.png') center/contain no-repeat;
  animation: panvoxx-logo-pulse 2s ease-in-out infinite !important;
}
/* Flowing gradient bar in Panvoxx blue→green */
.submitting .result-thinking:empty:last-child:after {
  content: '' !important;
  display: inline-block !important;
  width: 120px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent 0%, #3b82f6 30%, #10b981 70%, transparent 100%);
  background-size: 200% 100%;
  animation: panvoxx-flow 1.4s ease-in-out infinite !important;
}
@keyframes panvoxx-logo-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0px transparent); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5)); }
}
@keyframes panvoxx-flow {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Hide "Updated saved memory" notification in chat (memory feature still works) --- */
/* Target the unique SVG viewBox="0 0 18 18" that only exists in MemoryArtifacts button */
button:has(> svg[viewBox="0 0 18 18"]) {
  display: none !important;
}
/* Hide the entire flex wrapper + expand panel that follows */
div.flex.items-center:has(svg[viewBox="0 0 18 18"]) {
  display: none !important;
}
div.flex.items-center:has(svg[viewBox="0 0 18 18"]) + div.relative {
  display: none !important;
}

/* --- Hide File Search badge + Tools dropdown gear icon --- */
button[aria-label="File Search"],
button[aria-label="Filsökning"],
#tools-dropdown-button {
  display: none !important;
}

/* ============================================================
   PANVOXX LINK RULE: svart default, blå hover, ALDRIG understruken
   Gäller LibreChat React-appen (auth-sidor, inställningar, osv)
   ============================================================ */

/* Ta bort underline globalt på alla <a> */
a {
  text-decoration: none !important;
}
a:hover {
  text-decoration: none !important;
}

/* Tailwind text-blue-* och text-green-* → svart default */
a[class*="text-blue-"],
a[class*="text-green-"] {
  color: #1e293b !important;
}
/* hover → Panvoxx blå */
a[class*="text-blue-"]:hover,
a[class*="text-green-"]:hover {
  color: #3b82f6 !important;
}

/* hover:underline-klassen → ta bort underline */
.hover\:underline:hover {
  text-decoration: none !important;
}

/* --- Remove focus ring on icon/round buttons in chat area --- */
#audio-recorder:focus,
#audio-recorder:focus-visible,
button[class*="rounded-full"]:focus,
button[class*="rounded-full"]:focus-visible,
button[class*="size-9"]:focus,
button[class*="size-9"]:focus-visible,
audio:focus,
audio:focus-visible,
[id*="audio"]:focus,
[id*="audio"]:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

/* --- Fix Focus Mode dropdown clipped by chat input overflow-hidden --- */
/* The chat form container clips the Focus Mode dropdown.
   Target the specific container by its unique combination of classes. */
div[class*="rounded-t-3xl"][class*="overflow-hidden"] {
  overflow: visible !important;
}
