/* Writesonic Brand Customization for Chainlit */

/* Hide Chainlit loading logo and replace with custom */
.chainlit-logo,
[class*="chainlit-logo"],
img[src*="chainlit"],
.loading-logo {
  display: none !important;
  visibility: hidden !important;
}

/* Login page - replace /logo endpoint with Writesonic logo */
img[src*="/logo?"],
img[src*="/logo?theme="] {
  content: url("/public/logo-dark.png") !important;
  max-height: 60px !important;
  object-fit: contain !important;
}

/* Light theme variant */
:root:not(.dark) img[src*="/logo?"],
:root:not(.dark) img[src*="/logo?theme=light"] {
  content: url("/public/logo-light.png") !important;
}

/* Custom loading screen background */
#root:empty::before,
.loading-screen {
  background-color: #0A0A1B !important;
}

/* Typography - Inter font */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-weight: 700 !important;
}

/* Primary button styling with brand purple */
button[data-variant="default"],
button[type="submit"],
.cl-send-button,
button.bg-primary {
  background-color: #6A57C8 !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}

button[data-variant="default"]:hover,
button[type="submit"]:hover,
.cl-send-button:hover,
button.bg-primary:hover {
  background-color: #5847A8 !important;
}

/* Links with brand blue */
a {
  color: #3A5AFF;
}

a:hover {
  color: #2845E0;
}

/* Remove ALL focus rings/outlines completely */
*:focus,
*:focus-visible,
*:focus-within {
  outline: none !important;
  outline-width: 0 !important;
  outline-style: none !important;
  outline-color: transparent !important;
  box-shadow: none !important;
  border-color: inherit !important;
}

/* Target specific input/textarea elements */
input,
textarea,
input:focus,
input:focus-visible,
input:active,
textarea:focus,
textarea:focus-visible,
textarea:active {
  outline: none !important;
  outline-width: 0 !important;
  box-shadow: none !important;
}

/* Remove ring from any container that has focus within */
div:focus-within,
div:has(:focus),
form:focus-within,
[class*="input"]:focus-within,
[class*="textarea"]:focus-within {
  outline: none !important;
  box-shadow: none !important;
  border-color: inherit !important;
}

/* Override Tailwind ring utilities */
.ring-0,
.ring-1,
.ring-2,
[class*="ring-"],
[class*="focus:ring"],
[class*="focus-within:ring"] {
  --tw-ring-shadow: none !important;
  --tw-ring-color: transparent !important;
  --tw-ring-offset-shadow: none !important;
  box-shadow: none !important;
}

/* Message styling */
.message-content {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* Code blocks */
pre, code {
  border-radius: 8px !important;
}

/* Card styling */
[data-element="card"] {
  border-radius: 12px !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #F3F4F6;
}

::-webkit-scrollbar-thumb {
  background: #9CA3AF;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6B7280;
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
  background: #1E1B4B;
}

.dark ::-webkit-scrollbar-thumb {
  background: #4B5563;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #6B7280;
}
