@charset "UTF-8";
/* Defaults applied via :where() so they have zero specificity — any theme override (loaded after) wins. */
:where(.eui-chat-container) {
  --euic-bg: #ffffff;
  --euic-bg-subtle: #f1f5f9;
  --euic-border: #e2e8f0;
  --euic-border-subtle: #eef2f6;
  --euic-text: #1e293b;
  --euic-text-muted: #64748b;
  --euic-primary: #2563eb;
  --euic-secondary: #1d4ed8;
  --euic-font: #ffffff;
  --euic-bubble-bot-bg: #ffffff;
  --euic-bubble-bot-fg: #1e293b;
  --euic-bubble-user-bg: #2563eb;
  --euic-bubble-user-fg: #ffffff;
  --euic-z: 10009;
  --euic-z-window: 10010;
  --euic-z-popover: 10050;
}

.eui-chat-container {
  position: fixed;
  z-index: var(--euic-z);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--euic-text);
}
.eui-chat-container *, .eui-chat-container *::before, .eui-chat-container *::after {
  box-sizing: border-box;
}
.eui-chat-container button {
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  border: none;
  color: inherit;
  padding: 0;
}
.eui-chat-container.eui-chat-mode-dark {
  --euic-bg: #0f172a;
  --euic-bg-subtle: #1e293b;
  --euic-border: #334155;
  --euic-border-subtle: #1e293b;
  --euic-text: #e2e8f0;
  --euic-text-muted: #94a3b8;
  --euic-bubble-bot-bg: #1e293b;
  --euic-bubble-bot-fg: #e2e8f0;
}
.eui-chat-container.eui-chat-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none;
  max-height: none;
}
.eui-chat-container.eui-chat-mobile:not(.eui-chat-fullscreen) {
  left: 8px !important;
  right: 8px !important;
  bottom: 8px !important;
  top: 8px !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
}

.eui-chat-window {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: var(--euic-bg);
  border-radius: 10px;
  box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.13), -5px 5px 12px rgba(0, 0, 0, 0.1);
  z-index: var(--euic-z-window);
  overflow: hidden;
  position: relative;
}
.eui-chat-window.eui-chat-no-shadow {
  box-shadow: none;
  border-radius: 0;
}

/* ============== HEADER ============== */
.eui-chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--euic-primary);
  color: var(--euic-font);
  flex-shrink: 0;
  user-select: none;
}
.eui-chat-header.eui-chat-header-draggable {
  cursor: move;
  touch-action: none;
}
.eui-chat-header .eui-chat-header-logo {
  flex-shrink: 0;
  max-width: 44px;
  max-height: 44px;
}
.eui-chat-header .eui-chat-header-logo img {
  max-width: 44px;
  max-height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.eui-chat-header .eui-chat-header-title {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
}
.eui-chat-header .eui-chat-header-title .eui-chat-title-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--euic-font);
  text-overflow: ellipsis;
  overflow: hidden;
}
.eui-chat-header .eui-chat-header-title .eui-chat-subtitle-text {
  font-size: 12px;
  line-height: 14px;
  color: var(--euic-font);
  opacity: 0.85;
  text-overflow: ellipsis;
  overflow: hidden;
}
.eui-chat-header .eui-chat-header-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--euic-font);
}
.eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}
.eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 1px;
}

.eui-chat-header-slot,
.eui-chat-above-composer-slot,
.eui-chat-below-composer-slot {
  flex-shrink: 0;
}

/* ============== BODY ============== */
.eui-chat-body {
  flex-grow: 1;
  background: var(--euic-bg);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.eui-chat-body::-webkit-scrollbar {
  width: 6px;
}
.eui-chat-body::-webkit-scrollbar-thumb {
  background: var(--euic-border);
  border-radius: 4px;
}
.eui-chat-body:hover::-webkit-scrollbar-thumb {
  background: var(--euic-text-muted);
}
.eui-chat-body .eui-chat-sr-live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============== MESSAGES ============== */
.eui-chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
  word-wrap: break-word;
}
.eui-chat-msg.eui-chat-msg-user {
  flex-direction: row-reverse;
  justify-content: flex-start;
  margin-left: auto;
  max-width: 85%;
}
.eui-chat-msg.eui-chat-msg-user .eui-chat-msg-content {
  background: var(--euic-bubble-user-bg);
  color: var(--euic-bubble-user-fg);
}
.eui-chat-msg.eui-chat-msg-user .eui-chat-msg-body {
  align-items: flex-end;
}
.eui-chat-msg.eui-chat-msg-system {
  max-width: 85%;
}
.eui-chat-msg.eui-chat-msg-sys-notice {
  justify-content: center;
  max-width: 100%;
  font-size: 11px;
  color: var(--euic-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.eui-chat-msg.eui-chat-no-avatar .eui-chat-msg-avatar {
  display: none;
}
.eui-chat-msg.eui-chat-msg-flash .eui-chat-msg-content {
  animation: eui-chat-flash 1.2s ease-out;
}
.eui-chat-msg .eui-chat-msg-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--euic-bg-subtle);
  border-radius: 50%;
  color: var(--euic-text-muted);
  overflow: hidden;
}
.eui-chat-msg .eui-chat-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.eui-chat-msg .eui-chat-msg-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 0 1 auto;
}
.eui-chat-msg .eui-chat-msg-body:hover .eui-chat-msg-actions {
  opacity: 1;
  pointer-events: auto;
}
.eui-chat-msg .eui-chat-msg-content {
  background: var(--euic-bubble-bot-bg);
  color: var(--euic-bubble-bot-fg);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  max-width: 100%;
}
.eui-chat-msg .eui-chat-msg-text {
  white-space: pre-wrap;
}
.eui-chat-msg .eui-chat-link {
  color: var(--euic-primary);
  text-decoration: underline;
}
.eui-chat-msg .eui-chat-msg-time {
  font-size: 10px;
  color: var(--euic-text-muted);
  margin-top: 2px;
}
.eui-chat-msg .eui-chat-msg-replyto {
  background: var(--euic-bg-subtle);
  border-left: 3px solid var(--euic-primary);
  padding: 4px 8px;
  font-size: 12px;
  margin-bottom: 4px;
  text-align: left;
  cursor: pointer;
  display: block;
  border-radius: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eui-chat-msg .eui-chat-msg-replyto:hover {
  background: var(--euic-border);
}
.eui-chat-msg .eui-chat-msg-quoted {
  background: rgba(255, 255, 255, 0.08);
  border-left: 3px solid currentColor;
  padding: 4px 8px;
  margin-bottom: 6px;
  font-size: 12px;
  opacity: 0.85;
  max-height: 60px;
  overflow: hidden;
  border-radius: 4px;
}
.eui-chat-msg .eui-chat-msg-attachments {
  margin-top: 6px;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.eui-chat-msg .eui-chat-msg-attachments-thumbs .eui-chat-att-thumb {
  width: 80px;
  height: 80px;
  background: var(--euic-bg-subtle);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--euic-text-muted);
}
.eui-chat-msg .eui-chat-msg-attachments-thumbs .eui-chat-att-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.eui-chat-msg .eui-chat-msg-attachments .eui-chat-att-name {
  color: inherit;
  text-decoration: none;
  background: var(--euic-bg-subtle);
  color: var(--euic-text);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.eui-chat-msg .eui-chat-msg-attachments .eui-chat-att-name:hover {
  background: var(--euic-border);
}
.eui-chat-msg .eui-chat-msg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.eui-chat-msg .eui-chat-msg-reactions .eui-chat-msg-reaction-chip {
  background: var(--euic-bg-subtle);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--euic-border-subtle);
}
.eui-chat-msg .eui-chat-msg-actions {
  display: flex;
  gap: 2px;
  margin-top: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
.eui-chat-msg .eui-chat-msg-actions .eui-chat-msg-action {
  color: var(--euic-text-muted);
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}
.eui-chat-msg .eui-chat-msg-actions .eui-chat-msg-action:hover {
  background: var(--euic-bg-subtle);
  color: var(--euic-text);
}
.eui-chat-msg .eui-chat-msg-actions .eui-chat-msg-action.eui-chat-msg-action-active {
  color: var(--euic-primary);
}
.eui-chat-msg .eui-chat-msg-actions .eui-chat-msg-action-label {
  font-size: 11px;
}
.eui-chat-msg .eui-chat-msg-actions .eui-chat-msg-react-wrap {
  position: relative;
}
.eui-chat-msg .eui-chat-msg-actions .eui-chat-msg-react-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: var(--euic-bg);
  border: 1px solid var(--euic-border);
  border-radius: 999px;
  padding: 4px;
  display: flex;
  gap: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: var(--euic-z-popover);
}
.eui-chat-msg .eui-chat-msg-actions .eui-chat-msg-react-menu .eui-chat-msg-react-item {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 16px;
}
.eui-chat-msg .eui-chat-msg-actions .eui-chat-msg-react-menu .eui-chat-msg-react-item:hover {
  background: var(--euic-bg-subtle);
}
.eui-chat-msg .eui-chat-msg-status-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  justify-content: flex-end;
  font-size: 11px;
  color: var(--euic-text-muted);
}
.eui-chat-msg .eui-chat-status {
  display: inline-flex;
  align-items: center;
  color: var(--euic-text-muted);
}
.eui-chat-msg .eui-chat-status-read {
  color: var(--euic-primary);
}
.eui-chat-msg .eui-chat-status-failed {
  color: #ef4444;
}
.eui-chat-msg .eui-chat-status-clickable {
  cursor: pointer;
}
.eui-chat-msg .eui-chat-status-clickable:hover {
  opacity: 0.8;
}

@keyframes eui-chat-flash {
  0% {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.5);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}
/* ============== TYPING ============== */
.eui-chat-typing-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  color: var(--euic-text-muted);
  font-size: 12px;
}
.eui-chat-typing-row .eui-chat-typing-avatars {
  display: inline-flex;
}
.eui-chat-typing-row .eui-chat-typing-avatars .eui-chat-typing-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--euic-bg-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  margin-left: -6px;
  border: 2px solid var(--euic-bg);
  overflow: hidden;
  color: var(--euic-text);
}
.eui-chat-typing-row .eui-chat-typing-avatars .eui-chat-typing-avatar:first-child {
  margin-left: 0;
}
.eui-chat-typing-row .eui-chat-typing-avatars .eui-chat-typing-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eui-chat-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.eui-chat-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--euic-text-muted);
  animation: eui-chat-typing 1.4s infinite ease-in-out both;
}
.eui-chat-typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}
.eui-chat-typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes eui-chat-typing {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
/* ============== COMPOSER ============== */
.eui-chat-composer-area {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--euic-bg);
  border-top: 1px solid var(--euic-border-subtle);
}
.eui-chat-composer-area .eui-chat-replyto-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--euic-bg-subtle);
  border-bottom: 1px solid var(--euic-border-subtle);
  font-size: 12px;
}
.eui-chat-composer-area .eui-chat-replyto-chip .eui-chat-replyto-label {
  font-weight: 600;
  color: var(--euic-primary);
  flex-shrink: 0;
}
.eui-chat-composer-area .eui-chat-replyto-chip .eui-chat-replyto-snippet {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--euic-text-muted);
}
.eui-chat-composer-area .eui-chat-replyto-chip .eui-chat-replyto-close {
  color: var(--euic-text-muted);
  display: inline-flex;
}
.eui-chat-composer-area .eui-chat-replyto-chip .eui-chat-replyto-close:hover {
  color: var(--euic-text);
}
.eui-chat-composer-area .eui-chat-pending-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--euic-border-subtle);
}
.eui-chat-composer-area .eui-chat-pending-attachments .eui-chat-pending-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--euic-bg-subtle);
  border-radius: 12px;
  font-size: 12px;
  max-width: 200px;
}
.eui-chat-composer-area .eui-chat-pending-attachments .eui-chat-pending-chip .eui-chat-pending-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eui-chat-composer-area .eui-chat-pending-attachments .eui-chat-pending-chip .eui-chat-pending-size {
  color: var(--euic-text-muted);
  font-size: 11px;
}
.eui-chat-composer-area .eui-chat-pending-attachments .eui-chat-pending-chip .eui-chat-pending-remove {
  color: var(--euic-text-muted);
  display: inline-flex;
}

.eui-chat-composer {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  align-items: flex-end;
}
.eui-chat-composer textarea {
  flex-grow: 1;
  border: 1px solid var(--euic-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  resize: none;
  outline: none;
  min-height: 38px;
  max-height: 96px;
  line-height: 1.4;
  font-family: inherit;
  background: var(--euic-bg);
  color: var(--euic-text);
}
.eui-chat-composer textarea:focus {
  border-color: var(--euic-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.eui-chat-composer textarea::placeholder {
  color: var(--euic-text-muted);
}
.eui-chat-composer textarea:disabled {
  background: var(--euic-bg-subtle);
  cursor: not-allowed;
}
.eui-chat-composer .eui-chat-action-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}
.eui-chat-composer .eui-chat-action-btns .eui-chat-emoji-btn,
.eui-chat-composer .eui-chat-action-btns .eui-chat-attach-btn,
.eui-chat-composer .eui-chat-action-btns .eui-chat-voice-btn,
.eui-chat-composer .eui-chat-action-btns .eui-chat-send-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--euic-text-muted);
}
.eui-chat-composer .eui-chat-action-btns .eui-chat-emoji-btn:hover:not(:disabled),
.eui-chat-composer .eui-chat-action-btns .eui-chat-attach-btn:hover:not(:disabled),
.eui-chat-composer .eui-chat-action-btns .eui-chat-voice-btn:hover:not(:disabled),
.eui-chat-composer .eui-chat-action-btns .eui-chat-send-btn:hover:not(:disabled) {
  background: var(--euic-bg-subtle);
  color: var(--euic-text);
}
.eui-chat-composer .eui-chat-action-btns .eui-chat-emoji-btn:focus-visible,
.eui-chat-composer .eui-chat-action-btns .eui-chat-attach-btn:focus-visible,
.eui-chat-composer .eui-chat-action-btns .eui-chat-voice-btn:focus-visible,
.eui-chat-composer .eui-chat-action-btns .eui-chat-send-btn:focus-visible {
  outline: 2px solid var(--euic-primary);
  outline-offset: 1px;
}
.eui-chat-composer .eui-chat-action-btns .eui-chat-emoji-btn:disabled,
.eui-chat-composer .eui-chat-action-btns .eui-chat-attach-btn:disabled,
.eui-chat-composer .eui-chat-action-btns .eui-chat-voice-btn:disabled,
.eui-chat-composer .eui-chat-action-btns .eui-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.eui-chat-composer .eui-chat-action-btns .eui-chat-send-btn {
  background: var(--euic-primary);
  color: var(--euic-font);
}
.eui-chat-composer .eui-chat-action-btns .eui-chat-send-btn:hover:not(:disabled) {
  background: var(--euic-secondary);
  color: var(--euic-font);
}
.eui-chat-composer .eui-chat-action-btns .eui-chat-voice-btn.eui-chat-recording {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  animation: eui-chat-pulse 1.6s ease-in-out infinite;
}

