/* Login page: hide the Auth0 logo on the OAuth button (its viewBox is
   unique to that icon; the label itself is set via translations). */
button svg[viewBox="0 0 256 287"] {
  display: none;
}

/* We only support the light theme (default_theme in config.toml), so hide
   the light/dark/system toggle in the header — there's no config flag to
   remove it, only to set the default. */
#theme-toggle {
  display: none;
}

/* Chainlit's default accent (--primary/--ring) is a pink/red (hue 340),
   used for links (text-primary, e.g. the Readme's mailto link) and focus
   rings (e.g. the Readme panel's auto-focused close button). Override it
   to match the blue already used for the composer buttons below
   (rgb(41,59,91) ≈ hsl(218 38% 26%)). custom.css loads before Chainlit's
   own stylesheet, so !important is needed to win the cascade. */
:root,
.dark {
  --primary: 218 38% 26% !important;
  --ring: 218 38% 26% !important;
}

/* Send message button */
#chat-submit {
  background-color: rgb(41, 59, 91) !important;
}

#chat-submit:hover:not(:disabled) {
  background-color: rgb(55, 79, 122) !important;
}

/* Audio record button — shares bg-primary, scoped to composer area */
form button.bg-primary:not(#chat-submit),
div button.bg-primary:not(#chat-submit) {
  background-color: rgb(41, 59, 91) !important;
}

div button.bg-primary:not(#chat-submit):hover {
  background-color: rgb(55, 79, 122) !important;
}

/* Book icons are landscape covers; Chainlit renders them as tiny cropped
   squares/circles. Show them uncropped at their natural aspect ratio. */

/* Assistant avatar above messages: Chainlit wraps it in a fixed-size circle
   (inline width/height from avatar_size), so width needs !important. */
span:has(> img[alt^="Avatar for"]) {
  width: auto !important;
  border-radius: 4px;
}

img[alt^="Avatar for"] {
  aspect-ratio: auto;
  width: auto;
  object-fit: contain;
}

/* Chat profile selector: icon in the header trigger */
#chat-profiles img {
  width: auto;
  height: 2rem;
  border-radius: 4px;
  object-fit: contain;
}

/* Chat profile selector: dropdown options — large enough to recognize covers */
[role="listbox"] [role="option"] img {
  width: auto;
  height: 3.5rem;
  border-radius: 4px;
  object-fit: contain;
}

/* Welcome screen (new chat): profile icon shown centered above the book
   description — Chainlit squeezes it into a 64px circle. */
img.h-16.w-16.rounded-full {
  width: auto;
  height: 6rem;
  border-radius: 4px;
  object-fit: contain;
}
