/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
/**
 * 1. Set default font family to sans-serif.
 * 2. Prevent iOS and IE text size adjust after device orientation change,
 *    without disabling user zoom.
 */
html {
  font-family: sans-serif;
  /* 1 */
  -ms-text-size-adjust: 100%;
  /* 2 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
}
/**
 * Remove default margin.
 */
body {
  margin: 0;
}
/* HTML5 display definitions
   ========================================================================== */
/**
 * Correct `block` display not defined for any HTML5 element in IE 8/9.
 * Correct `block` display not defined for `details` or `summary` in IE 10/11
 * and Firefox.
 * Correct `block` display not defined for `main` in IE 11.
 */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
  display: block;
}
/**
 * 1. Correct `inline-block` display not defined in IE 8/9.
 * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
 */
audio,
canvas,
progress,
video {
  display: inline-block;
  /* 1 */
  vertical-align: baseline;
  /* 2 */
}
/**
 * Prevent modern browsers from displaying `audio` without controls.
 * Remove excess height in iOS 5 devices.
 */
audio:not([controls]) {
  display: none;
  height: 0;
}
/**
 * Address `[hidden]` styling not present in IE 8/9/10.
 * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
 */
[hidden],
template {
  display: none;
}
/* Links
   ========================================================================== */
/**
 * Remove the gray background color from active links in IE 10.
 */
a {
  background-color: transparent;
}
/**
 * Improve readability of focused elements when they are also in an
 * active/hover state.
 */
a:active,
a:hover {
  outline: 0;
}
/* Text-level semantics
   ========================================================================== */
/**
 * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
 */
abbr[title] {
  border-bottom: 1px dotted;
}
/**
 * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
 */
b,
strong {
  font-weight: bold;
}
/**
 * Address styling not present in Safari and Chrome.
 */
dfn {
  font-style: italic;
}
/**
 * Address variable `h1` font-size and margin within `section` and `article`
 * contexts in Firefox 4+, Safari, and Chrome.
 */
h1 {
  font-size: 2em;
  margin: 0.67em 0;
}
/**
 * Address styling not present in IE 8/9.
 */
mark {
  background: #ff0;
  color: #000;
}
/**
 * Address inconsistent and variable font size in all browsers.
 */
small {
  font-size: 80%;
}
/**
 * Prevent `sub` and `sup` affecting `line-height` in all browsers.
 */
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sup {
  top: -0.5em;
}
sub {
  bottom: -0.25em;
}
/* Embedded content
   ========================================================================== */
/**
 * Remove border when inside `a` element in IE 8/9/10.
 */
img {
  border: 0;
}
/**
 * Correct overflow not hidden in IE 9/10/11.
 */
svg:not(:host) {
  overflow: hidden;
}
/* Grouping content
   ========================================================================== */
/**
 * Address margin not present in IE 8/9 and Safari.
 */
figure {
  margin: 1em 40px;
}
/**
 * Address differences between Firefox and other browsers.
 */
hr {
  box-sizing: content-box;
  height: 0;
}
/**
 * Contain overflow in all browsers.
 */
pre {
  overflow: auto;
}
/**
 * Address odd `em`-unit font size rendering in all browsers.
 */
code,
kbd,
pre,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
}
/* Forms
   ========================================================================== */
/**
 * Known limitation: by default, Chrome and Safari on OS X allow very limited
 * styling of `select`, unless a `border` property is set.
 */
/**
 * 1. Correct color not being inherited.
 *    Known issue: affects color of disabled elements.
 * 2. Correct font properties not being inherited.
 * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
 */
button,
input,
optgroup,
select,
textarea {
  color: inherit;
  /* 1 */
  font: inherit;
  /* 2 */
  margin: 0;
  /* 3 */
}
/**
 * Address `overflow` set to `hidden` in IE 8/9/10/11.
 */
button {
  overflow: visible;
}
/**
 * Address inconsistent `text-transform` inheritance for `button` and `select`.
 * All other form control elements do not inherit `text-transform` values.
 * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
 * Correct `select` style inheritance in Firefox.
 */
button,
select {
  text-transform: none;
}
/**
 * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
 *    and `video` controls.
 * 2. Correct inability to style clickable `input` types in iOS.
 * 3. Improve usability and consistency of cursor style between image-type
 *    `input` and others.
 * 4. CUSTOM FOR WEBFLOW: Removed the input[type="submit"] selector to reduce
 *    specificity and defer to the .w-button selector
 */
button,
html input[type="button"],
input[type="reset"] {
  -webkit-appearance: button;
  /* 2 */
  cursor: pointer;
  /* 3 */
}
/**
 * Re-set default cursor for disabled elements.
 */
button[disabled],
html input[disabled] {
  cursor: default;
}
/**
 * Remove inner padding and border in Firefox 4+.
 */
button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}
/**
 * Address Firefox 4+ setting `line-height` on `input` using `!important` in
 * the UA stylesheet.
 */
input {
  line-height: normal;
}
/**
 * It's recommended that you don't attempt to style these elements.
 * Firefox's implementation doesn't respect box-sizing, padding, or width.
 *
 * 1. Address box sizing set to `content-box` in IE 8/9/10.
 * 2. Remove excess padding in IE 8/9/10.
 */
input[type='checkbox'],
input[type='radio'] {
  box-sizing: border-box;
  /* 1 */
  padding: 0;
  /* 2 */
}
/**
 * Fix the cursor style for Chrome's increment/decrement buttons. For certain
 * `font-size` values of the `input`, it causes the cursor style of the
 * decrement button to change from `default` to `text`.
 */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  height: auto;
}
/**
 * 1. CUSTOM FOR WEBFLOW: changed from `textfield` to `none` to normalize iOS rounded input
 * 2. CUSTOM FOR WEBFLOW: box-sizing: content-box rule removed
 *    (similar to normalize.css >=4.0.0)
 */
input[type='search'] {
  -webkit-appearance: none;
  /* 1 */
}
/**
 * Remove inner padding and search cancel button in Safari and Chrome on OS X.
 * Safari (but not Chrome) clips the cancel button when the search input has
 * padding (and `textfield` appearance).
 */
input[type='search']::-webkit-search-cancel-button,
input[type='search']::-webkit-search-decoration {
  -webkit-appearance: none;
}
/**
 * Define consistent border, margin, and padding.
 */
fieldset {
  border: 1px solid #c0c0c0;
  margin: 0 2px;
  padding: 0.35em 0.625em 0.75em;
}
/**
 * 1. Correct `color` not being inherited in IE 8/9/10/11.
 * 2. Remove padding so people aren't caught out if they zero out fieldsets.
 */