@keyframes eui-chat-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}
/* ============== EMOJI PICKER ============== */
.eui-chat-emoji-picker {
  position: absolute;
  width: 320px;
  height: 360px;
  background: var(--euic-bg, #fff);
  border: 1px solid var(--euic-border, #e2e8f0);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  z-index: 10050;
  display: flex;
  flex-direction: column;
  color: var(--euic-text, #1e293b);
}
.eui-chat-emoji-picker .eui-chat-emoji-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--euic-border-subtle, #eef2f6);
  overflow-x: auto;
}
.eui-chat-emoji-picker .eui-chat-emoji-tabs .eui-chat-emoji-tab {
  padding: 6px;
  border-radius: 4px;
  font-size: 18px;
}
.eui-chat-emoji-picker .eui-chat-emoji-tabs .eui-chat-emoji-tab:hover {
  background: var(--euic-bg-subtle, #f1f5f9);
}
.eui-chat-emoji-picker .eui-chat-emoji-tabs .eui-chat-emoji-tab.eui-chat-active {
  background: var(--euic-bg-subtle, #f1f5f9);
}
.eui-chat-emoji-picker .eui-chat-emoji-search {
  padding: 6px 8px;
}
.eui-chat-emoji-picker .eui-chat-emoji-grid {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 8px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
}
.eui-chat-emoji-picker .eui-chat-emoji-grid .eui-chat-emoji-cell {
  font-size: 18px;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
}
.eui-chat-emoji-picker .eui-chat-emoji-grid .eui-chat-emoji-cell:hover {
  background: var(--euic-bg-subtle, #f1f5f9);
}

/* The picker is portaled to document.body, so the chat container's theme/mode
   classes don't apply. Flip its colors based on the page-level body.mode-dark. */
body.mode-dark .eui-chat-emoji-picker {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
body.mode-dark .eui-chat-emoji-picker .eui-chat-emoji-tabs {
  border-bottom-color: #334155;
}
body.mode-dark .eui-chat-emoji-picker .eui-chat-emoji-tabs .eui-chat-emoji-tab:hover {
  background: #0f172a;
}
body.mode-dark .eui-chat-emoji-picker .eui-chat-emoji-tabs .eui-chat-emoji-tab.eui-chat-active {
  background: #0f172a;
}
body.mode-dark .eui-chat-emoji-picker .eui-chat-emoji-grid .eui-chat-emoji-cell:hover {
  background: #0f172a;
}

/* ============== LIGHTBOX ============== */
.eui-chat-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.eui-chat-lightbox .eui-chat-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.eui-chat-lightbox .eui-chat-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.eui-chat-lightbox .eui-chat-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.eui-chat-lightbox .eui-chat-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.eui-chat-lightbox .eui-chat-lightbox-prev {
  left: 12px;
}
.eui-chat-lightbox .eui-chat-lightbox-next {
  right: 12px;
}
.eui-chat-lightbox .eui-chat-lightbox-stage {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.eui-chat-lightbox .eui-chat-lightbox-media {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}
.eui-chat-lightbox .eui-chat-lightbox-frame {
  width: 90vw;
  height: 90vh;
  border: none;
  background: #fff;
}
.eui-chat-lightbox .eui-chat-lightbox-counter {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 12px;
  border-radius: 999px;
}
.eui-chat-lightbox .eui-chat-lightbox-link {
  color: #fff;
  font-size: 16px;
}

/* ============== TEMPLATES ============== */
.eui-chat-msg-content .eui-chat-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  max-width: 320px;
}
.eui-chat-msg-content .eui-chat-image-slider {
  cursor: pointer;
  max-width: 320px;
}
.eui-chat-msg-content .eui-chat-inline-slider {
  cursor: pointer;
  margin: 6px 0;
  max-width: 320px;
}
.eui-chat-msg-content .eui-chat-media-btn {
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.eui-chat-msg-content .eui-chat-media-img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 6px;
  display: block;
}
.eui-chat-msg-content .eui-chat-media-video,
.eui-chat-msg-content .eui-chat-youtube-iframe {
  width: 100%;
  max-width: 320px;
  border-radius: 6px;
  border: none;
}
.eui-chat-msg-content .eui-chat-youtube-iframe {
  aspect-ratio: 16/9;
}
.eui-chat-msg-content .eui-chat-file-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.eui-chat-msg-content .eui-chat-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--euic-bg-subtle);
  border-radius: 6px;
  text-decoration: none;
  color: var(--euic-text);
}
.eui-chat-msg-content .eui-chat-file-item:hover {
  background: var(--euic-border-subtle);
}
.eui-chat-msg-content .eui-chat-file-item .eui-chat-file-icon {
  color: var(--euic-primary);
}
.eui-chat-msg-content .eui-chat-file-item .eui-chat-file-meta {
  display: flex;
  flex-direction: column;
}
.eui-chat-msg-content .eui-chat-file-item .eui-chat-file-name {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.eui-chat-msg-content .eui-chat-file-item .eui-chat-file-size {
  font-size: 11px;
  color: var(--euic-text-muted);
}
.eui-chat-msg-content .eui-chat-opts-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.eui-chat-msg-content .eui-chat-opts-wrap .eui-chat-opts-prompt {
  display: block;
  margin-bottom: 4px;
}
.eui-chat-msg-content .eui-chat-opts-wrap .eui-chat-opts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.eui-chat-msg-content .eui-chat-opts-wrap .eui-chat-opts-list.eui-chat-opts-image {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.eui-chat-msg-content .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
  background: var(--euic-bg);
  border: 1px solid var(--euic-primary);
  color: var(--euic-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.eui-chat-msg-content .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item:hover {
  background: var(--euic-primary);
  color: var(--euic-font);
}
.eui-chat-msg-content .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item .eui-chat-opt-img {
  max-width: 100%;
  max-height: 120px;
  border-radius: 4px;
}
.eui-chat-msg-content .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item .eui-chat-opt-title {
  font-weight: 600;
}
.eui-chat-msg-content .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item .eui-chat-opt-subtitle {
  font-size: 11px;
  opacity: 0.8;
}
.eui-chat-msg-content .eui-chat-date-template,
.eui-chat-msg-content .eui-chat-time-template,
.eui-chat-msg-content .eui-chat-datetime-template {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
}
.eui-chat-msg-content .eui-chat-date-template .eui-chat-template-actions,
.eui-chat-msg-content .eui-chat-time-template .eui-chat-template-actions,
.eui-chat-msg-content .eui-chat-datetime-template .eui-chat-template-actions {
  display: flex;
  justify-content: flex-end;
}
.eui-chat-msg-content .eui-chat-date-template .eui-chat-template-error,
.eui-chat-msg-content .eui-chat-time-template .eui-chat-template-error,
.eui-chat-msg-content .eui-chat-datetime-template .eui-chat-template-error {
  color: #ef4444;
  font-size: 12px;
}
.eui-chat-msg-content .eui-chat-datetime-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.eui-chat-msg-interactive .eui-chat-msg-content {
  background: transparent;
  padding: 0;
}

/* ============== RESIZE HANDLES ============== */
.eui-chat-resize-handle {
  position: absolute;
  z-index: 10;
  touch-action: none;
}

.eui-chat-resize-n {
  top: -4px;
  left: 8px;
  right: 8px;
  height: 8px;
  cursor: ns-resize;
}

.eui-chat-resize-s {
  bottom: -4px;
  left: 8px;
  right: 8px;
  height: 8px;
  cursor: ns-resize;
}

.eui-chat-resize-w {
  top: 8px;
  bottom: 8px;
  left: -4px;
  width: 8px;
  cursor: ew-resize;
}

.eui-chat-resize-e {
  top: 8px;
  bottom: 8px;
  right: -4px;
  width: 8px;
  cursor: ew-resize;
}

.eui-chat-resize-ne {
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  cursor: nesw-resize;
}

.eui-chat-resize-nw {
  top: -4px;
  left: -4px;
  width: 12px;
  height: 12px;
  cursor: nwse-resize;
}

.eui-chat-resize-se {
  bottom: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  cursor: nwse-resize;
}

.eui-chat-resize-sw {
  bottom: -4px;
  left: -4px;
  width: 12px;
  height: 12px;
  cursor: nesw-resize;
}

/* ============== DRAG OVER ============== */
.eui-chat-dragover .eui-chat-window {
  outline: 2px dashed var(--euic-primary);
  outline-offset: -4px;
}

/* ============== SHORTCUTS ============== */
.eui-chat-shortcuts {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10200;
}
.eui-chat-shortcuts .eui-chat-shortcuts-panel {
  background: var(--euic-bg, #fff);
  color: var(--euic-text, #1e293b);
  border-radius: 8px;
  padding: 24px;
  min-width: 280px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}
.eui-chat-shortcuts .eui-chat-shortcuts-panel .eui-chat-shortcuts-title {
  font-weight: 700;
  margin-bottom: 12px;
}
.eui-chat-shortcuts .eui-chat-shortcuts-panel .eui-chat-shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.eui-chat-shortcuts .eui-chat-shortcuts-panel kbd {
  background: var(--euic-bg-subtle, #f1f5f9);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 11px;
  border: 1px solid var(--euic-border, #e2e8f0);
  margin: 0 2px;
}
.eui-chat-shortcuts .eui-chat-shortcuts-panel .eui-chat-shortcuts-close {
  margin-top: 16px;
  background: var(--euic-primary, #2563eb);
  color: var(--euic-font, #fff);
  padding: 6px 16px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .eui-chat-typing-dots span,
  .eui-chat-voice-btn.eui-chat-recording {
    animation: none !important;
  }
  .eui-chat-msg-flash .eui-chat-msg-content {
    animation: none;
  }
}/* ============================================================
   SHARED CHAT WINDOW UTILITIES
   Imported by all themes. Add anything that is truly theme-agnostic here.
   Do NOT put theme-specific colors or layout here.
   ============================================================ */

/* Voice recorder pulse animation */

@keyframes euic-zc-pulse {
    0%   { transform: scale(1); opacity: 1; }
    50%  { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.eui-chat-voice-btn.eui-chat-recording {
    animation: euic-zc-pulse 1s infinite;
}

/* Inline options indicator (e.g. view-sources icon) */

.eui-chat-msg-inline-opts {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 4px;
    line-height: 1;
}

.eui-chat-msg-opts {
    display: flex;
    justify-content: flex-end;
    margin-top: 2px;
}

/* Date input submit button — used across all themes */

button.date-input-submit {
    background-color: #1976d2;
    border: 1px solid #1976d2;
    border-radius: 8px;
    color: #fff;
    display: block;
    margin: 8px auto 0;
    padding: 7px 18px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

button.date-input-submit:hover {
    background-color: #1565c0;
    border-color: #1565c0;
}

button.date-input-submit:disabled {
    color: #fff;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Disclaimer tooltip */

.eui-chat-disclaimer-tooltip {
    visibility: hidden;
    background-color: #fdfefe;
    color: #17202a;
    text-align: center;
    padding: 5px;
    border-radius: 4px;
    position: absolute;
    bottom: 20px;
    z-index: 100;
    right: 25px;
    left: auto;
    max-width: 150px;
}

.eui-chat-disclaimer:hover .eui-chat-disclaimer-tooltip {
    visibility: visible;
}

/* Per-theme CSS variable overrides. Loaded AFTER the base chat-window styles, so these win.
   Each theme sets only the --euic-* variables; structural rules live in the matching theme-<name>.css file. */

.eui-chat-theme-classic.eui-chat-container,
.eui-chat-theme-classic .eui-chat-container {
    --euic-primary: #2563eb;
    --euic-secondary: #1d4ed8;
    --euic-font: #ffffff;
    --euic-bg: #ffffff;
    --euic-bg-subtle: #f1f5f9;
    --euic-border: #e2e8f0;
    --euic-border-subtle: #eef2f6;
    --euic-text: #1e293b;
    --euic-text-muted: #64748b;
    --euic-bubble-bot-bg: #ffffff;
    --euic-bubble-bot-fg: #1e293b;
    --euic-bubble-user-bg: #2563eb;
    --euic-bubble-user-fg: #ffffff;
}

.eui-chat-theme-modern.eui-chat-container,
.eui-chat-theme-modern .eui-chat-container {
    --euic-primary: #6366f1;
    --euic-secondary: #4f46e5;
    --euic-font: #ffffff;
    --euic-bg: #ffffff;
    --euic-bg-subtle: #f3f4f6;
    --euic-border: #e5e7eb;
    --euic-border-subtle: #f1f5f9;
    --euic-text: #111827;
    --euic-text-muted: #6b7280;
    --euic-bubble-bot-bg: #f3f4f6;
    --euic-bubble-bot-fg: #111827;
    --euic-bubble-user-bg: #6366f1;
    --euic-bubble-user-fg: #ffffff;
}

.eui-chat-theme-iris.eui-chat-container,
.eui-chat-theme-iris .eui-chat-container {
    --euic-primary: #7c3aed;
    --euic-secondary: #5b21b6;
    --euic-font: #ffffff;
    --euic-bg: #ffffff;
    --euic-bg-subtle: #faf5ff;
    --euic-border: #e9d5ff;
    --euic-border-subtle: #f3e8ff;
    --euic-text: #1e1b4b;
    --euic-text-muted: #6d28d9;
    --euic-bubble-bot-bg: #faf5ff;
    --euic-bubble-bot-fg: #1e1b4b;
    --euic-bubble-user-bg: #7c3aed;
    --euic-bubble-user-fg: #ffffff;
}

.eui-chat-theme-dusk.eui-chat-container,
.eui-chat-theme-dusk .eui-chat-container {
    --euic-primary: #f97316;
    --euic-secondary: #ea580c;
    --euic-font: #ffffff;
    --euic-bg: #1e1b29;
    --euic-bg-subtle: #2a2438;
    --euic-border: #3f3654;
    --euic-border-subtle: #322a44;
    --euic-text: #f1f5f9;
    --euic-text-muted: #c4b5fd;
    --euic-bubble-bot-bg: #2a2438;
    --euic-bubble-bot-fg: #f1f5f9;
    --euic-bubble-user-bg: #f97316;
    --euic-bubble-user-fg: #ffffff;
}

.eui-chat-theme-mist.eui-chat-container,
.eui-chat-theme-mist .eui-chat-container {
    --euic-primary: #0ea5e9;
    --euic-secondary: #0284c7;
    --euic-font: #ffffff;
    --euic-bg: #ffffff;
    --euic-bg-subtle: #f0f9ff;
    --euic-border: #bae6fd;
    --euic-border-subtle: #e0f2fe;
    --euic-text: #0c4a6e;
    --euic-text-muted: #475569;
    --euic-bubble-bot-bg: #f0f9ff;
    --euic-bubble-bot-fg: #0c4a6e;
    --euic-bubble-user-bg: #0ea5e9;
    --euic-bubble-user-fg: #ffffff;
}

.eui-chat-theme-ember.eui-chat-container,
.eui-chat-theme-ember .eui-chat-container {
    --euic-primary: #dc2626;
    --euic-secondary: #b91c1c;
    --euic-font: #ffffff;
    --euic-bg: #fffbf5;
    --euic-bg-subtle: #fff7ed;
    --euic-border: #fed7aa;
    --euic-border-subtle: #ffedd5;
    --euic-text: #7c2d12;
    --euic-text-muted: #92400e;
    --euic-bubble-bot-bg: #fff7ed;
    --euic-bubble-bot-fg: #7c2d12;
    --euic-bubble-user-bg: #dc2626;
    --euic-bubble-user-fg: #ffffff;
}

.eui-chat-theme-canvas.eui-chat-container,
.eui-chat-theme-canvas .eui-chat-container {
    --euic-primary: #475569;
    --euic-secondary: #334155;
    --euic-font: #ffffff;
    --euic-bg: #fafaf9;
    --euic-bg-subtle: #f5f5f4;
    --euic-border: #e7e5e4;
    --euic-border-subtle: #ede9e3;
    --euic-text: #292524;
    --euic-text-muted: #78716c;
    --euic-bubble-bot-bg: #ffffff;
    --euic-bubble-bot-fg: #292524;
    --euic-bubble-user-bg: #475569;
    --euic-bubble-user-fg: #ffffff;
}

.eui-chat-theme-prism.eui-chat-container,
.eui-chat-theme-prism .eui-chat-container {
    --euic-primary: #ec4899;
    --euic-secondary: #db2777;
    --euic-font: #ffffff;
    --euic-bg: #ffffff;
    --euic-bg-subtle: #fdf2f8;
    --euic-border: #fbcfe8;
    --euic-border-subtle: #fce7f3;
    --euic-text: #831843;
    --euic-text-muted: #9d174d;
    --euic-bubble-bot-bg: #fdf2f8;
    --euic-bubble-bot-fg: #831843;
    --euic-bubble-user-bg: #ec4899;
    --euic-bubble-user-fg: #ffffff;
}

.eui-chat-theme-aurora.eui-chat-container,
.eui-chat-theme-aurora .eui-chat-container {
    --euic-primary: #059669;
    --euic-secondary: #047857;
    --euic-font: #ffffff;
    --euic-bg: #ffffff;
    --euic-bg-subtle: #ecfdf5;
    --euic-border: #a7f3d0;
    --euic-border-subtle: #d1fae5;
    --euic-text: #064e3b;
    --euic-text-muted: #047857;
    --euic-bubble-bot-bg: #ecfdf5;
    --euic-bubble-bot-fg: #064e3b;
    --euic-bubble-user-bg: #059669;
    --euic-bubble-user-fg: #ffffff;
}

/* ====== DARK MODE OVERRIDES ====== */

.eui-chat-mode-dark.eui-chat-theme-classic.eui-chat-container,
.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-container {
    --euic-bg: #0f172a;
    --euic-bg-subtle: #1e293b;
    --euic-border: #334155;
    --euic-border-subtle: #1e293b;
    --euic-text: #e2e8f0;
    --euic-text-muted: #94a3b8;
    --euic-bubble-bot-bg: #1e293b;
    --euic-bubble-bot-fg: #e2e8f0;
}

.eui-chat-mode-dark.eui-chat-theme-modern.eui-chat-container,
.eui-chat-mode-dark.eui-chat-theme-modern .eui-chat-container {
    --euic-bg: #111827;
    --euic-bg-subtle: #1f2937;
    --euic-border: #374151;
    --euic-border-subtle: #1f2937;
    --euic-text: #f9fafb;
    --euic-text-muted: #9ca3af;
    --euic-bubble-bot-bg: #1f2937;
    --euic-bubble-bot-fg: #f9fafb;
}

.eui-chat-mode-dark.eui-chat-theme-iris.eui-chat-container,
.eui-chat-mode-dark.eui-chat-theme-iris .eui-chat-container {
    --euic-bg: #1e1b4b;
    --euic-bg-subtle: #2e1065;
    --euic-border: #4c1d95;
    --euic-border-subtle: #312e81;
    --euic-text: #ede9fe;
    --euic-text-muted: #c4b5fd;
    --euic-bubble-bot-bg: #2e1065;
    --euic-bubble-bot-fg: #ede9fe;
}

.eui-chat-mode-dark.eui-chat-theme-dusk.eui-chat-container,
.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-container {
    --euic-bg: #0f0f17;
    --euic-bg-subtle: #1e1b29;
    --euic-border: #322a44;
    --euic-border-subtle: #271f36;
    --euic-text: #f1f5f9;
    --euic-text-muted: #a78bfa;
    --euic-bubble-bot-bg: #1e1b29;
    --euic-bubble-bot-fg: #f1f5f9;
}

.eui-chat-mode-dark.eui-chat-theme-mist.eui-chat-container,
.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-container {
    --euic-bg: #0c1929;
    --euic-bg-subtle: #0c1f33;
    --euic-border: #155e75;
    --euic-border-subtle: #0e2a47;
    --euic-text: #e0f2fe;
    --euic-text-muted: #7dd3fc;
    --euic-bubble-bot-bg: #0c1f33;
    --euic-bubble-bot-fg: #e0f2fe;
}

.eui-chat-mode-dark.eui-chat-theme-ember.eui-chat-container,
.eui-chat-mode-dark.eui-chat-theme-ember .eui-chat-container {
    --euic-bg: #1c0f08;
    --euic-bg-subtle: #2a1810;
    --euic-border: #7c2d12;
    --euic-border-subtle: #3b1d10;
    --euic-text: #fff7ed;
    --euic-text-muted: #fdba74;
    --euic-bubble-bot-bg: #2a1810;
    --euic-bubble-bot-fg: #fff7ed;
}

.eui-chat-mode-dark.eui-chat-theme-canvas.eui-chat-container,
.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-container {
    --euic-bg: #0c0a09;
    --euic-bg-subtle: #1c1917;
    --euic-border: #44403c;
    --euic-border-subtle: #292524;
    --euic-text: #fafaf9;
    --euic-text-muted: #a8a29e;
    --euic-bubble-bot-bg: #1c1917;
    --euic-bubble-bot-fg: #fafaf9;
}

.eui-chat-mode-dark.eui-chat-theme-prism.eui-chat-container,
.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-container {
    --euic-bg: #1a0a14;
    --euic-bg-subtle: #2a0e22;
    --euic-border: #831843;
    --euic-border-subtle: #4a1432;
    --euic-text: #fce7f3;
    --euic-text-muted: #f9a8d4;
    --euic-bubble-bot-bg: #2a0e22;
    --euic-bubble-bot-fg: #fce7f3;
}

.eui-chat-mode-dark.eui-chat-theme-aurora.eui-chat-container,
.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-container {
    --euic-bg: #022c22;
    --euic-bg-subtle: #064e3b;
    --euic-border: #047857;
    --euic-border-subtle: #065f46;
    --euic-text: #ecfdf5;
    --euic-text-muted: #6ee7b7;
    --euic-bubble-bot-bg: #064e3b;
    --euic-bubble-bot-fg: #ecfdf5;
}

/* ============================================================
   THEME: CLASSIC (Horizon)
   Full-bleed gradient header, avatar left, status dot,
   speech-bubble tails on messages, pill composer
   ============================================================ */

.eui-chat-theme-classic .eui-chat-container,
.eui-chat-theme-classic.eui-chat-container {
    max-height: 100%;
    max-width: 100%;
    padding: 5px;
    z-index: 10009;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.eui-chat-theme-classic .eui-chat-container *,
.eui-chat-theme-classic.eui-chat-container * {
    box-sizing: border-box;
}

.eui-chat-theme-classic .eui-chat-window {
    border-radius: 16px;
    flex-grow: 1;
    display: flex;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.18),
        0 2px 6px rgba(0, 0, 0, 0.08);
    flex-direction: column;
    z-index: 10010;
    overflow: hidden;
    max-height: 100%;
}

.eui-chat-theme-classic .eui-chat-window.eui-chat-no-shadow {
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* --- Header: full gradient, tall, status indicator --- */

.eui-chat-theme-classic .eui-chat-header {
    min-height: 70px;
    background: linear-gradient(120deg, #2563eb 0%, #1d4ed8 60%, #1e40af 100%);
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 12px;
    position: relative;
    flex-shrink: 0;
}

.eui-chat-theme-classic .eui-chat-header .eui-chat-header-icon {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.eui-chat-theme-classic .eui-chat-header .eui-chat-header-icon::after {
    content: '';
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    background: #4ade80;
    border: 2px solid #2563eb;
    border-radius: 50%;
}

.eui-chat-theme-classic .eui-chat-header .eui-chat-header-icon img,
.eui-chat-theme-classic .eui-chat-header .eui-chat-header-icon svg {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    display: block;
}

.eui-chat-theme-classic .eui-chat-header .eui-chat-header-logo {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.eui-chat-theme-classic .eui-chat-header .eui-chat-header-logo img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.eui-chat-theme-classic .eui-chat-header .eui-chat-header-title {
    flex-grow: 1;
    overflow: hidden;
}

.eui-chat-theme-classic .eui-chat-header .eui-chat-header-title .eui-chat-title-text {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eui-chat-theme-classic .eui-chat-header .eui-chat-header-title .eui-chat-subtitle-text {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.72);
    display: block;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eui-chat-theme-classic .eui-chat-header .eui-chat-header-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.eui-chat-theme-classic .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    font-size: 18px;
    transition:
        background 0.15s,
        color 0.15s;
}

.eui-chat-theme-classic .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

/* --- Body --- */

.eui-chat-theme-classic .eui-chat-body {
    flex-grow: 1;
    background: #f1f5f9;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 0 24px;
}

.eui-chat-theme-classic .eui-chat-body::-webkit-scrollbar {
    width: 4px;
}

.eui-chat-theme-classic .eui-chat-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.eui-chat-theme-classic .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #94a3b8;
}

/* --- Messages --- */

.eui-chat-theme-classic .eui-chat-msg {
    width: 100%;
    max-width: 100%;
    margin: 0 0 8px 0;
    padding: 0;
}

.eui-chat-theme-classic .eui-chat-msg.eui-chat-msg-system {
    display: flex;
    align-items: flex-start;
    padding-left: 14px;
}

.eui-chat-theme-classic .eui-chat-msg .eui-chat-msg-avatar {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    border-radius: 50%;
    margin-right: 6px;
    margin-top: 2px;
}

.eui-chat-theme-classic .eui-chat-msg .eui-chat-msg-avatar svg {
    width: 16px;
    height: 16px;
    color: #2563eb;
}

.eui-chat-theme-classic .eui-chat-msg .eui-chat-msg-body {
    flex: 1;
    min-width: 0;
}

.eui-chat-theme-classic .eui-chat-msg .eui-chat-msg-time {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 3px;
}

/* Bot bubble */

.eui-chat-theme-classic .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: #ffffff;
    border-radius: 4px 14px 14px 14px;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.55;
    color: #1e293b;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* User bubble */

.eui-chat-theme-classic .eui-chat-msg.eui-chat-msg-user {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    max-width: 80%;
    margin-left: auto;
    gap: 6px;
}

.eui-chat-theme-classic .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.eui-chat-theme-classic .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-content {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    border-radius: 14px 4px 14px 14px;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.55;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
}

/* --- Composer: floating pill style --- */

.eui-chat-theme-classic .eui-chat-composer {
    background: #f1f5f9;
    display: flex;
    flex-shrink: 0;
    padding: 10px 12px 12px;
    align-items: flex-end;
    gap: 8px;
    border-top: 1px solid #e2e8f0;
}

.eui-chat-theme-classic .eui-chat-composer textarea {
    flex-grow: 1;
    padding: 9px 16px;
    font-size: 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 22px;
    background: #ffffff;
    color: #1e293b;
    font-family: inherit;
    outline: none;
    resize: none;
    min-height: 38px;
    max-height: 100px;
    overflow-y: auto;
    line-height: 1.4;
    transition:
        border-color 0.18s,
        box-shadow 0.18s;
}

.eui-chat-theme-classic .eui-chat-composer textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.eui-chat-theme-classic .eui-chat-composer textarea::placeholder {
    color: #94a3b8;
}

.eui-chat-theme-classic .eui-chat-composer .eui-chat-action-btns {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 1px;
}

.eui-chat-theme-classic .eui-chat-composer div.eui-chat-send-btn,
.eui-chat-theme-classic .eui-chat-composer .eui-chat-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--euic-primary, #2563eb);
    color: var(--euic-font, #fff);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition:
        background 0.18s,
        transform 0.12s;
    flex-shrink: 0;
}

.eui-chat-theme-classic .eui-chat-composer div.eui-chat-send-btn:hover,
.eui-chat-theme-classic .eui-chat-composer .eui-chat-send-btn:hover {
    background: var(--euic-primary, #1d4ed8);
    transform: scale(1.06);
}

/* --- Disclaimer --- */

.eui-chat-theme-classic .eui-chat-disclaimer {
    font-size: 10px;
    padding: 4px 8px;
    background: #f1f5f9;
    color: #94a3b8;
    text-align: center;
}

.eui-chat-theme-classic .eui-chat-disclaimer span {
    display: block;
    text-align: center;
}

/* --- Options --- */

.eui-chat-theme-classic .eui-chat-opts-wrap {
    margin-top: 6px;
    margin-left: 14px;
    width: calc(100% - 42px);
}

.eui-chat-theme-classic .eui-chat-opts-wrap .eui-chat-opts-list {
    flex-wrap: wrap;
}

.eui-chat-theme-classic .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    padding: 5px 14px;
    border: 1.5px solid #2563eb;
    border-radius: 22px;
    cursor: pointer;
    background: #fff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 500;
    min-height: 32px;
    transition:
        background 0.18s,
        color 0.18s;
}

.eui-chat-theme-classic .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item:hover {
    background: #2563eb;
    color: #fff;
}

/* --- Launcher --- */

.eui-chat-theme-classic .eui-chat-launcher.eui-chat-icon-btn {
    background: linear-gradient(to right, var(--euic-primary, #2563eb), var(--euic-primary, #1e40af));
    color: var(--euic-font, #ffffff);
    border-color: var(--euic-primary, #2563eb);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    border-radius: 50%;
}

.eui-chat-theme-classic .eui-chat-launcher.eui-chat-expand .eui-chat-expand-text {
    background-image: linear-gradient(90deg, var(--euic-primary, #2563eb), var(--euic-primary, #1e40af));
}

.eui-chat-theme-classic .eui-chat-launcher.eui-chat-expand .eui-chat-expand-icon-wrap {
    background-color: var(--euic-primary, #2563eb);
}

.eui-chat-theme-classic .eui-chat-launcher.eui-chat-spark .eui-chat-spark-inner {
    background: linear-gradient(135deg, var(--euic-primary, #2563eb), var(--euic-secondary, var(--euic-primary, #2563eb)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-classic .eui-chat-launcher.eui-chat-spark {
    background: linear-gradient(135deg, var(--euic-primary, #2563eb), var(--euic-secondary, var(--euic-primary, #2563eb)));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.eui-chat-theme-classic .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-core {
    background: linear-gradient(135deg, var(--euic-primary, #2563eb), var(--euic-primary, #2563eb));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-classic .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-ring {
    border-color: var(--euic-primary, #2563eb);
}

.eui-chat-theme-classic .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-dot {
    background: var(--euic-font, #ffffff);
}

.eui-chat-theme-classic .eui-chat-launcher.eui-chat-morph {
    background: linear-gradient(135deg, var(--euic-primary, #2563eb), var(--euic-secondary, var(--euic-primary, #2563eb)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-classic .eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-track {
    background: linear-gradient(135deg, var(--euic-primary, #2563eb), var(--euic-secondary, var(--euic-primary, #2563eb)));
    color: var(--euic-font, #ffffff);
}

/* === DARK MODE OVERRIDES === */

.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-body,
.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-composer,
.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-disclaimer {
    background: #0f172a;
}

.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-body::-webkit-scrollbar-thumb {
    background: #334155;
}

.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #475569;
}

.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-msg .eui-chat-msg-avatar {
    background: rgba(37, 99, 235, 0.22);
}

.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-msg .eui-chat-msg-avatar svg {
    color: #93c5fd;
}

.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-msg .eui-chat-msg-time {
    color: #64748b;
}

.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: #1e293b;
    color: #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-composer {
    border-top-color: #1e293b;
}

.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-composer textarea {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-composer textarea::placeholder {
    color: #64748b;
}

.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-composer textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-disclaimer {
    color: #64748b;
}

.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    background: #1e293b;
    color: #93c5fd;
    border-color: #2563eb;
}

.eui-chat-mode-dark.eui-chat-theme-classic .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item:hover {
    background: #2563eb;
    color: #fff;
}

/* ============================================================
   THEME: MODERN (Void)
   Near-black UI, header is transparent bar with glow accent,
   bot messages have a left accent line, user bubbles are vibrant violet,
   composer is inset dark field, send button is square-ish with glow
   ============================================================ */

.eui-chat-theme-modern .eui-chat-container,
.eui-chat-theme-modern.eui-chat-container {
    max-height: 100%;
    max-width: 100%;
    padding: 5px;
    z-index: 10009;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.eui-chat-theme-modern .eui-chat-container *,
.eui-chat-theme-modern.eui-chat-container * {
    box-sizing: border-box;
}

.eui-chat-theme-modern .eui-chat-window {
    border-radius: 18px;
    flex-grow: 1;
    display: flex;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(124, 58, 237, 0.3);
    flex-direction: column;
    z-index: 10010;
    overflow: hidden;
    max-height: 100%;
    background: #0e0e14;
}

.eui-chat-theme-modern .eui-chat-window.eui-chat-no-shadow {
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* --- Header: dark, no gradient, accent glow strip at bottom --- */

.eui-chat-theme-modern .eui-chat-header {
    height: 62px;
    background: #16161f;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 11px;
    flex-shrink: 0;
    position: relative;
}

.eui-chat-theme-modern .eui-chat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, transparent 0%, #7c3aed 40%, #a78bfa 60%, transparent 100%);
}

.eui-chat-theme-modern .eui-chat-header .eui-chat-header-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.18);
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 10px;
}

.eui-chat-theme-modern .eui-chat-header .eui-chat-header-icon img {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    object-fit: cover;
}

.eui-chat-theme-modern .eui-chat-header .eui-chat-header-icon svg {
    color: #a78bfa;
    width: 18px;
    height: 18px;
}

.eui-chat-theme-modern .eui-chat-header .eui-chat-header-logo {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.eui-chat-theme-modern .eui-chat-header .eui-chat-header-logo img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
}

.eui-chat-theme-modern .eui-chat-header .eui-chat-header-title {
    flex-grow: 1;
    overflow: hidden;
}

.eui-chat-theme-modern .eui-chat-header .eui-chat-header-title .eui-chat-title-text {
    font-size: 14px;
    font-weight: 700;
    color: #f1f0ff;
    letter-spacing: 0.2px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eui-chat-theme-modern .eui-chat-header .eui-chat-header-title .eui-chat-subtitle-text {
    font-size: 11px;
    color: #7c3aed;
    display: block;
    margin-top: 1px;
    letter-spacing: 0.3px;
}

.eui-chat-theme-modern .eui-chat-header .eui-chat-header-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.eui-chat-theme-modern .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6d6d8a;
    border-radius: 7px;
    font-size: 17px;
    transition:
        background 0.15s,
        color 0.15s;
}

.eui-chat-theme-modern .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
    background: rgba(124, 58, 237, 0.14);
    color: #a78bfa;
}

/* --- Body --- */

.eui-chat-theme-modern .eui-chat-body {
    flex-grow: 1;
    background: #0e0e14;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 0 24px;
}

.eui-chat-theme-modern .eui-chat-body::-webkit-scrollbar {
    width: 3px;
}

.eui-chat-theme-modern .eui-chat-body::-webkit-scrollbar-thumb {
    background: #2a2a3e;
    border-radius: 3px;
}

.eui-chat-theme-modern .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #4a4a6e;
}

/* --- Messages --- */

.eui-chat-theme-modern .eui-chat-msg {
    width: 100%;
    max-width: 100%;
    margin: 0 0 8px 0;
    padding: 0;
}

.eui-chat-theme-modern .eui-chat-msg.eui-chat-msg-system {
    display: flex;
    align-items: flex-start;
    padding-left: 14px;
}

.eui-chat-theme-modern .eui-chat-msg .eui-chat-msg-avatar {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.15);
    border-radius: 6px;
    margin-right: 6px;
    margin-top: 2px;
}

.eui-chat-theme-modern .eui-chat-msg .eui-chat-msg-avatar svg {
    width: 14px;
    height: 14px;
    color: #a78bfa;
}

.eui-chat-theme-modern .eui-chat-msg .eui-chat-msg-body {
    flex: 1;
    min-width: 0;
}

.eui-chat-theme-modern .eui-chat-msg .eui-chat-msg-time {
    font-size: 10px;
    color: #3a3a52;
    margin-top: 3px;
}

/* Bot bubble: left accent stripe */

.eui-chat-theme-modern .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: #16161f;
    border-left: 2.5px solid #7c3aed;
    border-radius: 0 10px 10px 10px;
    padding: 9px 13px;
    font-size: 13.5px;
    line-height: 1.58;
    color: #c8c8e8;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
}

/* User bubble: vibrant violet */

.eui-chat-theme-modern .eui-chat-msg.eui-chat-msg-user {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    max-width: 78%;
    margin-left: auto;
    gap: 6px;
}

.eui-chat-theme-modern .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.eui-chat-theme-modern .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-content {
    display: inline-block;
    background: #7c3aed;
    color: #fff;
    border-radius: 10px 0 10px 10px;
    padding: 9px 13px;
    font-size: 13.5px;
    line-height: 1.58;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
}

/* --- Composer: inset dark field --- */

.eui-chat-theme-modern .eui-chat-composer {
    background: #16161f;
    display: flex;
    flex-shrink: 0;
    padding: 10px 12px;
    align-items: flex-end;
    gap: 8px;
    border-top: 1.5px solid rgba(124, 58, 237, 0.2);
}

.eui-chat-theme-modern .eui-chat-composer textarea {
    flex-grow: 1;
    padding: 9px 14px;
    font-size: 13.5px;
    border: 1px solid #2a2a40;
    border-radius: 10px;
    background: #0e0e14;
    color: #d4d4f0;
    font-family: inherit;
    outline: none;
    resize: none;
    min-height: 38px;
    max-height: 100px;
    overflow-y: auto;
    line-height: 1.4;
    transition: border-color 0.18s;
}

.eui-chat-theme-modern .eui-chat-composer textarea:focus {
    border-color: #7c3aed;
}

.eui-chat-theme-modern .eui-chat-composer textarea::placeholder {
    color: #3a3a55;
}

.eui-chat-theme-modern .eui-chat-composer .eui-chat-action-btns {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 1px;
}

/* Square-ish send with glow */

.eui-chat-theme-modern .eui-chat-composer div.eui-chat-send-btn,
.eui-chat-theme-modern .eui-chat-composer .eui-chat-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--euic-primary, #7c3aed);
    color: var(--euic-font, #fff);
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    transition:
        background 0.18s,
        box-shadow 0.18s;
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
}

.eui-chat-theme-modern .eui-chat-composer div.eui-chat-send-btn:hover,
.eui-chat-theme-modern .eui-chat-composer .eui-chat-send-btn:hover {
    background: var(--euic-primary, #6d28d9);
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.55);
}

/* --- Disclaimer --- */

.eui-chat-theme-modern .eui-chat-disclaimer {
    font-size: 10px;
    padding: 4px 8px;
    background: #16161f;
    color: #3a3a55;
    text-align: center;
}

.eui-chat-theme-modern .eui-chat-disclaimer span {
    display: block;
    text-align: center;
}

/* --- Options --- */

.eui-chat-theme-modern .eui-chat-opts-wrap {
    margin-top: 6px;
    margin-left: 14px;
    width: calc(100% - 42px);
}

.eui-chat-theme-modern .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    padding: 5px 14px;
    border: 1px solid rgba(124, 58, 237, 0.5);
    border-radius: 8px;
    cursor: pointer;
    background: #16161f;
    color: #a78bfa;
    font-size: 13px;
    font-weight: 500;
    min-height: 32px;
    transition:
        background 0.18s,
        color 0.18s,
        border-color 0.18s;
}

.eui-chat-theme-modern .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item:hover {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
}

/* --- Launcher --- */

.eui-chat-theme-modern .eui-chat-launcher.eui-chat-icon-btn {
    background: linear-gradient(to right, var(--euic-primary, #7c3aed), var(--euic-primary, #6d28d9));
    color: var(--euic-font, #ffffff);
    border-color: var(--euic-primary, #7c3aed);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.45);
    border-radius: 50%;
}

.eui-chat-theme-modern .eui-chat-launcher.eui-chat-expand .eui-chat-expand-text {
    background-image: linear-gradient(90deg, var(--euic-primary, #7c3aed), var(--euic-primary, #6d28d9));
}

.eui-chat-theme-modern .eui-chat-launcher.eui-chat-expand .eui-chat-expand-icon-wrap {
    background-color: var(--euic-primary, #7c3aed);
}

.eui-chat-theme-modern .eui-chat-launcher.eui-chat-spark .eui-chat-spark-inner {
    background: linear-gradient(135deg, var(--euic-primary, #7c3aed), var(--euic-secondary, var(--euic-primary, #7c3aed)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-modern .eui-chat-launcher.eui-chat-spark {
    background: linear-gradient(135deg, var(--euic-primary, #7c3aed), var(--euic-secondary, var(--euic-primary, #7c3aed)));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.eui-chat-theme-modern .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-core {
    background: linear-gradient(135deg, var(--euic-primary, #7c3aed), var(--euic-primary, #7c3aed));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-modern .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-ring {
    border-color: var(--euic-primary, #7c3aed);
}

.eui-chat-theme-modern .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-dot {
    background: var(--euic-font, #ffffff);
}

.eui-chat-theme-modern .eui-chat-launcher.eui-chat-morph {
    background: linear-gradient(135deg, var(--euic-primary, #7c3aed), var(--euic-secondary, var(--euic-primary, #7c3aed)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-modern .eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-track {
    background: linear-gradient(135deg, var(--euic-primary, #7c3aed), var(--euic-secondary, var(--euic-primary, #7c3aed)));
    color: var(--euic-font, #ffffff);
}

/* === DARK MODE OVERRIDES === */

.eui-chat-mode-dark.eui-chat-theme-modern .eui-chat-window {
    background: #0a0a10;
}

.eui-chat-mode-dark.eui-chat-theme-modern .eui-chat-body {
    background: #0a0a10;
}

.eui-chat-mode-dark.eui-chat-theme-modern .eui-chat-header,
.eui-chat-mode-dark.eui-chat-theme-modern .eui-chat-composer,
.eui-chat-mode-dark.eui-chat-theme-modern .eui-chat-disclaimer {
    background: #11111a;
}

.eui-chat-mode-dark.eui-chat-theme-modern .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: #11111a;
    color: #d4d4f0;
}

.eui-chat-mode-dark.eui-chat-theme-modern .eui-chat-composer textarea {
    background: #0a0a10;
}

/* ============================================================
   THEME: IRIS (Wave)
   Rich indigo header with curved bottom clip, very-rounded
   bubbles with subtle drop shadows, gradient send button,
   soft lavender body tint, generous spacing
   ============================================================ */

.eui-chat-theme-iris .eui-chat-container,
.eui-chat-theme-iris.eui-chat-container {
    max-height: 100%;
    max-width: 100%;
    padding: 5px;
    z-index: 10009;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.eui-chat-theme-iris .eui-chat-container *,
.eui-chat-theme-iris.eui-chat-container * {
    box-sizing: border-box;
}

.eui-chat-theme-iris .eui-chat-window {
    border-radius: 22px;
    flex-grow: 1;
    display: flex;
    box-shadow:
        0 12px 40px rgba(99, 60, 240, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    z-index: 10010;
    overflow: hidden;
    max-height: 100%;
}

.eui-chat-theme-iris .eui-chat-window.eui-chat-no-shadow {
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* --- Header: tall with curved bottom via padding + clip --- */

.eui-chat-theme-iris .eui-chat-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    padding: 14px 16px 30px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
    clip-path: ellipse(110% 100% at 50% 0%);
    margin-bottom: -16px;
    z-index: 1;
}

.eui-chat-theme-iris .eui-chat-header .eui-chat-header-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.eui-chat-theme-iris .eui-chat-header .eui-chat-header-icon img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
}

.eui-chat-theme-iris .eui-chat-header .eui-chat-header-icon svg {
    color: #fff;
    width: 22px;
    height: 22px;
}

.eui-chat-theme-iris .eui-chat-header .eui-chat-header-logo {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.eui-chat-theme-iris .eui-chat-header .eui-chat-header-logo img {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    object-fit: cover;
}

.eui-chat-theme-iris .eui-chat-header .eui-chat-header-title {
    flex-grow: 1;
    overflow: hidden;
    padding-top: 2px;
}

.eui-chat-theme-iris .eui-chat-header .eui-chat-header-title .eui-chat-title-text {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eui-chat-theme-iris .eui-chat-header .eui-chat-header-title .eui-chat-subtitle-text {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-top: 2px;
}

.eui-chat-theme-iris .eui-chat-header .eui-chat-header-controls {
    display: flex;
    align-items: flex-start;
    gap: 2px;
    flex-shrink: 0;
    padding-top: 2px;
}

.eui-chat-theme-iris .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.75);
    border-radius: 8px;
    font-size: 17px;
    transition:
        background 0.15s,
        color 0.15s;
}

.eui-chat-theme-iris .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

/* --- Body --- */

.eui-chat-theme-iris .eui-chat-body {
    flex-grow: 1;
    background: linear-gradient(180deg, #eef2ff 0%, #f5f3ff 100%);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 28px 0 24px;
}

.eui-chat-theme-iris .eui-chat-body::-webkit-scrollbar {
    width: 4px;
}

.eui-chat-theme-iris .eui-chat-body::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 4px;
}

.eui-chat-theme-iris .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #a78bfa;
}

/* --- Messages --- */

.eui-chat-theme-iris .eui-chat-msg {
    width: 100%;
    max-width: 100%;
    margin: 0 0 10px 0;
    padding: 0;
}

.eui-chat-theme-iris .eui-chat-msg.eui-chat-msg-system {
    display: flex;
    align-items: flex-start;
    padding-left: 14px;
}

.eui-chat-theme-iris .eui-chat-msg .eui-chat-msg-avatar {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ede9fe;
    border-radius: 9px;
    margin-right: 7px;
    margin-top: 2px;
}

.eui-chat-theme-iris .eui-chat-msg .eui-chat-msg-avatar svg {
    width: 15px;
    height: 15px;
    color: #7c3aed;
}

.eui-chat-theme-iris .eui-chat-msg .eui-chat-msg-body {
    flex: 1;
    min-width: 0;
}

.eui-chat-theme-iris .eui-chat-msg .eui-chat-msg-time {
    font-size: 10px;
    color: #a5b4fc;
    margin-top: 3px;
}

/* Bot bubble: very rounded, soft shadow */

.eui-chat-theme-iris .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: #fff;
    border-radius: 6px 20px 20px 20px;
    padding: 11px 15px;
    font-size: 14px;
    line-height: 1.55;
    color: #2d2458;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(99, 60, 240, 0.1);
}

/* User bubble: gradient violet */

.eui-chat-theme-iris .eui-chat-msg.eui-chat-msg-user {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    max-width: 80%;
    margin-left: auto;
    gap: 6px;
}

.eui-chat-theme-iris .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.eui-chat-theme-iris .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-content {
    display: inline-block;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    border-radius: 20px 6px 20px 20px;
    padding: 11px 15px;
    font-size: 14px;
    line-height: 1.55;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    box-shadow: 0 3px 12px rgba(99, 60, 240, 0.32);
}

/* --- Composer --- */

.eui-chat-theme-iris .eui-chat-composer {
    background: #fff;
    display: flex;
    flex-shrink: 0;
    padding: 10px 12px 12px;
    align-items: flex-end;
    gap: 8px;
    border-top: 1px solid #ede9fe;
}

.eui-chat-theme-iris .eui-chat-composer textarea {
    flex-grow: 1;
    padding: 9px 16px;
    font-size: 14px;
    border: 1.5px solid #ddd6fe;
    border-radius: 20px;
    background: #f5f3ff;
    color: #2d2458;
    font-family: inherit;
    outline: none;
    resize: none;
    min-height: 38px;
    max-height: 100px;
    overflow-y: auto;
    line-height: 1.4;
    transition:
        border-color 0.18s,
        background 0.18s;
}

.eui-chat-theme-iris .eui-chat-composer textarea:focus {
    border-color: #7c3aed;
    background: #fff;
}

.eui-chat-theme-iris .eui-chat-composer textarea::placeholder {
    color: #c4b5fd;
}

.eui-chat-theme-iris .eui-chat-composer .eui-chat-action-btns {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 1px;
}

/* Gradient rounded send */

.eui-chat-theme-iris .eui-chat-composer div.eui-chat-send-btn,
.eui-chat-theme-iris .eui-chat-composer .eui-chat-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--euic-primary, #4f46e5) 0%, var(--euic-primary, #7c3aed) 100%);
    color: var(--euic-font, #fff);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition:
        opacity 0.18s,
        transform 0.12s;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(99, 60, 240, 0.4);
}

.eui-chat-theme-iris .eui-chat-composer div.eui-chat-send-btn:hover,
.eui-chat-theme-iris .eui-chat-composer .eui-chat-send-btn:hover {
    opacity: 0.88;
    transform: scale(1.05);
}

/* --- Disclaimer --- */

.eui-chat-theme-iris .eui-chat-disclaimer {
    font-size: 10px;
    padding: 4px 8px;
    background: #fff;
    color: #c4b5fd;
    border-top: 1px solid #ede9fe;
}

.eui-chat-theme-iris .eui-chat-disclaimer span {
    display: block;
    text-align: center;
}

/* --- Options --- */

.eui-chat-theme-iris .eui-chat-opts-wrap {
    margin-top: 6px;
    margin-left: 14px;
    width: calc(100% - 42px);
}

.eui-chat-theme-iris .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    padding: 5px 16px;
    border: 1.5px solid #c4b5fd;
    border-radius: 20px;
    cursor: pointer;
    background: #fff;
    color: #4f46e5;
    font-size: 13px;
    font-weight: 500;
    min-height: 32px;
    transition:
        background 0.18s,
        color 0.18s,
        border-color 0.18s;
}

.eui-chat-theme-iris .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    border-color: transparent;
}

/* --- Launcher --- */

.eui-chat-theme-iris .eui-chat-launcher.eui-chat-icon-btn {
    background: linear-gradient(135deg, var(--euic-primary, #4f46e5), var(--euic-primary, #7c3aed));
    color: var(--euic-font, #ffffff);
    border-color: var(--euic-primary, #4f46e5);
    box-shadow: 0 4px 16px rgba(99, 60, 240, 0.4);
    border-radius: 50%;
}

.eui-chat-theme-iris .eui-chat-launcher.eui-chat-expand .eui-chat-expand-text {
    background-image: linear-gradient(90deg, var(--euic-primary, #4f46e5), var(--euic-primary, #7c3aed));
}

.eui-chat-theme-iris .eui-chat-launcher.eui-chat-expand .eui-chat-expand-icon-wrap {
    background-color: var(--euic-primary, #4f46e5);
}

.eui-chat-theme-iris .eui-chat-launcher.eui-chat-spark .eui-chat-spark-inner {
    background: linear-gradient(135deg, var(--euic-primary, #4f46e5), var(--euic-secondary, var(--euic-primary, #4f46e5)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-iris .eui-chat-launcher.eui-chat-spark {
    background: linear-gradient(135deg, var(--euic-primary, #4f46e5), var(--euic-secondary, var(--euic-primary, #4f46e5)));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.eui-chat-theme-iris .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-core {
    background: linear-gradient(135deg, var(--euic-primary, #4f46e5), var(--euic-primary, #7c3aed));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-iris .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-ring {
    border-color: var(--euic-primary, #4f46e5);
}

.eui-chat-theme-iris .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-dot {
    background: var(--euic-font, #ffffff);
}

.eui-chat-theme-iris .eui-chat-launcher.eui-chat-morph {
    background: linear-gradient(135deg, var(--euic-primary, #4f46e5), var(--euic-secondary, var(--euic-primary, #4f46e5)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-iris .eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-track {
    background: linear-gradient(135deg, var(--euic-primary, #4f46e5), var(--euic-secondary, var(--euic-primary, #4f46e5)));
    color: var(--euic-font, #ffffff);
}

/* === DARK MODE OVERRIDES === */

.eui-chat-mode-dark.eui-chat-theme-iris .eui-chat-body {
    background: linear-gradient(180deg, #1e1b4b 0%, #2e1065 100%);
}

.eui-chat-mode-dark.eui-chat-theme-iris .eui-chat-body::-webkit-scrollbar-thumb {
    background: #4c1d95;
}

.eui-chat-mode-dark.eui-chat-theme-iris .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #6d28d9;
}

.eui-chat-mode-dark.eui-chat-theme-iris .eui-chat-msg .eui-chat-msg-avatar {
    background: rgba(124, 58, 237, 0.25);
}

.eui-chat-mode-dark.eui-chat-theme-iris .eui-chat-msg .eui-chat-msg-avatar svg {
    color: #c4b5fd;
}

.eui-chat-mode-dark.eui-chat-theme-iris .eui-chat-msg .eui-chat-msg-time {
    color: #7c3aed;
}

.eui-chat-mode-dark.eui-chat-theme-iris .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: #2e1065;
    color: #ede9fe;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.eui-chat-mode-dark.eui-chat-theme-iris .eui-chat-composer {
    background: #1e1b4b;
    border-top-color: #312e81;
}

.eui-chat-mode-dark.eui-chat-theme-iris .eui-chat-composer textarea {
    background: #2e1065;
    color: #ede9fe;
    border-color: #4c1d95;
}

.eui-chat-mode-dark.eui-chat-theme-iris .eui-chat-composer textarea::placeholder {
    color: #a78bfa;
}

.eui-chat-mode-dark.eui-chat-theme-iris .eui-chat-composer textarea:focus {
    background: #1e1b4b;
    border-color: #a78bfa;
}

.eui-chat-mode-dark.eui-chat-theme-iris .eui-chat-disclaimer {
    background: #1e1b4b;
    color: #a78bfa;
    border-top-color: #312e81;
}

.eui-chat-mode-dark.eui-chat-theme-iris .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    background: #2e1065;
    color: #c4b5fd;
    border-color: #6d28d9;
}

/* ============================================================
   THEME: DUSK (Warm / Stacked Header)
   Warm taupe palette. Header wraps into two rows: icon+controls
   on the top strip, title spanning full width on the row below.
   Creates a distinct "newspaper masthead" look vs side-by-side headers.
   Serif font, earthy tones, raised composer panel.
   ============================================================ */

.eui-chat-theme-dusk .eui-chat-container,
.eui-chat-theme-dusk.eui-chat-container {
    max-height: 100%;
    max-width: 100%;
    padding: 5px;
    z-index: 10009;
    font-family: 'Georgia', 'Palatino', Georgia, serif;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.eui-chat-theme-dusk .eui-chat-container *,
.eui-chat-theme-dusk.eui-chat-container * {
    box-sizing: border-box;
}

.eui-chat-theme-dusk .eui-chat-window {
    border-radius: 14px;
    flex-grow: 1;
    display: flex;
    box-shadow:
        0 8px 28px rgba(100, 70, 30, 0.18),
        0 1px 4px rgba(0, 0, 0, 0.08);
    flex-direction: column;
    z-index: 10010;
    overflow: hidden;
    max-height: 100%;
}

.eui-chat-theme-dusk .eui-chat-window.eui-chat-no-shadow {
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* --- Header: stacked two-row via flex-wrap --- */

.eui-chat-theme-dusk .eui-chat-header {
    background: linear-gradient(135deg, #b8936a 0%, #d4b896 100%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 12px 0;
    gap: 0;
    flex-shrink: 0;
    position: relative;
}

/* Icon row (top-left) */

.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-icon {
    order: 1;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 7px;
}

.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-icon img {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    object-fit: cover;
}

.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-icon svg {
    color: #5c3a1e;
    width: 14px;
    height: 14px;
}

.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-logo {
    order: 1;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-logo img {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    object-fit: cover;
}

/* Controls row (top-right, pushes to end) */

.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-controls {
    order: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-left: auto;
}

.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(59, 31, 10, 0.6);
    border-radius: 7px;
    font-size: 16px;
    transition:
        background 0.15s,
        color 0.15s;
}

.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
    background: rgba(59, 31, 10, 0.1);
    color: #3b1f0a;
}

/* Title: spans full second row */

.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-title {
    order: 2;
    flex-basis: 100%;
    padding: 6px 0 12px;
    overflow: hidden;
}

.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-title .eui-chat-title-text {
    font-size: 18px;
    font-weight: 700;
    color: #2c1206;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Georgia', serif;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-title .eui-chat-subtitle-text {
    font-size: 10.5px;
    color: rgba(44, 18, 6, 0.55);
    display: block;
    margin-top: 2px;
    font-family: system-ui, sans-serif;
}

/* --- Body: warm parchment --- */

.eui-chat-theme-dusk .eui-chat-body {
    flex-grow: 1;
    background: linear-gradient(180deg, #f9f0e6 0%, #fdf6ee 100%);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 0 24px;
}

.eui-chat-theme-dusk .eui-chat-body::-webkit-scrollbar {
    width: 4px;
}

.eui-chat-theme-dusk .eui-chat-body::-webkit-scrollbar-thumb {
    background: #dbc09a;
    border-radius: 4px;
}

.eui-chat-theme-dusk .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #c8a882;
}

/* --- Messages --- */

.eui-chat-theme-dusk .eui-chat-msg {
    width: 100%;
    max-width: 100%;
    margin: 0 0 8px 0;
    padding: 0;
}

.eui-chat-theme-dusk .eui-chat-msg.eui-chat-msg-system {
    display: flex;
    align-items: flex-start;
    padding-left: 14px;
}

.eui-chat-theme-dusk .eui-chat-msg .eui-chat-msg-avatar {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8d5b7;
    border-radius: 8px;
    margin-right: 6px;
    margin-top: 2px;
}

.eui-chat-theme-dusk .eui-chat-msg .eui-chat-msg-avatar svg {
    width: 14px;
    height: 14px;
    color: #5c3a1e;
}

.eui-chat-theme-dusk .eui-chat-msg .eui-chat-msg-body {
    flex: 1;
    min-width: 0;
}

.eui-chat-theme-dusk .eui-chat-msg .eui-chat-msg-time {
    font-size: 10px;
    color: #c8a882;
    font-family: system-ui, sans-serif;
    margin-top: 3px;
}

/* Bot bubble: warm white with left serif stripe */

.eui-chat-theme-dusk .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: #fff8f0;
    border: 1px solid #e8d0b0;
    border-left: 3px solid #c8a882;
    border-radius: 0 12px 12px 12px;
    padding: 9px 13px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #3b2010;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    font-family: 'Georgia', serif;
}

/* User bubble: warm brown */

.eui-chat-theme-dusk .eui-chat-msg.eui-chat-msg-user {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    max-width: 78%;
    margin-left: auto;
    gap: 6px;
}

.eui-chat-theme-dusk .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.eui-chat-theme-dusk .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-content {
    display: inline-block;
    background: #6b3a20;
    color: #fdf6ee;
    border: none;
    border-radius: 12px 0 12px 12px;
    border-right: 3px solid #4a2510;
    padding: 9px 13px;
    font-size: 13.5px;
    line-height: 1.6;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    font-family: 'Georgia', serif;
    box-shadow: 0 2px 6px rgba(107, 58, 32, 0.25);
}

/* --- Composer: raised sunken panel with thicker top border --- */

.eui-chat-theme-dusk .eui-chat-composer {
    background: #efe0cc;
    display: flex;
    flex-shrink: 0;
    padding: 10px 12px 12px;
    align-items: flex-end;
    gap: 8px;
    border-top: 3px solid #c8a882;
}

.eui-chat-theme-dusk .eui-chat-composer textarea {
    flex-grow: 1;
    padding: 8px 14px;
    font-size: 13.5px;
    border: 1.5px solid #dbc09a;
    border-radius: 10px;
    background: #fff;
    color: #3b2010;
    font-family: 'Georgia', serif;
    outline: none;
    resize: none;
    min-height: 36px;
    max-height: 100px;
    overflow-y: auto;
    line-height: 1.5;
    transition: border-color 0.15s;
}

.eui-chat-theme-dusk .eui-chat-composer textarea:focus {
    border-color: #6b3a20;
}

.eui-chat-theme-dusk .eui-chat-composer textarea::placeholder {
    color: #c8a882;
    font-family: system-ui, sans-serif;
}

.eui-chat-theme-dusk .eui-chat-composer .eui-chat-action-btns {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 1px;
}

.eui-chat-theme-dusk .eui-chat-composer div.eui-chat-send-btn,
.eui-chat-theme-dusk .eui-chat-composer .eui-chat-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--euic-primary, #6b3a20);
    color: var(--euic-font, #fdf6ee);
    border-radius: 10px;
    cursor: pointer;
    font-size: 17px;
    transition: background 0.15s;
    flex-shrink: 0;
}

.eui-chat-theme-dusk .eui-chat-composer div.eui-chat-send-btn:hover,
.eui-chat-theme-dusk .eui-chat-composer .eui-chat-send-btn:hover {
    background: var(--euic-primary, #5c3010);
}

/* --- Disclaimer --- */

.eui-chat-theme-dusk .eui-chat-disclaimer {
    font-size: 10px;
    padding: 4px 8px;
    background: #fff8f0;
    color: #c8a882;
    border-top: 1px solid #e8d0b0;
}

.eui-chat-theme-dusk .eui-chat-disclaimer span {
    display: block;
    text-align: center;
}

/* --- Options --- */

.eui-chat-theme-dusk .eui-chat-opts-wrap {
    margin-top: 6px;
    margin-left: 14px;
    width: calc(100% - 42px);
}

.eui-chat-theme-dusk .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    padding: 5px 13px;
    border: 1.5px solid #c8a882;
    border-radius: 10px;
    cursor: pointer;
    background: #fff8f0;
    color: #6b3a20;
    font-size: 13px;
    font-weight: 500;
    min-height: 32px;
    font-family: system-ui, sans-serif;
    transition:
        background 0.15s,
        color 0.15s;
}

.eui-chat-theme-dusk .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item:hover {
    background: #6b3a20;
    color: #fdf6ee;
    border-color: #6b3a20;
}

/* --- Launcher --- */

.eui-chat-theme-dusk .eui-chat-launcher.eui-chat-icon-btn {
    background: linear-gradient(to right, var(--euic-primary, #b8936a), var(--euic-primary, #6b3a20));
    color: var(--euic-font, #fdf6ee);
    border-color: var(--euic-primary, #b8936a);
    box-shadow: 0 4px 16px rgba(100, 70, 30, 0.35);
    border-radius: 50%;
}

.eui-chat-theme-dusk .eui-chat-launcher.eui-chat-expand .eui-chat-expand-text {
    background-image: linear-gradient(90deg, var(--euic-primary, #b8936a), var(--euic-primary, #6b3a20));
}

.eui-chat-theme-dusk .eui-chat-launcher.eui-chat-expand .eui-chat-expand-icon-wrap {
    background-color: var(--euic-primary, #6b3a20);
}

.eui-chat-theme-dusk .eui-chat-launcher.eui-chat-spark .eui-chat-spark-inner {
    background: linear-gradient(135deg, var(--euic-primary, #6b3a20), var(--euic-secondary, var(--euic-primary, #6b3a20)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-dusk .eui-chat-launcher.eui-chat-spark {
    background: linear-gradient(135deg, var(--euic-primary, #6b3a20), var(--euic-secondary, var(--euic-primary, #6b3a20)));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.eui-chat-theme-dusk .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-core {
    background: linear-gradient(135deg, var(--euic-primary, #6b3a20), var(--euic-primary, #6b3a20));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-dusk .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-ring {
    border-color: var(--euic-primary, #6b3a20);
}

.eui-chat-theme-dusk .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-dot {
    background: var(--euic-font, #ffffff);
}

.eui-chat-theme-dusk .eui-chat-launcher.eui-chat-morph {
    background: linear-gradient(135deg, var(--euic-primary, #6b3a20), var(--euic-secondary, var(--euic-primary, #6b3a20)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-dusk .eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-track {
    background: linear-gradient(135deg, var(--euic-primary, #6b3a20), var(--euic-secondary, var(--euic-primary, #6b3a20)));
    color: var(--euic-font, #ffffff);
}

/* === DARK MODE OVERRIDES === */

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-header {
    background: linear-gradient(135deg, #5c3a1e 0%, #3b2010 100%);
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-icon {
    background: rgba(255, 255, 255, 0.1);
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-icon svg {
    color: #fde68a;
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
    color: rgba(253, 230, 138, 0.7);
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
    background: rgba(253, 230, 138, 0.15);
    color: #fde68a;
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-title .eui-chat-title-text {
    color: #fde68a;
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-header .eui-chat-header-title .eui-chat-subtitle-text {
    color: rgba(253, 230, 138, 0.7);
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-body {
    background: linear-gradient(180deg, #1c1208 0%, #2a1810 100%);
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-body::-webkit-scrollbar-thumb {
    background: #5c3a1e;
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #7c4a2a;
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-msg .eui-chat-msg-avatar {
    background: #3b2010;
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-msg .eui-chat-msg-avatar svg {
    color: #fde68a;
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-msg .eui-chat-msg-time {
    color: #a8825a;
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: #2a1810;
    color: #fdf6ee;
    border-color: #4a2a18;
    border-left-color: #b8936a;
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-composer {
    background: #2a1810;
    border-top-color: #b8936a;
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-composer textarea {
    background: #1c1208;
    color: #fdf6ee;
    border-color: #5c3a1e;
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-composer textarea::placeholder {
    color: #a8825a;
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-composer textarea:focus {
    border-color: #d4b896;
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-disclaimer {
    background: #2a1810;
    color: #a8825a;
    border-top-color: #4a2a18;
}

.eui-chat-mode-dark.eui-chat-theme-dusk .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    background: #2a1810;
    color: #fde68a;
    border-color: #b8936a;
}

/* ============================================================
   THEME: MIST (Centered Header)
   Blue-grey palette with green accent. Header is centered —
   icon, title, and subtitle are stacked in the middle rather
   than left-aligned. Creates an app-splash-screen feel.
   Composer is a raised floating bar with rounded pill input.
   ============================================================ */

.eui-chat-theme-mist .eui-chat-container,
.eui-chat-theme-mist.eui-chat-container {
    max-height: 100%;
    max-width: 100%;
    padding: 5px;
    z-index: 10009;
    font-family: 'Inter', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.eui-chat-theme-mist .eui-chat-container *,
.eui-chat-theme-mist.eui-chat-container * {
    box-sizing: border-box;
}

.eui-chat-theme-mist .eui-chat-window {
    border-radius: 18px;
    flex-grow: 1;
    display: flex;
    box-shadow:
        0 6px 24px rgba(100, 130, 160, 0.18),
        0 1px 4px rgba(0, 0, 0, 0.06);
    flex-direction: column;
    z-index: 10010;
    overflow: hidden;
    max-height: 100%;
    background: #f0f4f8;
}

.eui-chat-theme-mist .eui-chat-window.eui-chat-no-shadow {
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* --- Header: centered content layout --- */

.eui-chat-theme-mist .eui-chat-header {
    background: #e8edf4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 14px 12px 10px;
    gap: 0;
    flex-shrink: 0;
    border-bottom: 1px solid #d8e0ec;
    position: relative;
    justify-content: center;
    text-align: center;
}

/* Online indicator strip at top */

.eui-chat-theme-mist .eui-chat-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

/* Icon centered above title */

.eui-chat-theme-mist .eui-chat-header .eui-chat-header-icon {
    order: 1;
    flex-basis: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 6px;
}

.eui-chat-theme-mist .eui-chat-header .eui-chat-header-icon > * {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(100, 130, 160, 0.18);
    position: relative;
}

.eui-chat-theme-mist .eui-chat-header .eui-chat-header-icon > *::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #10b981;
    border: 2px solid #e8edf4;
    border-radius: 50%;
}

.eui-chat-theme-mist .eui-chat-header .eui-chat-header-icon img {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    object-fit: cover;
}

.eui-chat-theme-mist .eui-chat-header .eui-chat-header-icon svg {
    color: #4a7fa5;
    width: 20px;
    height: 20px;
}

.eui-chat-theme-mist .eui-chat-header .eui-chat-header-logo {
    order: 1;
    flex-basis: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.eui-chat-theme-mist .eui-chat-header .eui-chat-header-logo img {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    object-fit: cover;
}

/* Title block: centered, full width */

.eui-chat-theme-mist .eui-chat-header .eui-chat-header-title {
    order: 2;
    flex-basis: 100%;
    overflow: hidden;
    text-align: center;
}

.eui-chat-theme-mist .eui-chat-header .eui-chat-header-title .eui-chat-title-text {
    font-size: 14px;
    font-weight: 700;
    color: #1e3a5f;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eui-chat-theme-mist .eui-chat-header .eui-chat-header-title .eui-chat-subtitle-text {
    font-size: 11px;
    color: #10b981;
    display: block;
    margin-top: 1px;
    font-weight: 500;
}

/* Controls block: absolutely positioned top-right */

.eui-chat-theme-mist .eui-chat-header .eui-chat-header-controls {
    order: 3;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    position: absolute;
    top: 10px;
    right: 10px;
}

.eui-chat-theme-mist .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7a9ab8;
    border-radius: 8px;
    font-size: 16px;
    transition:
        background 0.15s,
        color 0.15s;
}

.eui-chat-theme-mist .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
    background: #d8e4f0;
    color: #1e3a5f;
}

/* --- Body --- */

.eui-chat-theme-mist .eui-chat-body {
    flex-grow: 1;
    background: #f0f4f8;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 0 8px;
}

.eui-chat-theme-mist .eui-chat-body::-webkit-scrollbar {
    width: 4px;
}

.eui-chat-theme-mist .eui-chat-body::-webkit-scrollbar-thumb {
    background: #c8d8e8;
    border-radius: 4px;
}

.eui-chat-theme-mist .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #a0bcd4;
}

/* --- Messages --- */

.eui-chat-theme-mist .eui-chat-msg {
    width: 100%;
    max-width: 100%;
    margin: 0 0 8px 0;
    padding: 0;
}

.eui-chat-theme-mist .eui-chat-msg.eui-chat-msg-system {
    display: flex;
    align-items: flex-start;
    padding-left: 12px;
}

.eui-chat-theme-mist .eui-chat-msg .eui-chat-msg-avatar {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(100, 130, 160, 0.14);
    margin-right: 6px;
    margin-top: 2px;
}

.eui-chat-theme-mist .eui-chat-msg .eui-chat-msg-avatar svg {
    width: 14px;
    height: 14px;
    color: #4a7fa5;
}

.eui-chat-theme-mist .eui-chat-msg .eui-chat-msg-body {
    flex: 1;
    min-width: 0;
}

.eui-chat-theme-mist .eui-chat-msg .eui-chat-msg-time {
    font-size: 10px;
    color: #a0bcd4;
    margin-top: 3px;
}

/* Bot bubble */

.eui-chat-theme-mist .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: #ffffff;
    border-radius: 4px 14px 14px 14px;
    padding: 9px 13px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #1e3a5f;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    box-shadow: 0 1px 4px rgba(100, 130, 160, 0.12);
}

/* User bubble */

.eui-chat-theme-mist .eui-chat-msg.eui-chat-msg-user {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    max-width: 78%;
    margin-left: auto;
    gap: 6px;
}

.eui-chat-theme-mist .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.eui-chat-theme-mist .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-content {
    display: inline-block;
    background: #1e3a5f;
    color: #f0f8ff;
    border-radius: 14px 4px 14px 14px;
    padding: 9px 13px;
    font-size: 13.5px;
    line-height: 1.55;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    box-shadow: 0 2px 6px rgba(30, 58, 95, 0.22);
}

/* --- Composer: elevated floating bar --- */

.eui-chat-theme-mist .eui-chat-composer {
    background: #e8edf4;
    display: flex;
    flex-shrink: 0;
    padding: 8px 10px 10px;
    align-items: flex-end;
    gap: 8px;
    border-top: 1px solid #d8e0ec;
    margin: 0;
}

.eui-chat-theme-mist .eui-chat-composer textarea {
    flex-grow: 1;
    padding: 8px 14px;
    font-size: 13.5px;
    border: 1.5px solid #c8d8ec;
    border-radius: 14px;
    background: #fff;
    color: #1e3a5f;
    font-family: inherit;
    outline: none;
    resize: none;
    min-height: 36px;
    max-height: 96px;
    overflow-y: auto;
    line-height: 1.4;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}

.eui-chat-theme-mist .eui-chat-composer textarea:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.eui-chat-theme-mist .eui-chat-composer textarea::placeholder {
    color: #a0bcd4;
}

.eui-chat-theme-mist .eui-chat-composer .eui-chat-action-btns {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 1px;
}

.eui-chat-theme-mist .eui-chat-composer div.eui-chat-send-btn,
.eui-chat-theme-mist .eui-chat-composer .eui-chat-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--euic-primary, #10b981);
    color: var(--euic-font, #fff);
    border-radius: 12px;
    cursor: pointer;
    font-size: 17px;
    transition: background 0.15s;
    flex-shrink: 0;
}

.eui-chat-theme-mist .eui-chat-composer div.eui-chat-send-btn:hover,
.eui-chat-theme-mist .eui-chat-composer .eui-chat-send-btn:hover {
    background: var(--euic-primary, #059669);
}

/* --- Disclaimer --- */

.eui-chat-theme-mist .eui-chat-disclaimer {
    font-size: 10px;
    padding: 4px 8px;
    background: #e8edf4;
    color: #a0bcd4;
    border-top: 1px solid #d8e0ec;
}

.eui-chat-theme-mist .eui-chat-disclaimer span {
    display: block;
    text-align: center;
}

/* --- Options --- */

.eui-chat-theme-mist .eui-chat-opts-wrap {
    margin-top: 6px;
    margin-left: 12px;
    width: calc(100% - 40px);
}

.eui-chat-theme-mist .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    padding: 5px 13px;
    border: 1.5px solid #a0bcd4;
    border-radius: 14px;
    cursor: pointer;
    background: #fff;
    color: #1e3a5f;
    font-size: 13px;
    font-weight: 500;
    min-height: 32px;
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s;
}

.eui-chat-theme-mist .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item:hover {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

/* --- Launcher --- */

.eui-chat-theme-mist .eui-chat-launcher.eui-chat-icon-btn {
    background: linear-gradient(to right, var(--euic-primary, #10b981), var(--euic-primary, #059669));
    color: var(--euic-font, #ffffff);
    border-color: var(--euic-primary, #10b981);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
    border-radius: 50%;
}

.eui-chat-theme-mist .eui-chat-launcher.eui-chat-expand .eui-chat-expand-text {
    background-image: linear-gradient(90deg, var(--euic-primary, #10b981), var(--euic-primary, #059669));
}

.eui-chat-theme-mist .eui-chat-launcher.eui-chat-expand .eui-chat-expand-icon-wrap {
    background-color: var(--euic-primary, #10b981);
}

.eui-chat-theme-mist .eui-chat-launcher.eui-chat-spark .eui-chat-spark-inner {
    background: linear-gradient(135deg, var(--euic-primary, #10b981), var(--euic-secondary, var(--euic-primary, #10b981)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-mist .eui-chat-launcher.eui-chat-spark {
    background: linear-gradient(135deg, var(--euic-primary, #10b981), var(--euic-secondary, var(--euic-primary, #10b981)));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.eui-chat-theme-mist .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-core {
    background: linear-gradient(135deg, var(--euic-primary, #10b981), var(--euic-primary, #10b981));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-mist .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-ring {
    border-color: var(--euic-primary, #10b981);
}

.eui-chat-theme-mist .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-dot {
    background: var(--euic-font, #ffffff);
}

.eui-chat-theme-mist .eui-chat-launcher.eui-chat-morph {
    background: linear-gradient(135deg, var(--euic-primary, #10b981), var(--euic-secondary, var(--euic-primary, #10b981)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-mist .eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-track {
    background: linear-gradient(135deg, var(--euic-primary, #10b981), var(--euic-secondary, var(--euic-primary, #10b981)));
    color: var(--euic-font, #ffffff);
}

/* === DARK MODE OVERRIDES === */

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-window {
    background: #0c1929;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-header {
    background: #0e2a47;
    border-bottom-color: #155e75;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-header .eui-chat-header-icon > * {
    background: #0c1f33;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-header .eui-chat-header-icon > *::after {
    border-color: #0e2a47;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-header .eui-chat-header-icon svg {
    color: #7dd3fc;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-header .eui-chat-header-title .eui-chat-title-text {
    color: #e0f2fe;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
    color: #7dd3fc;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
    background: #155e75;
    color: #e0f2fe;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-body {
    background: #0c1929;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-body::-webkit-scrollbar-thumb {
    background: #155e75;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #0ea5e9;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-msg .eui-chat-msg-avatar {
    background: #0c1f33;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-msg .eui-chat-msg-avatar svg {
    color: #7dd3fc;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-msg .eui-chat-msg-time {
    color: #475569;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: #0c1f33;
    color: #e0f2fe;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-composer {
    background: #0e2a47;
    border-top-color: #155e75;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-composer textarea {
    background: #0c1f33;
    color: #e0f2fe;
    border-color: #155e75;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-composer textarea::placeholder {
    color: #475569;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-disclaimer {
    background: #0e2a47;
    color: #475569;
    border-top-color: #155e75;
}

.eui-chat-mode-dark.eui-chat-theme-mist .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    background: #0c1f33;
    color: #e0f2fe;
    border-color: #155e75;
}

/* ============================================================
   THEME: EMBER (Tall Banner Header)
   Bold coral-red. Header is extra-tall with a large centered
   bot identity area and a pinned controls row at the very top.
   Bot bubbles are borderless with a left-side colored notch.
   Composer has a stark split: input on left, send isolated right.
   ============================================================ */

.eui-chat-theme-ember .eui-chat-container,
.eui-chat-theme-ember.eui-chat-container {
    max-height: 100%;
    max-width: 100%;
    padding: 5px;
    z-index: 10009;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.eui-chat-theme-ember .eui-chat-container *,
.eui-chat-theme-ember.eui-chat-container * {
    box-sizing: border-box;
}

.eui-chat-theme-ember .eui-chat-window {
    border-radius: 14px;
    flex-grow: 1;
    display: flex;
    box-shadow:
        0 10px 36px rgba(220, 38, 38, 0.2),
        0 2px 6px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    z-index: 10010;
    overflow: hidden;
    max-height: 100%;
}

.eui-chat-theme-ember .eui-chat-window.eui-chat-no-shadow {
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* --- Header: tall banner with centered identity, controls pinned top-right --- */

.eui-chat-theme-ember .eui-chat-header {
    background: #dc2626;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 10px 12px 16px;
    gap: 0;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Diagonal geometric accent */

.eui-chat-theme-ember .eui-chat-header::before {
    content: '';
    position: absolute;
    top: -30px;
    right: 40px;
    width: 80px;
    height: 140px;
    background: rgba(255, 255, 255, 0.06);
    transform: rotate(-25deg);
    pointer-events: none;
}

.eui-chat-theme-ember .eui-chat-header::after {
    content: '';
    position: absolute;
    top: -30px;
    right: 8px;
    width: 48px;
    height: 140px;
    background: rgba(255, 255, 255, 0.04);
    transform: rotate(-25deg);
    pointer-events: none;
}

/* Icon centered */

.eui-chat-theme-ember .eui-chat-header .eui-chat-header-icon {
    order: 1;
    flex-basis: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.eui-chat-theme-ember .eui-chat-header .eui-chat-header-icon > * {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.eui-chat-theme-ember .eui-chat-header .eui-chat-header-icon img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.eui-chat-theme-ember .eui-chat-header .eui-chat-header-icon svg {
    color: #fff;
    width: 22px;
    height: 22px;
}

.eui-chat-theme-ember .eui-chat-header .eui-chat-header-logo {
    order: 1;
    flex-basis: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.eui-chat-theme-ember .eui-chat-header .eui-chat-header-logo img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Title block: centered */

.eui-chat-theme-ember .eui-chat-header .eui-chat-header-title {
    order: 2;
    flex-basis: 100%;
    overflow: hidden;
    text-align: center;
    position: relative;
    z-index: 1;
}

.eui-chat-theme-ember .eui-chat-header .eui-chat-header-title .eui-chat-title-text {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eui-chat-theme-ember .eui-chat-header .eui-chat-header-title .eui-chat-subtitle-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.72);
    display: block;
    margin-top: 2px;
}

/* Controls: absolutely positioned top-right */

.eui-chat-theme-ember .eui-chat-header .eui-chat-header-controls {
    order: 3;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.eui-chat-theme-ember .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 7px;
    font-size: 17px;
    transition:
        background 0.15s,
        color 0.15s;
}

.eui-chat-theme-ember .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

/* --- Body --- */

.eui-chat-theme-ember .eui-chat-body {
    flex-grow: 1;
    background: #fef2f2;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 0 24px;
}

.eui-chat-theme-ember .eui-chat-body::-webkit-scrollbar {
    width: 4px;
}

.eui-chat-theme-ember .eui-chat-body::-webkit-scrollbar-thumb {
    background: #fca5a5;
    border-radius: 4px;
}

.eui-chat-theme-ember .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #f87171;
}

/* --- Messages --- */

.eui-chat-theme-ember .eui-chat-msg {
    width: 100%;
    max-width: 100%;
    margin: 0 0 8px 0;
    padding: 0;
}

.eui-chat-theme-ember .eui-chat-msg.eui-chat-msg-system {
    display: flex;
    align-items: flex-start;
    padding-left: 14px;
}

.eui-chat-theme-ember .eui-chat-msg .eui-chat-msg-avatar {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    border-radius: 50%;
    margin-right: 6px;
    margin-top: 2px;
}

.eui-chat-theme-ember .eui-chat-msg .eui-chat-msg-avatar svg {
    width: 14px;
    height: 14px;
    color: #dc2626;
}

.eui-chat-theme-ember .eui-chat-msg .eui-chat-msg-body {
    flex: 1;
    min-width: 0;
}

.eui-chat-theme-ember .eui-chat-msg .eui-chat-msg-time {
    font-size: 10px;
    color: #fca5a5;
    margin-top: 3px;
}

/* Bot bubble: borderless with left notch */

.eui-chat-theme-ember .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: transparent;
    border: none;
    border-left: 3px solid #dc2626;
    border-radius: 0;
    padding: 6px 12px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #450a0a;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
}

/* User bubble */

.eui-chat-theme-ember .eui-chat-msg.eui-chat-msg-user {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    max-width: 80%;
    margin-left: auto;
    gap: 6px;
}

.eui-chat-theme-ember .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.eui-chat-theme-ember .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-content {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 14px 4px 14px 14px;
    padding: 9px 13px;
    font-size: 13.5px;
    line-height: 1.55;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.28);
}

/* --- Composer: split layout — input area + isolated send --- */

.eui-chat-theme-ember .eui-chat-composer {
    background: #fff;
    display: flex;
    flex-shrink: 0;
    padding: 0;
    align-items: stretch;
    gap: 0;
    border-top: 2px solid #dc2626;
}

.eui-chat-theme-ember .eui-chat-composer textarea {
    flex-grow: 1;
    padding: 12px 14px;
    font-size: 13.5px;
    border: none;
    border-radius: 0;
    background: #fff;
    color: #450a0a;
    font-family: inherit;
    outline: none;
    resize: none;
    min-height: 44px;
    max-height: 100px;
    overflow-y: auto;
    line-height: 1.4;
}

.eui-chat-theme-ember .eui-chat-composer textarea::placeholder {
    color: #fca5a5;
}

.eui-chat-theme-ember .eui-chat-composer .eui-chat-action-btns {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}

/* Isolated right send panel */

.eui-chat-theme-ember .eui-chat-composer div.eui-chat-send-btn,
.eui-chat-theme-ember .eui-chat-composer .eui-chat-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 100%;
    min-height: 44px;
    background: var(--euic-primary, #dc2626);
    color: var(--euic-font, #fff);
    border-radius: 0;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.15s;
    flex-shrink: 0;
}

.eui-chat-theme-ember .eui-chat-composer div.eui-chat-send-btn:hover,
.eui-chat-theme-ember .eui-chat-composer .eui-chat-send-btn:hover {
    background: var(--euic-primary, #b91c1c);
}

/* --- Disclaimer --- */

.eui-chat-theme-ember .eui-chat-disclaimer {
    font-size: 10px;
    padding: 4px 8px;
    background: #fff;
    color: #fca5a5;
    border-top: 1px solid #fecaca;
}

.eui-chat-theme-ember .eui-chat-disclaimer span {
    display: block;
    text-align: center;
}

/* --- Options --- */

.eui-chat-theme-ember .eui-chat-opts-wrap {
    margin-top: 6px;
    margin-left: 14px;
    width: calc(100% - 42px);
}

.eui-chat-theme-ember .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    padding: 5px 14px;
    border: 1.5px solid #fca5a5;
    border-radius: 3px;
    cursor: pointer;
    background: #fff;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    min-height: 32px;
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s;
}

.eui-chat-theme-ember .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

/* --- Launcher --- */

.eui-chat-theme-ember .eui-chat-launcher.eui-chat-icon-btn {
    background: linear-gradient(to right, var(--euic-primary, #dc2626), var(--euic-primary, #b91c1c));
    color: var(--euic-font, #ffffff);
    border-color: var(--euic-primary, #dc2626);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
    border-radius: 50%;
}

.eui-chat-theme-ember .eui-chat-launcher.eui-chat-expand .eui-chat-expand-text {
    background-image: linear-gradient(90deg, var(--euic-primary, #dc2626), var(--euic-primary, #b91c1c));
}

.eui-chat-theme-ember .eui-chat-launcher.eui-chat-expand .eui-chat-expand-icon-wrap {
    background-color: var(--euic-primary, #dc2626);
}

.eui-chat-theme-ember .eui-chat-launcher.eui-chat-spark .eui-chat-spark-inner {
    background: linear-gradient(135deg, var(--euic-primary, #dc2626), var(--euic-secondary, var(--euic-primary, #dc2626)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-ember .eui-chat-launcher.eui-chat-spark {
    background: linear-gradient(135deg, var(--euic-primary, #dc2626), var(--euic-secondary, var(--euic-primary, #dc2626)));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.eui-chat-theme-ember .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-core {
    background: linear-gradient(135deg, var(--euic-primary, #dc2626), var(--euic-primary, #dc2626));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-ember .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-ring {
    border-color: var(--euic-primary, #dc2626);
}

.eui-chat-theme-ember .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-dot {
    background: var(--euic-font, #ffffff);
}

.eui-chat-theme-ember .eui-chat-launcher.eui-chat-morph {
    background: linear-gradient(135deg, var(--euic-primary, #dc2626), var(--euic-secondary, var(--euic-primary, #dc2626)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-ember .eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-track {
    background: linear-gradient(135deg, var(--euic-primary, #dc2626), var(--euic-secondary, var(--euic-primary, #dc2626)));
    color: var(--euic-font, #ffffff);
}

/* === DARK MODE OVERRIDES === */

.eui-chat-mode-dark.eui-chat-theme-ember .eui-chat-body {
    background: #1c0f08;
}

.eui-chat-mode-dark.eui-chat-theme-ember .eui-chat-body::-webkit-scrollbar-thumb {
    background: #7c2d12;
}

.eui-chat-mode-dark.eui-chat-theme-ember .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #9a3412;
}

.eui-chat-mode-dark.eui-chat-theme-ember .eui-chat-msg .eui-chat-msg-avatar {
    background: rgba(220, 38, 38, 0.18);
}

.eui-chat-mode-dark.eui-chat-theme-ember .eui-chat-msg .eui-chat-msg-avatar svg {
    color: #fca5a5;
}

.eui-chat-mode-dark.eui-chat-theme-ember .eui-chat-msg .eui-chat-msg-time {
    color: #7c2d12;
}

.eui-chat-mode-dark.eui-chat-theme-ember .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    color: #fff7ed;
    border-left-color: #ef4444;
}

.eui-chat-mode-dark.eui-chat-theme-ember .eui-chat-composer {
    background: #2a1810;
    border-top-color: #ef4444;
}

.eui-chat-mode-dark.eui-chat-theme-ember .eui-chat-composer textarea {
    background: #2a1810;
    color: #fff7ed;
}

.eui-chat-mode-dark.eui-chat-theme-ember .eui-chat-composer textarea::placeholder {
    color: #7c2d12;
}

.eui-chat-mode-dark.eui-chat-theme-ember .eui-chat-disclaimer {
    background: #2a1810;
    color: #7c2d12;
    border-top-color: #3b1d10;
}

.eui-chat-mode-dark.eui-chat-theme-ember .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    background: #2a1810;
    color: #fca5a5;
    border-color: #7c2d12;
}

/* ============================================================
   THEME: CANVAS (Soft Teal / Productive)
   Header has a vertical left accent stripe instead of full color.
   Pure white window, almost flat — for a focused, clean workspace.
   Bot messages are borderless colored chips. Composer has no outer
   border — just the input field and a send arrow link.
   Teal/emerald accent throughout.
   ============================================================ */

.eui-chat-theme-canvas .eui-chat-container,
.eui-chat-theme-canvas.eui-chat-container {
    max-height: 100%;
    max-width: 100%;
    padding: 5px;
    z-index: 10009;
    font-family: 'Inter', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.eui-chat-theme-canvas .eui-chat-container *,
.eui-chat-theme-canvas.eui-chat-container * {
    box-sizing: border-box;
}

.eui-chat-theme-canvas .eui-chat-window {
    border-radius: 12px;
    flex-grow: 1;
    display: flex;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 150, 136, 0.12);
    flex-direction: column;
    z-index: 10010;
    overflow: hidden;
    max-height: 100%;
    background: #fff;
}

.eui-chat-theme-canvas .eui-chat-window.eui-chat-no-shadow {
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* --- Header: white with left accent stripe, no background color --- */

.eui-chat-theme-canvas .eui-chat-header {
    height: 56px;
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0 14px 0 18px;
    gap: 11px;
    flex-shrink: 0;
    border-bottom: 1px solid #e8f5f4;
    position: relative;
}

/* Left vertical accent stripe */

.eui-chat-theme-canvas .eui-chat-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3.5px;
    background: linear-gradient(180deg, #0d9488 0%, #14b8a6 100%);
    border-radius: 0 2px 2px 0;
}

.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0fdfa;
    border-radius: 9px;
    border: 1px solid #ccfbf1;
}

.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-icon img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    object-fit: cover;
}

.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-icon svg {
    color: #0d9488;
    width: 16px;
    height: 16px;
}

.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-logo img {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    object-fit: cover;
}

.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-title {
    flex-grow: 1;
    overflow: hidden;
}

.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-title .eui-chat-title-text {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.1px;
}

.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-title .eui-chat-subtitle-text {
    font-size: 11px;
    color: #0d9488;
    display: block;
    margin-top: 1px;
    font-weight: 500;
}

.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
    cursor: pointer;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    border-radius: 7px;
    font-size: 16px;
    transition:
        background 0.12s,
        color 0.12s;
}

.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
    background: #f0fdfa;
    color: #0d9488;
}

/* --- Body --- */

.eui-chat-theme-canvas .eui-chat-body {
    flex-grow: 1;
    background: #f8fffe;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 0 16px;
}

.eui-chat-theme-canvas .eui-chat-body::-webkit-scrollbar {
    width: 4px;
}

.eui-chat-theme-canvas .eui-chat-body::-webkit-scrollbar-thumb {
    background: #b2f5ea;
    border-radius: 4px;
}

.eui-chat-theme-canvas .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #5eead4;
}

/* --- Messages --- */

.eui-chat-theme-canvas .eui-chat-msg {
    width: 100%;
    max-width: 100%;
    margin: 0 0 6px 0;
    padding: 0;
}

.eui-chat-theme-canvas .eui-chat-msg.eui-chat-msg-system {
    display: flex;
    align-items: flex-start;
    padding-left: 14px;
}

.eui-chat-theme-canvas .eui-chat-msg .eui-chat-msg-avatar {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ccfbf1;
    border-radius: 7px;
    margin-right: 6px;
    margin-top: 2px;
}

.eui-chat-theme-canvas .eui-chat-msg .eui-chat-msg-avatar svg {
    width: 13px;
    height: 13px;
    color: #0d9488;
}

.eui-chat-theme-canvas .eui-chat-msg .eui-chat-msg-body {
    flex: 1;
    min-width: 0;
}

.eui-chat-theme-canvas .eui-chat-msg .eui-chat-msg-time {
    font-size: 10px;
    color: #b2d8d4;
    margin-top: 3px;
}

/* Bot bubble: chip style, no border */

.eui-chat-theme-canvas .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: #f0fdfa;
    border: none;
    border-radius: 4px 12px 12px 12px;
    padding: 9px 13px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #134e4a;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
}

/* User bubble: teal */

.eui-chat-theme-canvas .eui-chat-msg.eui-chat-msg-user {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    max-width: 78%;
    margin-left: auto;
    gap: 6px;
}

.eui-chat-theme-canvas .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.eui-chat-theme-canvas .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-content {
    display: inline-block;
    background: #0d9488;
    color: #fff;
    border: none;
    border-radius: 12px 4px 12px 12px;
    padding: 9px 13px;
    font-size: 13.5px;
    line-height: 1.55;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.22);
}

/* --- Composer: borderless clean --- */

.eui-chat-theme-canvas .eui-chat-composer {
    background: #fff;
    display: flex;
    flex-shrink: 0;
    padding: 8px 12px 10px;
    align-items: flex-end;
    gap: 8px;
    border-top: 1px solid #e8f5f4;
}

.eui-chat-theme-canvas .eui-chat-composer textarea {
    flex-grow: 1;
    padding: 8px 14px;
    font-size: 13.5px;
    border: 1.5px solid #b2f5ea;
    border-radius: 10px;
    background: #f8fffe;
    color: #0f172a;
    font-family: inherit;
    outline: none;
    resize: none;
    min-height: 36px;
    max-height: 96px;
    overflow-y: auto;
    line-height: 1.4;
    transition: border-color 0.15s;
}

.eui-chat-theme-canvas .eui-chat-composer textarea:focus {
    border-color: #0d9488;
}

.eui-chat-theme-canvas .eui-chat-composer textarea::placeholder {
    color: #94d3cc;
}

.eui-chat-theme-canvas .eui-chat-composer .eui-chat-action-btns {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 1px;
}

/* Arrow-only square button — text/link feel */

.eui-chat-theme-canvas .eui-chat-composer div.eui-chat-send-btn,
.eui-chat-theme-canvas .eui-chat-composer .eui-chat-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--euic-primary, #0d9488);
    color: var(--euic-font, #fff);
    border-radius: 10px;
    cursor: pointer;
    font-size: 17px;
    transition: background 0.15s;
    flex-shrink: 0;
}

.eui-chat-theme-canvas .eui-chat-composer div.eui-chat-send-btn:hover,
.eui-chat-theme-canvas .eui-chat-composer .eui-chat-send-btn:hover {
    background: var(--euic-primary, #0f766e);
}

/* --- Disclaimer --- */

.eui-chat-theme-canvas .eui-chat-disclaimer {
    font-size: 10px;
    padding: 4px 8px;
    background: #fff;
    color: #b2d8d4;
    border-top: 1px solid #e8f5f4;
}

.eui-chat-theme-canvas .eui-chat-disclaimer span {
    display: block;
    text-align: center;
}

/* --- Options --- */

.eui-chat-theme-canvas .eui-chat-opts-wrap {
    margin-top: 6px;
    margin-left: 14px;
    width: calc(100% - 42px);
}

.eui-chat-theme-canvas .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    padding: 5px 13px;
    border: 1.5px solid #5eead4;
    border-radius: 10px;
    cursor: pointer;
    background: #f0fdfa;
    color: #0d9488;
    font-size: 13px;
    font-weight: 500;
    min-height: 32px;
    transition:
        background 0.14s,
        color 0.14s,
        border-color 0.14s;
}

.eui-chat-theme-canvas .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item:hover {
    background: #0d9488;
    color: #fff;
    border-color: #0d9488;
}

/* --- Launcher --- */

.eui-chat-theme-canvas .eui-chat-launcher.eui-chat-icon-btn {
    background: linear-gradient(to right, var(--euic-primary, #0d9488), var(--euic-primary, #0f766e));
    color: var(--euic-font, #ffffff);
    border-color: var(--euic-primary, #0d9488);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
    border-radius: 50%;
}

.eui-chat-theme-canvas .eui-chat-launcher.eui-chat-expand .eui-chat-expand-text {
    background-image: linear-gradient(90deg, var(--euic-primary, #0d9488), var(--euic-primary, #0f766e));
}

.eui-chat-theme-canvas .eui-chat-launcher.eui-chat-expand .eui-chat-expand-icon-wrap {
    background-color: var(--euic-primary, #0d9488);
}

.eui-chat-theme-canvas .eui-chat-launcher.eui-chat-spark .eui-chat-spark-inner {
    background: linear-gradient(135deg, var(--euic-primary, #0d9488), var(--euic-secondary, var(--euic-primary, #0d9488)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-canvas .eui-chat-launcher.eui-chat-spark {
    background: linear-gradient(135deg, var(--euic-primary, #0d9488), var(--euic-secondary, var(--euic-primary, #0d9488)));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.eui-chat-theme-canvas .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-core {
    background: linear-gradient(135deg, var(--euic-primary, #0d9488), var(--euic-primary, #0d9488));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-canvas .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-ring {
    border-color: var(--euic-primary, #0d9488);
}

.eui-chat-theme-canvas .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-dot {
    background: var(--euic-font, #ffffff);
}

.eui-chat-theme-canvas .eui-chat-launcher.eui-chat-morph {
    background: linear-gradient(135deg, var(--euic-primary, #0d9488), var(--euic-secondary, var(--euic-primary, #0d9488)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-canvas .eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-track {
    background: linear-gradient(135deg, var(--euic-primary, #0d9488), var(--euic-secondary, var(--euic-primary, #0d9488)));
    color: var(--euic-font, #ffffff);
}

/* === DARK MODE OVERRIDES === */

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-window {
    background: #0c0a09;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-header {
    background: #1c1917;
    border-bottom-color: #292524;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-icon {
    background: rgba(13, 148, 136, 0.18);
    border-color: rgba(13, 148, 136, 0.4);
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-icon svg {
    color: #5eead4;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-title .eui-chat-title-text {
    color: #fafaf9;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-title .eui-chat-subtitle-text {
    color: #5eead4;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
    color: #78716c;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
    background: rgba(13, 148, 136, 0.18);
    color: #5eead4;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-body {
    background: #0c0a09;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-body::-webkit-scrollbar-thumb {
    background: #134e4a;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #0f766e;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-msg .eui-chat-msg-avatar {
    background: rgba(13, 148, 136, 0.2);
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-msg .eui-chat-msg-avatar svg {
    color: #5eead4;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-msg .eui-chat-msg-time {
    color: #44403c;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: rgba(13, 148, 136, 0.14);
    color: #d1fae5;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-composer {
    background: #1c1917;
    border-top-color: #292524;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-composer textarea {
    background: #0c0a09;
    color: #fafaf9;
    border-color: #134e4a;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-composer textarea::placeholder {
    color: #44403c;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-composer textarea:focus {
    border-color: #14b8a6;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-disclaimer {
    background: #1c1917;
    color: #44403c;
    border-top-color: #292524;
}

.eui-chat-mode-dark.eui-chat-theme-canvas .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    background: rgba(13, 148, 136, 0.14);
    color: #5eead4;
    border-color: #0f766e;
}

/* ============================================================
   THEME: PRISM (Split Header Panel)
   Clean light theme. Header is split: a bold colored left block
   holds the avatar, while the white right panel holds title+status.
   This creates a two-column header identity zone vs typical full-width.
   Bot bubbles are flat chips. Composer uses a minimal borderless input
   with a color-accent send bar on the right.
   ============================================================ */

.eui-chat-theme-prism .eui-chat-container,
.eui-chat-theme-prism.eui-chat-container {
    max-height: 100%;
    max-width: 100%;
    padding: 5px;
    z-index: 10009;
    font-family: 'Inter', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.eui-chat-theme-prism .eui-chat-container *,
.eui-chat-theme-prism.eui-chat-container * {
    box-sizing: border-box;
}

.eui-chat-theme-prism .eui-chat-window {
    border-radius: 16px;
    flex-grow: 1;
    display: flex;
    box-shadow:
        0 6px 24px rgba(30, 80, 160, 0.14),
        0 1px 4px rgba(0, 0, 0, 0.06);
    flex-direction: column;
    z-index: 10010;
    overflow: hidden;
    max-height: 100%;
    background: #f8faff;
}

.eui-chat-theme-prism .eui-chat-window.eui-chat-no-shadow {
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* --- Header: split left-color / right-white --- */

.eui-chat-theme-prism .eui-chat-header {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    padding: 0;
    gap: 0;
    height: 64px;
    border-bottom: 1px solid #dbeafe;
}

/* Left color block: holds icon */

.eui-chat-theme-prism .eui-chat-header .eui-chat-header-icon {
    width: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1d4ed8;
}

.eui-chat-theme-prism .eui-chat-header .eui-chat-header-icon img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
}

.eui-chat-theme-prism .eui-chat-header .eui-chat-header-icon svg {
    color: #fff;
    width: 22px;
    height: 22px;
}

.eui-chat-theme-prism .eui-chat-header .eui-chat-header-logo {
    width: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1d4ed8;
}

.eui-chat-theme-prism .eui-chat-header .eui-chat-header-logo img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
}

/* Right white block: holds title + controls */

.eui-chat-theme-prism .eui-chat-header .eui-chat-header-title {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 12px;
    background: #fff;
    overflow: hidden;
}

.eui-chat-theme-prism .eui-chat-header .eui-chat-header-title .eui-chat-title-text {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.1px;
}

.eui-chat-theme-prism .eui-chat-header .eui-chat-header-title .eui-chat-subtitle-text {
    font-size: 11px;
    color: #1d4ed8;
    display: block;
    margin-top: 2px;
    font-weight: 500;
}

.eui-chat-theme-prism .eui-chat-header .eui-chat-header-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    padding: 0 10px;
    background: #fff;
}

.eui-chat-theme-prism .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    border-radius: 7px;
    font-size: 16px;
    transition:
        background 0.15s,
        color 0.15s;
}

.eui-chat-theme-prism .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* --- Body --- */

.eui-chat-theme-prism .eui-chat-body {
    flex-grow: 1;
    background: #f8faff;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 0 24px;
}

.eui-chat-theme-prism .eui-chat-body::-webkit-scrollbar {
    width: 4px;
}

.eui-chat-theme-prism .eui-chat-body::-webkit-scrollbar-thumb {
    background: #bfdbfe;
    border-radius: 4px;
}

.eui-chat-theme-prism .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #93c5fd;
}

/* --- Messages --- */

.eui-chat-theme-prism .eui-chat-msg {
    width: 100%;
    max-width: 100%;
    margin: 0 0 8px 0;
    padding: 0;
}

.eui-chat-theme-prism .eui-chat-msg.eui-chat-msg-system {
    display: flex;
    align-items: flex-start;
    padding-left: 14px;
}

.eui-chat-theme-prism .eui-chat-msg .eui-chat-msg-avatar {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    border-radius: 6px;
    margin-right: 6px;
    margin-top: 2px;
}

.eui-chat-theme-prism .eui-chat-msg .eui-chat-msg-avatar svg {
    width: 13px;
    height: 13px;
    color: #1d4ed8;
}

.eui-chat-theme-prism .eui-chat-msg .eui-chat-msg-body {
    flex: 1;
    min-width: 0;
}

.eui-chat-theme-prism .eui-chat-msg .eui-chat-msg-time {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 3px;
}

/* Bot bubble: flat chip style */

.eui-chat-theme-prism .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px 12px 12px 12px;
    padding: 9px 13px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #0f172a;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
}

/* User bubble */

.eui-chat-theme-prism .eui-chat-msg.eui-chat-msg-user {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    max-width: 78%;
    margin-left: auto;
    gap: 6px;
}

.eui-chat-theme-prism .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.eui-chat-theme-prism .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-content {
    display: inline-block;
    background: #1d4ed8;
    color: #fff;
    border-radius: 12px 4px 12px 12px;
    padding: 9px 13px;
    font-size: 13.5px;
    line-height: 1.55;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

/* --- Composer: borderless input with accent send column --- */

.eui-chat-theme-prism .eui-chat-composer {
    background: #fff;
    display: flex;
    flex-shrink: 0;
    padding: 0;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid #dbeafe;
}

.eui-chat-theme-prism .eui-chat-composer textarea {
    flex-grow: 1;
    padding: 12px 14px;
    font-size: 13.5px;
    border: none;
    border-radius: 0;
    background: #fff;
    color: #0f172a;
    font-family: inherit;
    outline: none;
    resize: none;
    min-height: 44px;
    max-height: 100px;
    overflow-y: auto;
    line-height: 1.4;
}

.eui-chat-theme-prism .eui-chat-composer textarea::placeholder {
    color: #94a3b8;
}

.eui-chat-theme-prism .eui-chat-composer .eui-chat-action-btns {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}

/* Accent column send (matches the header left block width) */

.eui-chat-theme-prism .eui-chat-composer div.eui-chat-send-btn,
.eui-chat-theme-prism .eui-chat-composer .eui-chat-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 100%;
    min-height: 44px;
    background: var(--euic-primary, #1d4ed8);
    color: var(--euic-font, #fff);
    border-radius: 0;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.15s;
    flex-shrink: 0;
}

.eui-chat-theme-prism .eui-chat-composer div.eui-chat-send-btn:hover,
.eui-chat-theme-prism .eui-chat-composer .eui-chat-send-btn:hover {
    background: var(--euic-primary, #1e40af);
}

/* --- Disclaimer --- */

.eui-chat-theme-prism .eui-chat-disclaimer {
    font-size: 10px;
    padding: 4px 8px;
    background: #fff;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.eui-chat-theme-prism .eui-chat-disclaimer span {
    display: block;
    text-align: center;
}

/* --- Options --- */

.eui-chat-theme-prism .eui-chat-opts-wrap {
    margin-top: 6px;
    margin-left: 14px;
    width: calc(100% - 42px);
}

.eui-chat-theme-prism .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    padding: 5px 13px;
    border: 1.5px solid #bfdbfe;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 500;
    min-height: 32px;
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s;
}

.eui-chat-theme-prism .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item:hover {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
}

/* --- Launcher --- */

.eui-chat-theme-prism .eui-chat-launcher.eui-chat-icon-btn {
    background: linear-gradient(to right, var(--euic-primary, #1d4ed8), var(--euic-primary, #1e40af));
    color: var(--euic-font, #ffffff);
    border-color: var(--euic-primary, #1d4ed8);
    box-shadow: 0 4px 16px rgba(30, 80, 160, 0.35);
    border-radius: 50%;
}

.eui-chat-theme-prism .eui-chat-launcher.eui-chat-expand .eui-chat-expand-text {
    background-image: linear-gradient(90deg, var(--euic-primary, #1d4ed8), var(--euic-primary, #1e40af));
}

.eui-chat-theme-prism .eui-chat-launcher.eui-chat-expand .eui-chat-expand-icon-wrap {
    background-color: var(--euic-primary, #1d4ed8);
}

.eui-chat-theme-prism .eui-chat-launcher.eui-chat-spark .eui-chat-spark-inner {
    background: linear-gradient(135deg, var(--euic-primary, #1d4ed8), var(--euic-secondary, var(--euic-primary, #1d4ed8)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-prism .eui-chat-launcher.eui-chat-spark {
    background: linear-gradient(135deg, var(--euic-primary, #1d4ed8), var(--euic-secondary, var(--euic-primary, #1d4ed8)));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.eui-chat-theme-prism .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-core {
    background: linear-gradient(135deg, var(--euic-primary, #1d4ed8), var(--euic-primary, #1d4ed8));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-prism .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-ring {
    border-color: var(--euic-primary, #1d4ed8);
}

.eui-chat-theme-prism .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-dot {
    background: var(--euic-font, #ffffff);
}

.eui-chat-theme-prism .eui-chat-launcher.eui-chat-morph {
    background: linear-gradient(135deg, var(--euic-primary, #1d4ed8), var(--euic-secondary, var(--euic-primary, #1d4ed8)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-prism .eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-track {
    background: linear-gradient(135deg, var(--euic-primary, #1d4ed8), var(--euic-secondary, var(--euic-primary, #1d4ed8)));
    color: var(--euic-font, #ffffff);
}

/* === DARK MODE OVERRIDES === */

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-window {
    background: #0a1325;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-header {
    border-bottom-color: #1e3a8a;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-header .eui-chat-header-title {
    background: #11182f;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-header .eui-chat-header-title .eui-chat-title-text {
    color: #f1f5f9;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-header .eui-chat-header-title .eui-chat-subtitle-text {
    color: #93c5fd;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-header .eui-chat-header-controls {
    background: #11182f;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
    color: #64748b;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
    background: #1e3a8a;
    color: #f1f5f9;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-body {
    background: #0a1325;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-body::-webkit-scrollbar-thumb {
    background: #1e3a8a;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: #2563eb;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-msg .eui-chat-msg-avatar {
    background: rgba(29, 78, 216, 0.25);
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-msg .eui-chat-msg-avatar svg {
    color: #93c5fd;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-msg .eui-chat-msg-time {
    color: #475569;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: #11182f;
    color: #f1f5f9;
    border-color: #1e3a8a;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-composer {
    background: #11182f;
    border-top-color: #1e3a8a;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-composer textarea {
    background: #11182f;
    color: #f1f5f9;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-composer textarea::placeholder {
    color: #475569;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-disclaimer {
    background: #11182f;
    color: #475569;
    border-top-color: #1e3a8a;
}

.eui-chat-mode-dark.eui-chat-theme-prism .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    background: #11182f;
    color: #93c5fd;
    border-color: #1e3a8a;
}

/* ============================================================
   THEME: AURORA (Floating Composer / Gradient Body)
   Soft emerald-teal palette. Header is minimal and transparent,
   blending into a gradient mesh body. Bot bubbles are translucent
   glass cards. Composer is a floating detached pill bar that sits
   above the bottom edge — not flush to the window.
   ============================================================ */

.eui-chat-theme-aurora .eui-chat-container,
.eui-chat-theme-aurora.eui-chat-container {
    max-height: 100%;
    max-width: 100%;
    padding: 5px;
    z-index: 10009;
    font-family: 'Inter', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.eui-chat-theme-aurora .eui-chat-container *,
.eui-chat-theme-aurora.eui-chat-container * {
    box-sizing: border-box;
}

.eui-chat-theme-aurora .eui-chat-window {
    border-radius: 20px;
    flex-grow: 1;
    display: flex;
    box-shadow:
        0 8px 32px rgba(5, 150, 105, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.08);
    flex-direction: column;
    z-index: 10010;
    overflow: hidden;
    max-height: 100%;
    background: linear-gradient(150deg, #ecfdf5 0%, #d1fae5 30%, #e0f2fe 70%, #f0fdf4 100%);
}

.eui-chat-theme-aurora .eui-chat-window.eui-chat-no-shadow {
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* --- Header: transparent strip, blends into gradient body --- */

.eui-chat-theme-aurora .eui-chat-header {
    display: flex;
    align-items: center;
    padding: 14px 14px 10px;
    gap: 10px;
    flex-shrink: 0;
    background: transparent;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    position: relative;
}

.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.25);
    backdrop-filter: blur(8px);
}

.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-icon img {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    object-fit: cover;
}

.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-icon svg {
    color: #059669;
    width: 18px;
    height: 18px;
}

.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-logo {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-logo img {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: cover;
}

.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-title {
    flex-grow: 1;
    overflow: hidden;
}

.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-title .eui-chat-title-text {
    font-size: 14px;
    font-weight: 700;
    color: #064e3b;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-title .eui-chat-subtitle-text {
    font-size: 11px;
    color: #059669;
    display: block;
    margin-top: 1px;
    font-weight: 500;
}

.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6ee7b7;
    border-radius: 8px;
    font-size: 16px;
    transition:
        background 0.15s,
        color 0.15s;
}

.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
    background: rgba(16, 185, 129, 0.12);
    color: #064e3b;
}

/* --- Body: gradient mesh, extra bottom padding for floating composer --- */

.eui-chat-theme-aurora .eui-chat-body {
    flex-grow: 1;
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 0 16px;
}

.eui-chat-theme-aurora .eui-chat-body::-webkit-scrollbar {
    width: 4px;
}

.eui-chat-theme-aurora .eui-chat-body::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 4px;
}

.eui-chat-theme-aurora .eui-chat-body:hover::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.5);
}

/* --- Messages --- */

.eui-chat-theme-aurora .eui-chat-msg {
    width: 100%;
    max-width: 100%;
    margin: 0 0 8px 0;
    padding: 0;
}

.eui-chat-theme-aurora .eui-chat-msg.eui-chat-msg-system {
    display: flex;
    align-items: flex-start;
    padding-left: 12px;
}

.eui-chat-theme-aurora .eui-chat-msg .eui-chat-msg-avatar {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    margin-right: 6px;
    margin-top: 2px;
}

.eui-chat-theme-aurora .eui-chat-msg .eui-chat-msg-avatar svg {
    width: 13px;
    height: 13px;
    color: #059669;
}

.eui-chat-theme-aurora .eui-chat-msg .eui-chat-msg-body {
    flex: 1;
    min-width: 0;
}

.eui-chat-theme-aurora .eui-chat-msg .eui-chat-msg-time {
    font-size: 10px;
    color: #6ee7b7;
    margin-top: 3px;
}

/* Bot bubble: translucent glass card */

.eui-chat-theme-aurora .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 4px 16px 16px 16px;
    padding: 9px 13px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #064e3b;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.1);
}

/* User bubble */

.eui-chat-theme-aurora .eui-chat-msg.eui-chat-msg-user {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    max-width: 78%;
    margin-left: auto;
    gap: 6px;
}

.eui-chat-theme-aurora .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.eui-chat-theme-aurora .eui-chat-msg.eui-chat-msg-user .eui-chat-msg-content {
    display: inline-block;
    background: #059669;
    color: #ecfdf5;
    border-radius: 16px 4px 16px 16px;
    padding: 9px 13px;
    font-size: 13.5px;
    line-height: 1.55;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.3);
}

/* --- Composer: floating detached pill bar --- */

.eui-chat-theme-aurora .eui-chat-composer {
    background: transparent;
    display: flex;
    flex-shrink: 0;
    padding: 0 10px 12px;
    align-items: flex-end;
    gap: 8px;
}

.eui-chat-theme-aurora .eui-chat-composer textarea {
    flex-grow: 1;
    padding: 10px 16px;
    font-size: 13.5px;
    border: 1.5px solid rgba(16, 185, 129, 0.35);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.75);
    color: #064e3b;
    font-family: inherit;
    outline: none;
    resize: none;
    min-height: 42px;
    max-height: 100px;
    overflow-y: auto;
    line-height: 1.4;
    backdrop-filter: blur(8px);
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
    box-shadow: 0 2px 12px rgba(5, 150, 105, 0.12);
}

.eui-chat-theme-aurora .eui-chat-composer textarea:focus {
    border-color: #059669;
    box-shadow:
        0 0 0 3px rgba(5, 150, 105, 0.12),
        0 2px 12px rgba(5, 150, 105, 0.12);
}

.eui-chat-theme-aurora .eui-chat-composer textarea::placeholder {
    color: #6ee7b7;
}

.eui-chat-theme-aurora .eui-chat-composer .eui-chat-action-btns {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 1px;
}

.eui-chat-theme-aurora .eui-chat-composer div.eui-chat-send-btn,
.eui-chat-theme-aurora .eui-chat-composer .eui-chat-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--euic-primary, #059669);
    color: var(--euic-font, #ecfdf5);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition:
        background 0.15s,
        transform 0.12s;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.3);
}

.eui-chat-theme-aurora .eui-chat-composer div.eui-chat-send-btn:hover,
.eui-chat-theme-aurora .eui-chat-composer .eui-chat-send-btn:hover {
    background: var(--euic-primary, #047857);
    transform: scale(1.05);
}

/* --- Disclaimer --- */

.eui-chat-theme-aurora .eui-chat-disclaimer {
    font-size: 10px;
    padding: 2px 8px 4px;
    background: transparent;
    color: #6ee7b7;
    text-align: center;
}

.eui-chat-theme-aurora .eui-chat-disclaimer span {
    display: block;
    text-align: center;
}

/* --- Options --- */

.eui-chat-theme-aurora .eui-chat-opts-wrap {
    margin-top: 6px;
    margin-left: 12px;
    width: calc(100% - 40px);
}

.eui-chat-theme-aurora .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    padding: 5px 14px;
    border: 1.5px solid rgba(16, 185, 129, 0.4);
    border-radius: 24px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.65);
    color: #059669;
    font-size: 13px;
    font-weight: 500;
    min-height: 32px;
    backdrop-filter: blur(4px);
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s;
}

.eui-chat-theme-aurora .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item:hover {
    background: #059669;
    color: #fff;
    border-color: #059669;
}

/* --- Launcher --- */

.eui-chat-theme-aurora .eui-chat-launcher.eui-chat-icon-btn {
    background: linear-gradient(to right, var(--euic-primary, #059669), var(--euic-primary, #047857));
    color: var(--euic-font, #ecfdf5);
    border-color: var(--euic-primary, #059669);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
    border-radius: 50%;
}

.eui-chat-theme-aurora .eui-chat-launcher.eui-chat-expand .eui-chat-expand-text {
    background-image: linear-gradient(90deg, var(--euic-primary, #059669), var(--euic-primary, #047857));
}

.eui-chat-theme-aurora .eui-chat-launcher.eui-chat-expand .eui-chat-expand-icon-wrap {
    background-color: var(--euic-primary, #059669);
}

.eui-chat-theme-aurora .eui-chat-launcher.eui-chat-spark .eui-chat-spark-inner {
    background: linear-gradient(135deg, var(--euic-primary, #059669), var(--euic-secondary, var(--euic-primary, #059669)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-aurora .eui-chat-launcher.eui-chat-spark {
    background: linear-gradient(135deg, var(--euic-primary, #059669), var(--euic-secondary, var(--euic-primary, #059669)));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.eui-chat-theme-aurora .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-core {
    background: linear-gradient(135deg, var(--euic-primary, #059669), var(--euic-primary, #059669));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-aurora .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-ring {
    border-color: var(--euic-primary, #059669);
}

.eui-chat-theme-aurora .eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-dot {
    background: var(--euic-font, #ffffff);
}

.eui-chat-theme-aurora .eui-chat-launcher.eui-chat-morph {
    background: linear-gradient(135deg, var(--euic-primary, #059669), var(--euic-secondary, var(--euic-primary, #059669)));
    color: var(--euic-font, #ffffff);
}

.eui-chat-theme-aurora .eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-track {
    background: linear-gradient(135deg, var(--euic-primary, #059669), var(--euic-secondary, var(--euic-primary, #059669)));
    color: var(--euic-font, #ffffff);
}

/* === DARK MODE OVERRIDES === */

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-window {
    background: linear-gradient(150deg, #022c22 0%, #064e3b 30%, #0c4a6e 70%, #022c22 100%);
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-header {
    border-bottom-color: rgba(16, 185, 129, 0.3);
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-icon {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.35);
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-icon svg {
    color: #6ee7b7;
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-title .eui-chat-title-text {
    color: #ecfdf5;
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-title .eui-chat-subtitle-text {
    color: #6ee7b7;
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn {
    color: rgba(110, 231, 183, 0.7);
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-header .eui-chat-header-controls .eui-chat-ctrl-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    color: #ecfdf5;
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-msg .eui-chat-msg-avatar {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.35);
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-msg .eui-chat-msg-avatar svg {
    color: #6ee7b7;
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-msg .eui-chat-msg-time {
    color: rgba(110, 231, 183, 0.7);
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-msg.eui-chat-msg-system .eui-chat-msg-content {
    background: rgba(16, 185, 129, 0.12);
    color: #ecfdf5;
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-composer textarea {
    background: rgba(6, 78, 59, 0.6);
    color: #ecfdf5;
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-composer textarea::placeholder {
    color: rgba(110, 231, 183, 0.6);
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-disclaimer {
    color: rgba(110, 231, 183, 0.7);
}

.eui-chat-mode-dark.eui-chat-theme-aurora .eui-chat-opts-wrap .eui-chat-opts-list .eui-chat-opt-item {
    background: rgba(16, 185, 129, 0.14);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.45);
}
.eui-chat-launcher {
  position: fixed;
  z-index: 10009;
  cursor: pointer;
  user-select: none;
  --euic-launcher-bg: #6366f1;
  --euic-launcher-bg2: #8b5cf6;
  --euic-launcher-fg: #ffffff;
}
.eui-chat-launcher.eui-chat-pos-right {
  right: 16px;
  bottom: 16px;
}
.eui-chat-launcher.eui-chat-pos-left {
  left: 16px;
  bottom: 16px;
}
.eui-chat-launcher .eui-chat-launcher-tooltip {
  position: absolute;
  background: var(--euic-launcher-bg);
  color: var(--euic-launcher-fg);
  padding: 8px 12px 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  max-width: 220px;
  bottom: calc(100% + 8px);
  display: flex;
  align-items: center;
  gap: 8px;
}
.eui-chat-launcher .eui-chat-launcher-tooltip::after {
  content: "";
  position: absolute;
  bottom: -6px;
  border: 6px solid transparent;
  border-top-color: var(--euic-launcher-bg);
}
.eui-chat-launcher .eui-chat-launcher-tooltip.eui-chat-tip-right {
  right: 0;
}
.eui-chat-launcher .eui-chat-launcher-tooltip.eui-chat-tip-right::after {
  right: 12px;
}
.eui-chat-launcher .eui-chat-launcher-tooltip.eui-chat-tip-left {
  left: 0;
}
.eui-chat-launcher .eui-chat-launcher-tooltip.eui-chat-tip-left::after {
  left: 12px;
}
.eui-chat-launcher .eui-chat-launcher-tooltip .eui-chat-launcher-tooltip-close {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  line-height: 1;
}
.eui-chat-launcher img.eui-chat-launcher-img,
.eui-chat-launcher img.eui-chat-launcher-svg {
  max-width: 56px;
  max-height: 56px;
  display: block;
}

/* ICON */
.eui-chat-launcher.eui-chat-icon-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--euic-launcher-bg), var(--euic-launcher-bg2));
  color: var(--euic-launcher-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease;
}
.eui-chat-launcher.eui-chat-icon-btn:hover {
  transform: scale(1.05);
}
.eui-chat-launcher.eui-chat-icon-btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}
.eui-chat-launcher.eui-chat-icon-btn svg {
  width: 28px;
  height: 28px;
}

/* MORPH */
.eui-chat-launcher.eui-chat-morph {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--euic-launcher-bg), var(--euic-launcher-bg2));
  color: var(--euic-launcher-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  position: fixed;
}
.eui-chat-launcher.eui-chat-morph .eui-chat-morph-glow {
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.45) 0%, transparent 60%);
  animation: euic-morph-glow 3s ease-in-out infinite;
}
.eui-chat-launcher.eui-chat-morph .eui-chat-morph-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  animation: euic-morph-shimmer 2.4s linear infinite;
}
.eui-chat-launcher.eui-chat-morph .eui-chat-morph-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.eui-chat-launcher.eui-chat-morph .eui-chat-morph-icon svg {
  width: 28px;
  height: 28px;
}

@keyframes euic-morph-glow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}
@keyframes euic-morph-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
/* BEACON */
.eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-track {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--euic-launcher-bg), var(--euic-launcher-bg2));
  color: var(--euic-launcher-fg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-icon svg {
  width: 22px;
  height: 22px;
}
.eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-label {
  font-size: 13px;
  font-weight: 600;
}
.eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-status {
  position: relative;
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
}
.eui-chat-launcher.eui-chat-beacon .eui-chat-beacon-wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #4ade80;
  animation: euic-beacon-wave 1.6s ease-out infinite;
}

@keyframes euic-beacon-wave {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}
/* PULSAR */
.eui-chat-launcher.eui-chat-pulsar {
  width: 60px;
  height: 60px;
  position: fixed;
}
.eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--euic-launcher-bg);
  animation: euic-pulsar-ring 2s ease-out infinite;
}
.eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-ring-2 {
  animation-delay: 0.6s;
}
.eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-ring-3 {
  animation-delay: 1.2s;
}
.eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-orbit {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  animation: euic-pulsar-orbit 5s linear infinite;
}
.eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-dot {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--euic-launcher-fg);
  border-radius: 50%;
}
.eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-core {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--euic-launcher-bg), var(--euic-launcher-bg2));
  color: var(--euic-launcher-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.eui-chat-launcher.eui-chat-pulsar .eui-chat-pulsar-core svg {
  width: 26px;
  height: 26px;
}

@keyframes euic-pulsar-ring {
  0% {
    transform: scale(0.85);
    opacity: 1;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}
@keyframes euic-pulsar-orbit {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}
/* SPARK */
@property --euic-spark-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.eui-chat-launcher.eui-chat-spark {
  border-radius: 40px;
  padding: 3px;
  background: linear-gradient(135deg, var(--euic-launcher-bg), var(--euic-launcher-bg2));
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: euic-spark-float 4s ease-in-out infinite;
}
.eui-chat-launcher.eui-chat-spark .eui-chat-spark-arc {
  position: absolute;
  inset: 0;
  border-radius: 40px;
  background: conic-gradient(from var(--euic-spark-angle, 0deg), transparent 0%, transparent 60%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0.4) 82%, transparent 90%);
  animation: euic-spark-rotate 2.4s linear infinite;
  pointer-events: none;
}
.eui-chat-launcher.eui-chat-spark .eui-chat-spark-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 8px;
  border-radius: 37px;
  overflow: hidden;
  transition: gap 0.22s ease;
  background: linear-gradient(135deg, var(--euic-launcher-bg), var(--euic-launcher-bg2));
  color: var(--euic-launcher-fg);
}
.eui-chat-launcher.eui-chat-spark .eui-chat-spark-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.2s ease;
}
.eui-chat-launcher.eui-chat-spark .eui-chat-spark-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.eui-chat-launcher.eui-chat-spark .eui-chat-spark-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  margin: auto;
}
.eui-chat-launcher.eui-chat-spark .eui-chat-spark-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.eui-chat-launcher.eui-chat-spark:hover {
  animation: none;
}
.eui-chat-launcher.eui-chat-spark:hover .eui-chat-spark-arc {
  animation-duration: 0.8s;
}
.eui-chat-launcher.eui-chat-spark:hover .eui-chat-spark-inner::after {
  background: rgba(255, 255, 255, 0.1);
}
.eui-chat-launcher.eui-chat-spark:hover .eui-chat-spark-icon {
  transform: scale(1.15) rotate(-10deg);
}
.eui-chat-launcher.eui-chat-spark:active {
  transform: scale(0.94);
  transition: transform 0.08s ease;
}

@keyframes euic-spark-float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-4px);
  }
}
@keyframes euic-spark-rotate {
  to {
    --euic-spark-angle: 360deg;
  }
}
/* EXPAND */
.eui-chat-launcher.eui-chat-expand {
  box-sizing: content-box;
  width: 235px;
  height: 60px;
}
.eui-chat-launcher.eui-chat-expand:hover .eui-chat-expand-text.eui-chat-expand-collapsed {
  animation-name: euic-button-expand;
  width: 100%;
}
.eui-chat-launcher.eui-chat-expand .eui-chat-expand-text {
  animation-duration: 2s;
  height: 50px;
  border-radius: 50px;
  position: relative;
  display: flex;
  padding: 5px 0;
  overflow: hidden;
  animation-name: euic-button-expand;
  background: linear-gradient(90deg, var(--euic-launcher-bg), var(--euic-launcher-bg2));
  color: var(--euic-launcher-fg);
  float: right;
  box-sizing: content-box;
  width: 100%;
}
.eui-chat-launcher.eui-chat-expand .eui-chat-expand-text.eui-chat-expand-collapsed {
  animation-name: euic-button-collapse;
  width: 60px;
}
.eui-chat-launcher.eui-chat-expand .eui-chat-expand-text .eui-chat-expand-label {
  font-size: 16px;
  padding-right: 60px;
  padding-left: 25px;
  max-height: 45px;
  margin: auto;
  box-sizing: content-box;
}
.eui-chat-launcher.eui-chat-expand .eui-chat-expand-text .eui-chat-expand-label p {
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: auto;
  color: inherit;
  max-width: 150px;
  letter-spacing: 0.5px;
  white-space: normal;
}
.eui-chat-launcher.eui-chat-expand .eui-chat-expand-icon-wrap {
  position: absolute;
  height: 50px;
  width: 50px;
  border-radius: 100%;
  padding: 5px;
  right: 0;
  bottom: 0;
  overflow: hidden;
  box-sizing: content-box;
  background: var(--euic-launcher-bg);
  color: var(--euic-launcher-fg);
}
.eui-chat-launcher.eui-chat-expand .eui-chat-expand-icon-wrap .eui-chat-expand-icon-inner {
  height: 100%;
  width: 100%;
  display: flex;
  background-color: inherit;
  border-radius: 50%;
  box-sizing: border-box;
  overflow: hidden;
}
.eui-chat-launcher.eui-chat-expand .eui-chat-expand-icon-wrap .eui-chat-expand-icon-inner img, .eui-chat-launcher.eui-chat-expand .eui-chat-expand-icon-wrap .eui-chat-expand-icon-inner svg {
  max-height: 40px;
  max-width: 40px;
  width: auto;
  height: auto;
  margin: auto;
  vertical-align: middle;
}

@keyframes euic-button-expand {
  0% {
    width: 60px;
  }
  to {
    width: 100%;
  }
}
@keyframes euic-button-collapse {
  0% {
    width: 100%;
  }
  to {
    width: 60px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .eui-chat-launcher [class*=-arc],
  .eui-chat-launcher [class*=-glow],
  .eui-chat-launcher [class*=-ring],
  .eui-chat-launcher [class*=-shimmer],
  .eui-chat-launcher [class*=-orbit],
  .eui-chat-launcher [class*=-wave] {
    animation: none !important;
  }
}.eui-chat-conversations {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 400px;
  background: var(--euic-bg, #fff);
  color: var(--euic-text, #1e293b);
}
.eui-chat-conversations > .eui-splitter {
  flex: 1;
  width: 100%;
  height: 100%;
}

.eui-chat-conv-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-right: 1px solid var(--euic-border, #e2e8f0);
  background: var(--euic-bg-subtle, #f8fafc);
}

.eui-chat-conv-sidebar-title {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--euic-border, #e2e8f0);
  color: var(--euic-text, #1e293b);
}

.eui-chat-conv-search {
  padding: 8px;
  border-bottom: 1px solid var(--euic-border, #e2e8f0);
}

.eui-chat-conv-list {
  flex: 1;
  overflow-y: auto;
}
.eui-chat-conv-list::-webkit-scrollbar {
  width: 6px;
}
.eui-chat-conv-list::-webkit-scrollbar-thumb {
  background: var(--euic-border, #e2e8f0);
  border-radius: 4px;
}

.eui-chat-conv-empty {
  padding: 16px;
  text-align: center;
  color: var(--euic-text-muted, #64748b);
  font-size: 13px;
}

.eui-chat-conv-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid var(--euic-border-subtle, #eef2f6);
  transition: background 0.15s;
}
.eui-chat-conv-item:hover {
  background: var(--euic-bg, #fff);
}
.eui-chat-conv-item.eui-chat-conv-active {
  background: var(--euic-primary, #2563eb);
  color: var(--euic-font, #fff);
}
.eui-chat-conv-item.eui-chat-conv-active .eui-chat-conv-subtitle,
.eui-chat-conv-item.eui-chat-conv-active .eui-chat-conv-last,
.eui-chat-conv-item.eui-chat-conv-active .eui-chat-conv-time {
  color: rgba(255, 255, 255, 0.85);
}
.eui-chat-conv-item.eui-chat-conv-active .eui-chat-conv-avatar {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.eui-chat-conv-item.eui-chat-conv-archived {
  opacity: 0.65;
}

.eui-chat-conv-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--euic-bg, #fff);
  color: var(--euic-text-muted, #64748b);
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  border: 1px solid var(--euic-border-subtle, #eef2f6);
}
.eui-chat-conv-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eui-chat-conv-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.eui-chat-conv-row1 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}
.eui-chat-conv-row1 .eui-chat-conv-title {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
}
.eui-chat-conv-row1 .eui-chat-conv-time {
  font-size: 11px;
  color: var(--euic-text-muted, #64748b);
  flex-shrink: 0;
}

.eui-chat-conv-subtitle {
  font-size: 11px;
  color: var(--euic-text-muted, #64748b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eui-chat-conv-row3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  min-height: 18px;
}
.eui-chat-conv-row3 .eui-chat-conv-last {
  font-size: 12px;
  color: var(--euic-text-muted, #64748b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.eui-chat-conv-row3 .eui-chat-conv-trail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.eui-chat-conv-row3 .eui-chat-conv-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--euic-bg-subtle, #f1f5f9);
  color: var(--euic-text, #1e293b);
  font-weight: 600;
}
.eui-chat-conv-row3 .eui-chat-conv-unread {
  font-size: 11px;
  font-weight: 700;
  background: #ef4444;
  color: #fff;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.eui-chat-conv-detail {
  width: 100%;
  height: 100%;
  overflow: auto;
  background: var(--euic-bg, #fff);
}

body.mode-dark .eui-chat-conversations {
  background: #0f172a;
  color: #e2e8f0;
}

body.mode-dark .eui-chat-conv-sidebar {
  background: #11182a;
  border-right-color: #1e293b;
}

body.mode-dark .eui-chat-conv-sidebar-title {
  color: #e2e8f0;
  border-bottom-color: #1e293b;
}

body.mode-dark .eui-chat-conv-search {
  border-bottom-color: #1e293b;
}

body.mode-dark .eui-chat-conv-list::-webkit-scrollbar-thumb {
  background: #334155;
}

body.mode-dark .eui-chat-conv-empty {
  color: #94a3b8;
}

body.mode-dark .eui-chat-conv-item {
  border-bottom-color: #1e293b;
  color: #e2e8f0;
}
body.mode-dark .eui-chat-conv-item:hover {
  background: #1e293b;
}
body.mode-dark .eui-chat-conv-item.eui-chat-conv-active {
  background: #2563eb;
  color: #fff;
}

body.mode-dark .eui-chat-conv-avatar {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}

body.mode-dark .eui-chat-conv-row1 .eui-chat-conv-time,
body.mode-dark .eui-chat-conv-subtitle,
body.mode-dark .eui-chat-conv-row3 .eui-chat-conv-last {
  color: #94a3b8;
}

body.mode-dark .eui-chat-conv-item.eui-chat-conv-active .eui-chat-conv-time,
body.mode-dark .eui-chat-conv-item.eui-chat-conv-active .eui-chat-conv-subtitle,
body.mode-dark .eui-chat-conv-item.eui-chat-conv-active .eui-chat-conv-last {
  color: rgba(255, 255, 255, 0.85);
}

body.mode-dark .eui-chat-conv-row3 .eui-chat-conv-badge {
  background: #1e293b;
  color: #e2e8f0;
}

body.mode-dark .eui-chat-conv-detail {
  background: #0f172a;
}