legend {
  border: 0;
  /* 1 */
  padding: 0;
  /* 2 */
}
/**
 * Remove default vertical scrollbar in IE 8/9/10/11.
 */
textarea {
  overflow: auto;
}
/**
 * Don't inherit the `font-weight` (applied by a rule above).
 * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
 */
optgroup {
  font-weight: bold;
}
/* Tables
   ========================================================================== */
/**
 * Remove most spacing between table cells.
 */
table {
  border-collapse: collapse;
  border-spacing: 0;
}
td,
th {
  padding: 0;
}

:host {
  /* Brand Core Colors */
  --base-color-brand--burn: #D84315;
  --base-color-brand--burst: #FF5722; /* Vibrant Orange */
  --base-color-brand--glow: #2979FF; /* Electric Blue */
  --base-color-brand--mood-dust: #9e9e9e; /* Grey text */
  --base-color-brand--void: #050505; /* Deep Black Background */
  --base-color-brand--surface: #121212; /* Dark Charcoal Surface */
  --base-color-brand--void-50: rgba(255, 255, 255, 0.1); /* Subtle borders */
  
  /* Neutral Colors */
  --base-color-neutral--white: #ffffff;
  --base-color-neutral--black: #000000;
  --base-color-neutral--neutral-light: #888888;
  --base-color-neutral--neutral-dark: #2c2c2c;
  --base-color-neutral--neutral-darkest: #1a1a1a;
  --base-color-neutral--neutral-lightest: #f5f5f5;

  /* System Colors */
  --base-color-system--error-red: #ff453a;
  --base-color-system--error-red-light: rgba(255, 69, 58, 0.1);
  --base-color-system--success-green: #30d158;
  --base-color-system--success-green-light: rgba(48, 209, 88, 0.1);

  /* Theme Mapping */
  --_theme---background-color--background-primary: var(--base-color-brand--void);
  --_theme---background-color--background-secondary: var(--base-color-brand--surface);
  --_theme---background-color--background-tertiary: var(--base-color-neutral--neutral-darkest);
  --_theme---background-color--background-white: var(--base-color-neutral--white);
  --_theme---background-color--background-glass: rgba(18, 18, 18, 0.6);
  --_theme---background-color--input-background: var(--base-color-neutral--neutral-darkest);
  --_theme---background-color--background-error: var(--base-color-system--error-red-light);
  --_theme---background-color--background-success: var(--base-color-system--success-green-light);

  --_theme---border-color--border-primary: var(--base-color-brand--void-50);
  --_theme---border-color--border-input: var(--base-color-brand--void-50);
  --_theme---border-color--border-alternate: var(--base-color-neutral--neutral-dark);
  --_theme---border-color--border-active: var(--base-color-brand--burst);

  --_theme---text-color--text-primary: var(--base-color-neutral--white);
  --_theme---text-color--text-secondary: var(--base-color-neutral--neutral-light);
  --_theme---text-color--text-alternate: var(--base-color-brand--mood-dust);
  --_theme---text-color--text-error: var(--base-color-system--error-red);
  --_theme---text-color--text-success: var(--base-color-system--success-green);
  --_theme---text-color--text-placeholder-light: rgba(255, 255, 255, 0.3);
  --_theme---text-color--text-placeholder-dark: rgba(255, 255, 255, 0.5);

  --_theme---link-color--link-primary: var(--base-color-brand--glow);
  --_theme---link-color--link-secondary: var(--base-color-neutral--neutral-light);
  --_theme---link-color--link-alternate: var(--base-color-neutral--white);
}

body {
  font-family: "Inter", "Interdisplay", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--_theme---background-color--background-primary);
  color: var(--_theme---text-color--text-primary);
}

.lead-agent-chat {
  border: 1px solid var(--base-color-brand--void-50);
  border-radius: 1rem;
  background: var(--base-color-brand--void);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--base-color-neutral--white);
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 85vh; /* Fixed height relative to viewport to force scrolling */
  min-height: 600px;
  position: relative;
  overflow: hidden;
  font-smoothing: antialiased;
  -webkit-font-smoothing: antialiased;
}

/* Ensure box-sizing is border-box for all child elements to prevent layout breakage */
.lead-agent-chat,
.lead-agent-chat * {
  box-sizing: border-box;
}

/* ============================================
   SIDEBAR
   ============================================ */

.lead-agent-chat__sidebar {
  background: var(--base-color-brand--surface);
  border-right: 1px solid var(--base-color-brand--void-50);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}

.lead-agent-chat__sidebar-header {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lead-agent-chat__agent-selector {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--base-color-brand--void);
  border: 1px solid var(--base-color-brand--void-50);
  border-radius: 0.5rem;
  color: var(--base-color-neutral--white);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27white%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpolyline points=%276 9 12 15 18 9%27%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1em;
}

.lead-agent-chat__agent-selector:hover,
.lead-agent-chat__agent-selector:focus {
  border-color: var(--base-color-brand--burst);
}

.lead-agent-chat__new-thread-btn {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--base-color-brand--burst);
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: var(--base-color-neutral--white);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

.lead-agent-chat__new-thread-btn:hover {
  background: #E64A19;
  transform: translateY(-1px);
}

.lead-agent-chat__new-thread-btn:active {
  transform: translateY(0);
}

.lead-agent-chat__new-thread-icon {
  width: 16px;
  height: 16px;
}

/* ============================================
   THREAD LIST
   ============================================ */

.lead-agent-chat__thread-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.lead-agent-chat__thread-list::-webkit-scrollbar {
  width: 4px;
}

.lead-agent-chat__thread-list::-webkit-scrollbar-track {
  background: transparent;
}

.lead-agent-chat__thread-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.lead-agent-chat__threads-loading,
.lead-agent-chat__threads-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--base-color-neutral--neutral-light);
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lead-agent-chat__loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--base-color-brand--burst);
  border-radius: 50%;
  animation: spinnerRotate 0.8s linear infinite;
}

/* Thread item */
.lead-agent-chat__thread-item {
  padding: 0.75rem 0.875rem;
  margin-bottom: 0.25rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 150ms ease;
  border: 1px solid transparent;
  color: var(--base-color-neutral--neutral-light);
}

.lead-agent-chat__thread-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--base-color-neutral--white);
}

.lead-agent-chat__thread-item--active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--base-color-neutral--white);
  border-color: rgba(255, 255, 255, 0.05);
}

.lead-agent-chat__thread-title {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 0 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-agent-chat__thread-meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   MAIN CHAT AREA
   ============================================ */

.lead-agent-chat__main {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  position: relative;
  background: var(--base-color-brand--void);
  overflow: hidden; /* Stops container from growing with content */
}

/* Empty state - centered welcome screen */
.lead-agent-chat__empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 1.5rem;
  padding: 2rem;
  animation: fadeIn 0.6s ease-out;
  overflow-y: auto; /* Allow scrolling if empty state is tall */
}

.lead-agent-chat__sparkle-wrapper {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: transform 0.3s ease, filter 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lead-agent-chat__sparkle-wrapper:hover {
  transform: scale(1.1);
}

.lead-agent-chat__sparkle-wrapper:active {
  transform: scale(0.95);
}

.lead-agent-chat__sparkle-icon {
  width: 64px;
  height: 64px;
  color: var(--base-color-brand--glow);
  opacity: 1;
  filter: drop-shadow(0 0 20px rgba(41, 121, 255, 0.3));
  pointer-events: none;
}

.lead-agent-chat__sparkle-icon--animated {
  animation: sparklePulse 3s ease-in-out infinite;
}

.lead-agent-chat__welcome-text {
  font-family: "Interdisplay", "Inter", sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--base-color-neutral--white);
  text-align: center;
  margin: 0;
  max-width: 500px;
  background: linear-gradient(135deg, #fff 0%, #aaa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead-agent-chat__empty-subtitle {
  color: var(--base-color-neutral--neutral-light);
  font-size: 0.9375rem;
  line-height: 1.6;
  text-align: center;
  margin: 0;
  max-width: 420px;
}

.lead-agent-chat__prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  max-width: 600px;
  margin-top: 1rem;
}

.lead-agent-chat__prompt-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  padding: 0.625rem 1.25rem;
  color: var(--base-color-neutral--neutral-light);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lead-agent-chat__prompt-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--base-color-neutral--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lead-agent-chat__prompt-chip:active {
  transform: translateY(0);
}

.lead-agent-chat__heading {
  display: none;
}

.lead-agent-chat__label {
  display: none;
}

/* ============================================
   MESSAGE TRANSCRIPT
   ============================================ */

.lead-agent-chat__transcript {
  flex: 1 1 auto;
  width: 100%;
  height: 100%; /* Reinforce size constraint */
  min-height: 0;
  overflow-y: auto;
  padding: 2rem 0 1rem; /* Horizontal padding moved to message container */
  display: flex;
  flex-direction: column;
  gap: 2rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.lead-agent-chat__transcript::-webkit-scrollbar {
  width: 6px;
}

.lead-agent-chat__transcript::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* Container for message content to limit width and center it */
.lead-agent-chat__message-container {
  width: 100%;
  max-width: 800px; /* Claude-like width constraint */
  margin: 0 auto;
  padding: 0 1rem; /* Interior padding to prevent edge bumping */
  display: flex;
  flex-direction: column;
}

/* ============================================
   MESSAGES
   ============================================ */

.lead-agent-chat__message {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0;
  border: none;
  max-width: 100%;
  width: 100%;
  animation: messageSlideIn 0.3s ease-out forwards;
}

/* Assistant Message Style */
.lead-agent-chat__message--assistant {
  align-items: flex-start;
}

/* User Message Style */
.lead-agent-chat__message--user {
  align-items: flex-end;
}

.lead-agent-chat__message-sender {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--base-color-neutral--neutral-light);
  margin-bottom: 0.25rem;
  padding: 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lead-agent-chat__message-text {
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: anywhere; /* Better line breaking for long strings/URLs */
}

/* User Bubble */
.lead-agent-chat__message--user .lead-agent-chat__message-text {
  background: var(--base-color-neutral--neutral-darkest);
  color: var(--base-color-neutral--white);
  padding: 0.875rem 1.125rem;
  border-radius: 1rem 1rem 0 1rem;
  border: 1px solid var(--base-color-brand--void-50);
  max-width: 85%; /* Limit user bubble width */
  text-align: left;
}

/* Assistant Bubble (Minimalist, text-focused) */
.lead-agent-chat__message--assistant .lead-agent-chat__message-text {
  background: rgba(255, 255, 255, 0.03);
  color: var(--base-color-neutral--white);
  padding: 0.25rem 0.75rem;
  width: 100%;
  border-radius: 0.75rem;
}

/* ============================================
    COMPOSER (INPUT AREA)
    ============================================ */

.lead-agent-chat__composer-wrapper {
  flex: 0 0 auto; /* Don't shrink */
  padding: 1rem 1rem 2rem; /* Bottom padding for spacing */
  background: linear-gradient(to top, var(--base-color-brand--void) 80%, rgba(5, 5, 5, 0));
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

.lead-agent-chat__composer {
  display: flex;
  align-items: flex-end; /* Align bottom for multiline */
  gap: 0.75rem;
  background: var(--base-color-brand--surface);
  border: 1px solid var(--base-color-brand--void-50);
  border-radius: 1.5rem;
  padding: 0.75rem 1rem;
  transition: all 200ms ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.lead-agent-chat__composer:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  background: #1a1a1a;
}

.lead-agent-chat__composer-main {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.lead-agent-chat__composer-icon {
  width: 20px;
  height: 20px;
  color: var(--base-color-brand--glow);
  flex-shrink: 0;
  margin-bottom: 0.5rem; /* Align with single line text */
}

.lead-agent-chat__input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lead-agent-chat__input--message {
  flex: 1 1 auto;
  background: transparent;
  border: none;
  padding: 0.5rem 0;
  color: var(--base-color-neutral--white);
  font-size: 1rem;
  line-height: 1.5;
  resize: none; /* If we switch to textarea */
  min-height: 24px;
}

.lead-agent-chat__input--message:focus {
  outline: none;
}

.lead-agent-chat__input--message::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.lead-agent-chat__input-hints {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  min-height: 1rem;
}

.lead-agent-chat__char-count {
  font-family: "JetBrains Mono", monospace;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s ease;
}

.lead-agent-chat__char-count.warning {
  color: #f59e0b;
}

.lead-agent-chat__char-count.error {
  color: #ef4444;
}

.lead-agent-chat__keyboard-hint {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: rgba(255, 255, 255, 0.3);
}

.lead-agent-chat__keyboard-hint kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 0.125rem 0.375rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

/* Submit button */
.lead-agent-chat__submit {
  border: none;
  border-radius: 0.5rem;
  background: var(--base-color-brand--burst);
  color: white;
  padding: 0.35rem;
  cursor: pointer;
  transition: all 150ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 0.15rem;
  width: 32px;
  height: 32px;
}

.lead-agent-chat__submit:hover:not(:disabled) {
  background: #E64A19;
  transform: scale(1.05);
}

.lead-agent-chat__submit:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.2);
  cursor: not-allowed;
}

.lead-agent-chat__submit-icon {
  width: 18px;
  height: 18px;
}

/* Stop button */
.lead-agent-chat__stop-btn {
  border: none;
  border-radius: 0.5rem;
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 0.35rem;
  cursor: pointer;
  transition: all 150ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 0.15rem;
  width: 32px;
  height: 32px;
}

.lead-agent-chat__stop-btn:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* ============================================
   TYPING INDICATOR
   ============================================ */

.lead-agent-chat__subagent-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 0.5rem auto;
  max-width: 800px;
  background: var(--base-color-brand--surface);
  border: 1px solid var(--base-color-brand--void-50);
  border-radius: 0.5rem;
  color: var(--base-color-neutral--neutral-light);
  font-size: 0.875rem;
  animation: fadeIn 0.3s ease-in;
}

.lead-agent-chat__subagent-icon {
  width: 16px;
  height: 16px;
  color: var(--base-color-brand--primary);
  animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   ROUTING INDICATOR (Agent Network)
   ============================================ */

.lead-agent-chat__routing-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  margin: 0.5rem auto;
  max-width: 800px;
  background: rgba(41, 121, 255, 0.1);
  border: 1px solid var(--base-color-brand--glow);
  border-radius: 0.5rem;
  color: var(--base-color-brand--glow);
  font-size: 0.813rem;
  animation: fadeIn 0.3s ease-in;
}

.lead-agent-chat__routing-icon {
  width: 14px;
  height: 14px;
  animation: spin 1.5s linear infinite;
}

/* ============================================
   TOOL CALLS INDICATOR
   ============================================ */

.lead-agent-chat__tool-calls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  margin: 0.5rem auto;
  max-width: 800px;
  width: 100%;
}

.lead-agent-chat__tool-call {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--base-color-brand--void-50);
  border-radius: 0.5rem;
  font-size: 0.813rem;
  color: var(--base-color-neutral--neutral-light);
  animation: fadeIn 0.2s ease-in;
  overflow: hidden;
  transition: all 0.2s ease;
}

.lead-agent-chat__tool-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  width: 100%;
}

.lead-agent-chat__tool-call--calling {
  border-color: rgba(41, 121, 255, 0.3);
  background: rgba(41, 121, 255, 0.05);
}

.lead-agent-chat__tool-call--calling .lead-agent-chat__tool-icon {
  color: var(--base-color-brand--glow);
}

.lead-agent-chat__tool-call--complete {
  border-color: rgba(34, 197, 94, 0.2);
}

.lead-agent-chat__tool-call--complete .lead-agent-chat__tool-icon {
  color: #22c55e;
}

.lead-agent-chat__tool-call--error {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

.lead-agent-chat__tool-call--error .lead-agent-chat__tool-icon {
  color: #ef4444;
}

.lead-agent-chat__tool-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.lead-agent-chat__tool-name {
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  color: var(--base-color-neutral--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.lead-agent-chat__tool-status-text {
  font-size: 0.75rem;
  opacity: 0.7;
  flex-shrink: 0;
}

.lead-agent-chat__tool-args {
  padding: 0.5rem 0.75rem 0.75rem 2.25rem; /* Indent to align with text start */
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 100px;
  overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: -1px; /* Overlap border if not visible */
  display: block;
}

/* Custom scrollbar for args */
.lead-agent-chat__tool-args::-webkit-scrollbar {
  width: 4px;
}
.lead-agent-chat__tool-args::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* ============================================
   REASONING/THINKING INDICATOR
   ============================================ */

.lead-agent-chat__reasoning {
  padding: 0.75rem 1rem;
  margin: 0.5rem auto;
  max-width: 800px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 0.5rem;
  animation: fadeIn 0.3s ease-in;
}

.lead-agent-chat__reasoning-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #a78bfa;
  font-size: 0.813rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

.lead-agent-chat__reasoning-icon {
  width: 14px;
  height: 14px;
  animation: spin 2s linear infinite;
}

.lead-agent-chat__reasoning-content {
  font-size: 0.75rem;
  color: var(--base-color-neutral--neutral-light);
  opacity: 0.7;
  line-height: 1.4;
  font-style: italic;
  max-height: 60px;
  overflow: hidden;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.lead-agent-chat__typing-indicator {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Align left */
  gap: 6px;
  padding: 0.5rem 0.75rem;
  min-height: 24px;
}

.lead-agent-chat__typing-dot {
  width: 6px;
  height: 6px;
  background: var(--base-color-brand--burst);
  border-radius: 50%;
  animation: typingBounce 1.4s ease-in-out infinite;
  opacity: 0.7;
}

/* ============================================
   MARKDOWN & CODE STYLING
   ============================================ */

.markdown-block h1,
.markdown-block h2,
.markdown-block h3 {
  color: var(--base-color-neutral--white);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.markdown-block a {
  color: var(--base-color-brand--glow);
  text-decoration: none;
  border-bottom: 1px solid rgba(41, 121, 255, 0.3);
}

.markdown-block a:hover {
  border-bottom-color: var(--base-color-brand--glow);
}

.markdown-block code {
  background: rgba(255, 255, 255, 0.1);
  color: var(--base-color-brand--burst);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.code-block-wrapper {
  position: relative;
  margin: 1rem 0;
}

.code-block {
  border: 1px solid var(--base-color-brand--void-50);
  border-radius: 0.75rem;
  background: #0d0d0d;
  overflow: hidden;
}

.code-block pre {
  background: #0d0d0d !important;
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
}

/* Copy Button */
.copy-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
  color: var(--base-color-neutral--neutral-light);
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--base-color-neutral--white);
}

.copy-icon {
  width: 14px;
  height: 14px;
}

.copy-icon--success {
  color: #22c55e;
}

/* ============================================
   EXECUTION LOG (THOUGHT PROCESS)
   ============================================ */

.execution-log {
  margin-bottom: 0.75rem;
  border: 1px solid var(--base-color-brand--void-50);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.execution-log__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--base-color-neutral--neutral-light);
  transition: background 0.2s ease;
}

.execution-log__header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.execution-log__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.execution-log__count {
  opacity: 0.5;
  font-weight: 400;
}

.execution-log__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--base-color-neutral--neutral-light);
}

.execution-log__status-dot--pulse {
  background: var(--base-color-brand--burst);
  animation: pulse 2s infinite;
}

.execution-log__status-dot--success {
  background: #22c55e;
}

.execution-log__chevron {
  transition: transform 0.2s ease;
  opacity: 0.5;
}

.execution-log__chevron--open {
  transform: rotate(180deg);
}

.execution-log__content {
  border-top: 1px solid var(--base-color-brand--void-50);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.5rem 0;
}

/* Execution Step */
.execution-step {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  border-left: 2px solid transparent;
}

.execution-step--running {
  border-left-color: var(--base-color-brand--burst);
  background: rgba(255, 87, 34, 0.05);
}

.execution-step--complete {
  border-left-color: transparent;
}

.execution-step--failed {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.execution-step__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.execution-step__icon {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--base-color-neutral--neutral-light);
}

.execution-step__title {
  flex: 1;
  color: var(--base-color-neutral--white);
  font-weight: 500;
}

.execution-step__type {
  font-size: 0.7rem;
  color: var(--base-color-neutral--neutral-light);
  text-transform: uppercase;
  padding: 0.125rem 0.375rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.execution-step__details {
  margin-top: 0.5rem;
  margin-left: 1.625rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0.375rem;
  overflow-x: auto;
}

.execution-step__details pre {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--base-color-neutral--neutral-light);
  white-space: pre-wrap;
  word-break: break-all;
}

/* Execution Steps Container */
.lead-agent-chat__execution-steps {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--base-color-brand--void-50);
  border-radius: 0.5rem;
}

/* Workflow-specific styling */
.execution-step--workflow {
  border-left-color: #8b5cf6;
}

.execution-step--workflow.execution-step--running {
  background: rgba(139, 92, 246, 0.05);
}

/* Agent-specific styling */
.execution-step--agent {
  border-left-color: var(--base-color-brand--glow, #2979FF);
}

.execution-step--agent.execution-step--running {
  background: rgba(41, 121, 255, 0.05);
}

/* Routing-specific styling */
.execution-step--routing {
  border-left-color: #f59e0b;
}

.execution-step--routing.execution-step--running {
  background: rgba(245, 158, 11, 0.05);
}

/* Completion-specific styling */
.execution-step--completion {
  border-left-color: #22c55e;
}

.execution-step--completion.execution-step--failed {
  border-left-color: #ef4444;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(255, 87, 34, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spinnerRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes sparklePulse {
  0%, 100% { 
    opacity: 0.8;
    transform: scale(1);
    filter: drop-shadow(0 0 15px rgba(41, 121, 255, 0.2));
  }
  50% { 
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 0 25px rgba(41, 121, 255, 0.5));
  }
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================
   MOBILE HEADER & ICONS
   ============================================ */

.lead-agent-chat__mobile-header {
  display: none; /* Hidden on desktop */
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--base-color-brand--void);
  border-bottom: 1px solid var(--base-color-brand--void-50);
  height: 60px;
  flex-shrink: 0;
}

.lead-agent-chat__mobile-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--base-color-neutral--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-agent-chat__menu-btn,
.lead-agent-chat__mobile-new-thread,
.lead-agent-chat__mobile-close {
  background: transparent;
  border: none;
  color: var(--base-color-neutral--neutral-light);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.lead-agent-chat__menu-btn:hover,
.lead-agent-chat__mobile-new-thread:hover,
.lead-agent-chat__mobile-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--base-color-neutral--white);
}

/* Close button for sidebar on mobile */
.lead-agent-chat__mobile-close {
  display: none; /* Hidden on desktop */
  margin-bottom: 1rem;
  align-self: flex-end;
}

.lead-agent-chat__icon-md {
  width: 24px;
  height: 24px;
}

.lead-agent-chat__icon-sm {
  width: 20px;
  height: 20px;
}

/* ============================================
   MOBILE OVERLAY
   ============================================ */

.lead-agent-chat__mobile-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 15;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease-out;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .lead-agent-chat {
    grid-template-columns: 1fr;
    border-radius: 0;
    /* Use dvh for actual viewport height on mobile browsers */
    height: 100dvh; 
    max-height: 100dvh;
    border: none;
  }

  /* Main Area Changes */
  .lead-agent-chat__main {
    padding: 0;
    width: 100%;
  }

  .lead-agent-chat__mobile-header {
    display: flex; /* Show on mobile */
  }

  .lead-agent-chat__mobile-overlay {
    display: block; /* Enabled logic handles conditional rendering in React */
  }

  /* Sidebar - Slide-out Drawer */
  .lead-agent-chat__sidebar {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 300px;
    z-index: 20;
    background: var(--base-color-brand--surface);
    border-right: 1px solid var(--base-color-brand--void-50);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .lead-agent-chat__sidebar--open {
    transform: translateX(0);
  }

  .lead-agent-chat__mobile-close {
    display: flex; /* Show inside sidebar on mobile */
  }

  /* Adjust padding inside sidebar */
  .lead-agent-chat__sidebar-header {
    padding-top: 1rem;
  }

  /* Chat Area Adjustments */
  .lead-agent-chat__transcript {
    padding: 1rem 0;
  }
  
  .lead-agent-chat__composer-wrapper {
    padding: 0.75rem;
    background: var(--base-color-brand--void); /* Solid background on mobile usually better */
    border-top: 1px solid var(--base-color-brand--void-50);
  }

  /* Message bubbles can be slightly wider on mobile */
  .lead-agent-chat__message--user .lead-agent-chat__message-text {
    max-width: 90%;
  }

  /* Empty state on mobile */
  .lead-agent-chat__prompt-suggestions {
    flex-direction: column;
    align-items: center;
  }

  .lead-agent-chat__prompt-chip {
    width: 100%;
    text-align: center;
  }

  /* Hide keyboard hint on mobile */
  .lead-agent-chat__keyboard-hint {
    display: none;
  }
}

/* ============================================
   ARTIFACT PANEL (SIDE DOCUMENT VIEW)
   ============================================ */

.lead-agent-chat--with-artifact {
  grid-template-columns: 260px 1fr 400px;
}

.artifact-panel {
  background: var(--base-color-brand--surface);
  border-left: 1px solid var(--base-color-brand--void-50);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 320px;
}

.artifact-panel__header {
  padding: 1rem;
  border-bottom: 1px solid var(--base-color-brand--void-50);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.artifact-panel__title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--base-color-neutral--white);
  font-weight: 600;
  font-size: 0.875rem;
}

.artifact-panel__icon {
  color: var(--base-color-brand--glow);
}

.artifact-panel__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.artifact-panel__close {
  background: transparent;
  border: none;
  color: var(--base-color-neutral--neutral-light);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.artifact-panel__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--base-color-neutral--white);
}

.artifact-panel__content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.artifact-panel__scroll-area {
  height: 100%;
  overflow-y: auto;
  padding: 1.5rem;
  /* Use lighter background for document readability if needed, 
     but keeping dark theme consistency for now */
}

/* Code with line numbers */
.artifact-panel__code-with-lines {
  display: flex;
  background: #0d0d0d;
  border: 1px solid var(--base-color-brand--void-50);
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 1rem;
}

.artifact-panel__line-numbers {
  background: rgba(0, 0, 0, 0.3);
  border-right: 1px solid var(--base-color-brand--void-50);
  padding: 1rem 0.5rem;
  user-select: none;
  min-width: 3rem;
  text-align: right;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.artifact-panel__line-number {
  display: block;
}

.artifact-panel__code {
  flex: 1;
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--base-color-neutral--neutral-light);
  background: transparent;
}

.artifact-panel__code code {
  background: transparent;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

/* Document view with stats */
.artifact-panel__document {
  display: flex;
  flex-direction: column;
}

.artifact-panel__document-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--base-color-brand--void-50);
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  flex-wrap: wrap;
}

.artifact-panel__stat {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.artifact-panel__copy-all {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
  color: var(--base-color-neutral--neutral-light);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}

.artifact-panel__copy-all:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--base-color-neutral--white);
}

/* Adjust scrollbar for panel */
.artifact-panel__scroll-area::-webkit-scrollbar {
  width: 6px;
}
.artifact-panel__scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* Expand View Button */
.expand-artifact-btn {
  opacity: 0;
  position: absolute;
  top: 4px;
  right: 36px; /* Position next to copy button */
  transition: opacity 0.2s ease;
  z-index: 5;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  padding: 0.35rem;
  border-radius: 0.375rem;
  color: var(--base-color-neutral--neutral-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lead-agent-chat__message:hover .expand-artifact-btn {
  opacity: 1;
}

.expand-artifact-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  color: var(--base-color-neutral--white);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .lead-agent-chat--with-artifact {
    grid-template-columns: 260px 1fr;
  }
  
  .artifact-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 500px;
    z-index: 20;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }
}

@media (max-width: 768px) {
  .lead-agent-chat--with-artifact {
    grid-template-columns: 1fr;
  }

  .artifact-panel {
    max-width: 100%;
  }
}

/* ============================================
   LOADING & ERROR STATES (businessId)
   ============================================ */

.lead-agent-chat--loading,
.lead-agent-chat--error {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-template-columns: 1fr;
}

.lead-agent-chat__loading-state,
.lead-agent-chat__error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
  color: var(--base-color-neutral--neutral-light);
}

.lead-agent-chat__loading-state span {
  font-size: 0.875rem;
}

.lead-agent-chat__error-state h3 {
  margin: 0;
  color: var(--base-color-neutral--white);
  font-size: 1.125rem;
  font-weight: 600;
}

.lead-agent-chat__error-state p {
  margin: 0;
  font-size: 0.875rem;
}

.lead-agent-chat__error-icon {
  font-size: 2rem;
}

/* ============================================
   ARTIFACT BLOCK (In-chat clickable card)
   ============================================ */

.artifact-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  margin: 0.75rem 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--base-color-brand--void-50);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 400px;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.artifact-block:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--base-color-brand--glow);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 121, 255, 0.15);
}

.artifact-block:active:not(:disabled) {
  transform: translateY(0);
}

.artifact-block:disabled {
  cursor: default;
  opacity: 0.8;
}

.artifact-block--streaming {
  background: rgba(255, 255, 255, 0.02);
  border-style: dashed;
}

.artifact-block__icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(41, 121, 255, 0.1);
  border: 1px solid rgba(41, 121, 255, 0.2);
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.artifact-block__icon {
  color: var(--base-color-brand--glow);
}

.artifact-block__spinner {
  animation: spin 1s linear infinite;
}

.artifact-block__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.artifact-block__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--base-color-neutral--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artifact-block__type {
  font-size: 0.75rem;
  color: var(--base-color-neutral--neutral-light);
  opacity: 0.7;
}

.artifact-block__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.375rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.artifact-block:hover:not(:disabled) .artifact-block__action {
  background: var(--base-color-brand--glow);
}

.artifact-block__action-icon {
  color: var(--base-color-neutral--neutral-light);
}

.artifact-block:hover:not(:disabled) .artifact-block__action-icon {
  color: var(--base-color-neutral--white);
}

/* ============================================
   ARTIFACT PANEL ENHANCEMENTS (Type-aware)
   ============================================ */

.artifact-panel__title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.artifact-panel__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--base-color-neutral--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artifact-panel__type-label {
  font-size: 0.6875rem;
  color: var(--base-color-neutral--neutral-light);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* JSON View */
.artifact-panel__json-view {
  display: flex;
  flex-direction: column;
}

.artifact-panel__json-error {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.375rem;
  color: #f87171;
  font-size: 0.8125rem;
}

/* HTML View */
.artifact-panel__html-view {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.artifact-panel__html-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.artifact-panel__action-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
  color: var(--base-color-neutral--neutral-light);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.artifact-panel__action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--base-color-neutral--white);
}

.artifact-panel__action-btn--active {
  background: var(--base-color-brand--glow);
  border-color: var(--base-color-brand--glow);
  color: var(--base-color-neutral--white);
}

.artifact-panel__action-btn--active:hover {
  background: #1e6ae3;
  border-color: #1e6ae3;
}

.artifact-panel__html-preview {
  flex: 1;
  min-height: 400px;
  border: 1px solid var(--base-color-brand--void-50);
  border-radius: 0.5rem;
  overflow: hidden;
  background: #ffffff;
}

.artifact-panel__iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: none;
}
/* ============================================
   AI ELEMENTS - Component Styles
   Gamma Brand Theme
   ============================================ */

/* ============================================
   MESSAGE COMPONENTS
   ============================================ */

.ai-elements-message {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  animation: ai-elements-message-slide-in 0.3s ease-out forwards;
}

.ai-elements-message--user {
  align-items: flex-end;
}

.ai-elements-message--assistant {
  align-items: flex-start;
}

/* Cursor is rendered via JSX span, not CSS pseudo-element */

.ai-elements-message-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--base-color-neutral--neutral-light, #999);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 0.5rem;
}

.ai-elements-message-content {
  font-size: 1rem;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.ai-elements-message--user .ai-elements-message-content {
  background: var(--base-color-neutral--neutral-darkest, #1a1a1a);
  color: var(--base-color-neutral--white, #fff);
  padding: 0.875rem 1.125rem;
  border-radius: 1rem 1rem 0 1rem;
  border: 1px solid var(--base-color-brand--void-50, rgba(255, 255, 255, 0.05));
  max-width: 85%;
}

.ai-elements-message--assistant .ai-elements-message-content {
  background: rgba(255, 255, 255, 0.03);
  color: var(--base-color-neutral--white, #fff);
  padding: 0.5rem 0.75rem;
  width: 100%;
  border-radius: 0.75rem;
}

.ai-elements-message-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--base-color-brand--burst, #FF5722);
  margin-left: 2px;
  animation: ai-elements-cursor-blink 1s step-end infinite;
  vertical-align: text-bottom;
}

.ai-elements-message-response {
  line-height: 1.6;
}

.ai-elements-message-response--incomplete::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--base-color-brand--burst, #FF5722);
  margin-left: 2px;
  animation: ai-elements-cursor-blink 1s step-end infinite;
}

/* Message Actions */
.ai-elements-message-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ai-elements-message:hover .ai-elements-message-actions {
  opacity: 1;
}

.ai-elements-message-action {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  color: var(--base-color-neutral--neutral-light, #999);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-elements-message-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--base-color-neutral--white, #fff);
}

.ai-elements-message-action--active {
  color: var(--base-color-brand--burst, #FF5722);
}

.ai-elements-message-action--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Message Shimmer */
.ai-elements-message-shimmer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
}

.ai-elements-message-shimmer-line {
  height: 1rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 100%);
  background-size: 200% 100%;
  border-radius: 0.25rem;
  animation: ai-elements-shimmer 1.5s ease-in-out infinite;
}

/* Message Typing Indicator */
.ai-elements-message-typing {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem;
}

.ai-elements-message-typing-dot {
  width: 6px;
  height: 6px;
  background: var(--base-color-brand--burst, #FF5722);
  border-radius: 50%;
  animation: ai-elements-typing-bounce 1.4s ease-in-out infinite;
  opacity: 0.7;
}

.ai-elements-message-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-elements-message-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* ============================================
   REASONING COMPONENT
   ============================================ */

.ai-elements-reasoning {
  margin: 0.75rem 0;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 0.5rem;
  background: rgba(139, 92, 246, 0.1);
  overflow: hidden;
}

.ai-elements-reasoning--streaming {
  border-color: rgba(139, 92, 246, 0.5);
}

.ai-elements-reasoning-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #a78bfa;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.2s ease;
}

.ai-elements-reasoning-trigger:hover {
  background: rgba(139, 92, 246, 0.1);
}

.ai-elements-reasoning-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.ai-elements-reasoning-icon--animated {
  animation: ai-elements-spin 2s linear infinite;
}

.ai-elements-reasoning-label {
  flex: 1;
  text-align: left;
}

.ai-elements-reasoning-pulse {
  width: 8px;
  height: 8px;
  background: #a78bfa;
  border-radius: 50%;
  animation: ai-elements-pulse 2s ease-in-out infinite;
}

.ai-elements-reasoning-chevron {
  transition: transform 0.2s ease;
  opacity: 0.7;
}

.ai-elements-reasoning-chevron--open {
  transform: rotate(180deg);
}

.ai-elements-reasoning-content {
  padding: 0 1rem 1rem;
  overflow: hidden;
  animation: ai-elements-collapse-open 0.2s ease-out;
}

.ai-elements-reasoning-content-inner {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--base-color-neutral--neutral-light, #999);
  font-style: italic;
  white-space: pre-wrap;
}

.ai-elements-reasoning-text {
  margin: 0;
}

.ai-elements-reasoning-cursor {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background: #a78bfa;
  margin-left: 2px;
  animation: ai-elements-cursor-blink 1s step-end infinite;
  vertical-align: text-bottom;
}

/* ============================================
   TOOL COMPONENT
   ============================================ */

.ai-elements-tool {
  border: 1px solid var(--base-color-brand--void-50, rgba(255, 255, 255, 0.05));
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  margin: 0.5rem 0;
}

.ai-elements-tool--running {
  border-color: rgba(41, 121, 255, 0.3);
  background: rgba(41, 121, 255, 0.05);
}

.ai-elements-tool--complete {
  border-color: rgba(34, 197, 94, 0.2);
}

.ai-elements-tool--failed {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

.ai-elements-tool-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ai-elements-tool-trigger:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
}

.ai-elements-tool-trigger:disabled {
  cursor: default;
}

.ai-elements-tool-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex: 1;
}

.ai-elements-tool-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--base-color-neutral--neutral-light, #999);
}

.ai-elements-tool-icon--spinning {
  animation: ai-elements-spin 1s linear infinite;
}

.ai-elements-tool-icon--success {
  color: #22c55e;
}

.ai-elements-tool-icon--error {
  color: #ef4444;
}

.ai-elements-tool-name {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--base-color-neutral--white, #fff);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-elements-tool-status-badge {
  font-size: 0.75rem;
  color: var(--base-color-neutral--neutral-light, #999);
  opacity: 0.7;
}

.ai-elements-tool-chevron {
  transition: transform 0.2s ease;
  opacity: 0.5;
  color: var(--base-color-neutral--neutral-light, #999);
}

.ai-elements-tool-chevron--open {
  transform: rotate(180deg);
}

.ai-elements-tool-content {
  border-top: 1px solid var(--base-color-brand--void-50, rgba(255, 255, 255, 0.05));
  background: rgba(0, 0, 0, 0.2);
  animation: ai-elements-collapse-open 0.2s ease-out;
}

.ai-elements-tool-section {
  padding: 0.75rem;
}

.ai-elements-tool-section + .ai-elements-tool-section {
  border-top: 1px solid var(--base-color-brand--void-50, rgba(255, 255, 255, 0.05));
}

.ai-elements-tool-section--error {
  background: rgba(239, 68, 68, 0.05);
}

.ai-elements-tool-section-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--base-color-neutral--neutral-light, #999);
  margin-bottom: 0.5rem;
}

.ai-elements-tool-code {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--base-color-neutral--neutral-light, #999);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 150px;
  overflow-y: auto;
}

.ai-elements-tool-code--error {
  color: #ef4444;
}

/* Tool Group */
.ai-elements-tool-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ai-elements-tool-group-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--base-color-neutral--neutral-light, #999);
  margin-bottom: 0.25rem;
}

/* ============================================
   SOURCES COMPONENT
   ============================================ */

.ai-elements-sources {
  margin: 0.75rem 0;
  border: 1px solid rgba(41, 121, 255, 0.2);
  border-radius: 0.5rem;
  background: rgba(41, 121, 255, 0.05);
  overflow: hidden;
}

.ai-elements-sources-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--base-color-brand--glow, #2979FF);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.2s ease;
}

.ai-elements-sources-trigger:hover {
  background: rgba(41, 121, 255, 0.1);
}

.ai-elements-sources-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.ai-elements-sources-label {
  flex: 1;
  text-align: left;
}

.ai-elements-sources-chevron {
  transition: transform 0.2s ease;
  opacity: 0.7;
}

.ai-elements-sources-chevron--open {
  transform: rotate(180deg);
}

.ai-elements-sources-content {
  border-top: 1px solid rgba(41, 121, 255, 0.2);
  animation: ai-elements-collapse-open 0.2s ease-out;
}

.ai-elements-sources-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem;
}

.ai-elements-source {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0.375rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.ai-elements-source:hover {
  background: rgba(255, 255, 255, 0.05);
}

.ai-elements-source-favicon {
  width: 16px;
  height: 16px;
  border-radius: 0.25rem;
  object-fit: contain;
}

.ai-elements-source-favicon-placeholder {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--base-color-neutral--neutral-light, #999);
}

.ai-elements-source-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.ai-elements-source-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--base-color-neutral--white, #fff);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-elements-source-domain {
  font-size: 0.6875rem;
  color: var(--base-color-neutral--neutral-light, #999);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-elements-source-external {
  flex-shrink: 0;
  color: var(--base-color-neutral--neutral-light, #999);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ai-elements-source:hover .ai-elements-source-external {
  opacity: 1;
}

/* ============================================
   PROMPT INPUT COMPONENT
   ============================================ */

.ai-elements-prompt-input {
  display: flex;
  flex-direction: column;
  background: var(--base-color-brand--surface, #111);
  border: 1px solid var(--base-color-brand--void-50, rgba(255, 255, 255, 0.05));
  border-radius: 1.5rem;
  padding: 0.75rem 1rem;
  transition: all 200ms ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.ai-elements-prompt-input--focused {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  background: #1a1a1a;
}

.ai-elements-prompt-input--disabled {
  opacity: 0.7;
  pointer-events: none;
}

.ai-elements-prompt-input-body {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.ai-elements-prompt-input-textarea {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.5rem 0;
  color: var(--base-color-neutral--white, #fff);
  font-size: 1rem;
  line-height: 1.5;
  resize: none;
  min-height: 24px;
  max-height: 150px;
  overflow-y: hidden;
}

.ai-elements-prompt-input-textarea:focus {
  outline: none;
}

.ai-elements-prompt-input-textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.ai-elements-prompt-input-submit {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--base-color-brand--burst, #FF5722);
  border: none;
  border-radius: 0.5rem;
  color: white;
  cursor: pointer;
  transition: all 150ms ease;
  margin-bottom: 0.15rem;
}

.ai-elements-prompt-input-submit:hover:not(:disabled) {
  background: #E64A19;
  transform: scale(1.05);
}

.ai-elements-prompt-input-submit--disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.2);
  cursor: not-allowed;
}

.ai-elements-prompt-input-submit--streaming {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.ai-elements-prompt-input-submit--streaming:hover {
  background: rgba(239, 68, 68, 0.3);
}

.ai-elements-prompt-input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-elements-prompt-input-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-elements-prompt-input-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  color: var(--base-color-neutral--neutral-light, #999);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-elements-prompt-input-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: var(--base-color-neutral--white, #fff);
}

.ai-elements-prompt-input-button--ghost {
  opacity: 0.7;
}

.ai-elements-prompt-input-char-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.ai-elements-prompt-input-char-count--warning {
  color: #f59e0b;
}

.ai-elements-prompt-input-char-count--error {
  color: #ef4444;
}

.ai-elements-prompt-input-hints {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
}

.ai-elements-prompt-input-hints kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 0.125rem 0.375rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
}

/* Attachments */
.ai-elements-prompt-input-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ai-elements-prompt-input-attachment {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
}

.ai-elements-prompt-input-attachment-preview {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 0.25rem;
}

.ai-elements-prompt-input-attachment-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
  color: var(--base-color-neutral--neutral-light, #999);
}

.ai-elements-prompt-input-attachment-name {
  font-size: 0.75rem;
  color: var(--base-color-neutral--neutral-light, #999);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-elements-prompt-input-attachment-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  background: transparent;
  border: none;
  border-radius: 0.25rem;
  color: var(--base-color-neutral--neutral-light, #999);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-elements-prompt-input-attachment-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* ============================================
   CONVERSATION COMPONENT
   ============================================ */

.ai-elements-conversation {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.ai-elements-conversation-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scroll-behavior: smooth;
}

.ai-elements-conversation-scroll-button {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--base-color-brand--surface, #111);
  border: 1px solid var(--base-color-brand--void-50, rgba(255, 255, 255, 0.05));
  border-radius: 50%;
  color: var(--base-color-neutral--neutral-light, #999);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ai-elements-conversation-scroll-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--base-color-neutral--white, #fff);
}

/* ============================================
   TOOLTIP
   ============================================ */

.ai-elements-tooltip {
  background: var(--base-color-brand--surface, #111);
  border: 1px solid var(--base-color-brand--void-50, rgba(255, 255, 255, 0.05));
  border-radius: 0.375rem;
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
  color: var(--base-color-neutral--white, #fff);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.ai-elements-tooltip-arrow {
  fill: var(--base-color-brand--surface, #111);
}

/* ============================================
   LOADER COMPONENT
   ============================================ */

.ai-elements-loader {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-elements-loader-dot {
  width: 6px;
  height: 6px;
  background: var(--base-color-brand--burst, #FF5722);
  border-radius: 50%;
  animation: ai-elements-typing-bounce 1.4s ease-in-out infinite;
}

.ai-elements-loader-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-elements-loader-dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes ai-elements-message-slide-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ai-elements-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes ai-elements-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ai-elements-pulse {
  0% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(167, 139, 250, 0); }
  100% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0); }
}

@keyframes ai-elements-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

@keyframes ai-elements-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes ai-elements-collapse-open {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ai-elements-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

