/**
 * LH Chatbot Widget - Dark Theme Stylesheet
 * Scoped and isolated under #chat-web-widget-root to prevent WordPress theme style bleeding.
 */

/* ==========================================================================
   CSS SHIELD & RESET: Prevent WordPress Theme Inheritance / Bleed
   ========================================================================== */
#chat-web-widget-root,
#chat-web-widget-root * {
  box-sizing: border-box !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#chat-web-widget-root button,
#chat-web-widget-root input,
#chat-web-widget-root textarea,
#chat-web-widget-root a,
#chat-web-widget-root p,
#chat-web-widget-root span,
#chat-web-widget-root div,
#chat-web-widget-root h1,
#chat-web-widget-root h2,
#chat-web-widget-root h3,
#chat-web-widget-root h4,
#chat-web-widget-root ul,
#chat-web-widget-root ol,
#chat-web-widget-root li {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  letter-spacing: normal;
  text-transform: none !important;
  text-shadow: none !important;
}

#chat-web-widget-root button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  line-height: normal;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: none;
  text-decoration: none;
}

#chat-web-widget-root textarea {
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  line-height: inherit;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: none;
}

#chat-web-widget-root svg {
  display: inline-block;
  vertical-align: middle;
  max-width: none !important;
  max-height: none !important;
  box-sizing: content-box;
}

#chat-web-widget-root ul,
#chat-web-widget-root ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

#chat-web-widget-root p {
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   WIDGET ROOT CONTAINER
   ========================================================================== */
#chat-web-widget-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
}

/* ==========================================================================
   FLOATING LAUNCHER / CLOSE BUTTON
   ========================================================================== */
#chat-web-widget-root #chat-web-widget-launcher {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  min-height: 56px !important;
  border-radius: 50% !important;
  background: #14151a !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, box-shadow 0.2s ease !important;
  outline: none !important;
  z-index: 10;
}

#chat-web-widget-root #chat-web-widget-launcher:hover {
  transform: scale(1.06) !important;
  background: #1b1d24 !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65) !important;
}

#chat-web-widget-root #chat-web-widget-launcher .launcher-icon-close {
  display: none !important;
}

#chat-web-widget-root.chat-widget-open #chat-web-widget-launcher .launcher-icon-chat {
  display: none !important;
}

#chat-web-widget-root.chat-widget-open #chat-web-widget-launcher .launcher-icon-close {
  display: block !important;
}

/* ==========================================================================
   CHAT WIDGET WINDOW CONTAINER
   ========================================================================== */
#chat-web-widget-root #chat-web-widget-container {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 380px !important;
  max-width: calc(100vw - 32px) !important;
  background-color: #000000 !important;
  border-radius: 28px !important;
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transform-origin: bottom right;
}

#chat-web-widget-root #chat-web-widget-container.chat-widget-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(20px) scale(0.92) !important;
}

/* Common View Styles */
#chat-web-widget-root .chat-widget-view {
  display: none !important;
  width: 100% !important;
}

#chat-web-widget-root .chat-widget-view.active {
  display: flex !important;
  flex-direction: column !important;
}

/* ==========================================================================
   VIEW 1: STARTER CARD
   ========================================================================== */
#chat-web-widget-root #chat-widget-starter-view {
  padding: 22px 24px 8px 24px !important;
}

#chat-web-widget-root .starter-card-content {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

#chat-web-widget-root .starter-headline {
  font-size: 21px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  text-align: center !important;
  line-height: 1.35 !important;
  margin: 0 0 26px 0 !important;
  padding: 0 6px !important;
  letter-spacing: -0.015em !important;
  border: none !important;
}

#chat-web-widget-root .starter-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin-bottom: 8px !important;
  padding: 0 !important;
}

#chat-web-widget-root .starter-action-btn {
  width: 100% !important;
  border-radius: 9999px !important;
  background-color: #3553FD !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 15px 24px !important;
  border: none !important;
  cursor: pointer !important;
  text-align: center !important;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease !important;
  outline: none !important;
  letter-spacing: -0.01em !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  text-decoration: none !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}

#chat-web-widget-root .starter-action-btn:hover {
  background-color: #4865ff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 24px rgba(53, 83, 253, 0.4) !important;
  color: #ffffff !important;
}

#chat-web-widget-root .starter-action-btn:active {
  transform: scale(0.98) !important;
}

/* ==========================================================================
   VIEW 2: ACTIVE CONVERSATION
   ========================================================================== */
#chat-web-widget-root #chat-widget-conversation-view {
  flex: 1 !important;
  min-height: 400px !important;
  max-height: 520px !important;
}

#chat-web-widget-root .chat-conversation-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 18px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

#chat-web-widget-root .chat-header-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #d1d5db !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 6px 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  outline: none !important;
  margin: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  line-height: normal !important;
}

#chat-web-widget-root .chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}

#chat-web-widget-root .chat-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

#chat-web-widget-root .chat-header-close-btn {
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

#chat-web-widget-root .starter-card-header {
  display: none !important;
}

#chat-web-widget-root .chat-header-info {
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

#chat-web-widget-root .chat-header-title {
  font-weight: 700 !important;
  font-size: 15px !important;
  color: #ffffff !important;
  line-height: 1.2 !important;
}

#chat-web-widget-root .chat-header-status {
  font-size: 11.5px !important;
  color: #9ca3af !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin-top: 2px !important;
}

#chat-web-widget-root .status-dot {
  width: 7px !important;
  height: 7px !important;
  background-color: #22c55e !important;
  border-radius: 50% !important;
  display: inline-block !important;
}

/* ==========================================================================
   INTERNAL REPORT & HISTORY BAR
   ========================================================================== */
#chat-web-widget-root #chat-report-bar {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  width: 100% !important;
  background-color: #3553FD !important;
  color: #ffffff !important;
  padding: 7px 16px !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease, opacity 0.2s ease !important;
  outline: none !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(53, 83, 253, 0.25) !important;
  z-index: 5 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#chat-web-widget-root #chat-report-bar:hover {
  background-color: #4865ff !important;
}

#chat-web-widget-root #chat-report-bar:active {
  background-color: #2b47e0 !important;
}

#chat-web-widget-root .chat-report-bar-content {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em !important;
}

#chat-web-widget-root .chat-report-text {
  color: #ffffff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#chat-web-widget-root .chat-report-session-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  position: relative !important;
  max-width: 100% !important;
}

#chat-web-widget-root .chat-report-session-id {
  font-size: 11px !important;
  line-height: 1.2 !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.85) !important;
  letter-spacing: 0.01em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: center !important;
  cursor: pointer !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

#chat-web-widget-root .chat-report-copy-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 4px !important;
  color: rgba(255, 255, 255, 0.85) !important;
  cursor: pointer !important;
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease !important;
  flex-shrink: 0 !important;
  outline: none !important;
  line-height: 1 !important;
}

#chat-web-widget-root .chat-report-copy-btn:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
}

#chat-web-widget-root .chat-report-copy-btn:active {
  transform: scale(0.9) !important;
}

#chat-web-widget-root .chat-copy-icon {
  width: 12px !important;
  height: 12px !important;
  stroke: currentColor !important;
  display: inline-block !important;
}

#chat-web-widget-root .chat-copied-icon {
  width: 12px !important;
  height: 12px !important;
  stroke: #4ade80 !important;
}

#chat-web-widget-root .chat-copy-tooltip {
  position: absolute !important;
  bottom: calc(100% + 4px) !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(4px) !important;
  background-color: rgba(15, 23, 42, 0.95) !important;
  color: #ffffff !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
  white-space: nowrap !important;
  z-index: 20 !important;
}

#chat-web-widget-root .chat-copy-tooltip.show {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
}

#chat-web-widget-root .chat-report-icon {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
  stroke: #ffffff !important;
  opacity: 0.95 !important;
}

#chat-web-widget-root .chat-report-arrow {
  width: 12px !important;
  height: 12px !important;
  flex-shrink: 0 !important;
  stroke: #ffffff !important;
  opacity: 0.8 !important;
  transition: transform 0.15s ease, opacity 0.15s ease !important;
}

#chat-web-widget-root #chat-report-bar:hover .chat-report-arrow {
  opacity: 1 !important;
  transform: translate(1px, -1px) !important;
}

/* ==========================================================================
   MESSAGES AREA & BUBBLES
   ========================================================================== */
#chat-web-widget-root .chat-messages-area {
  position: relative !important;
  flex: 1 !important;
  padding: 18px 16px !important;
  overflow-y: auto !important;
  overflow-anchor: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent !important;
}

#chat-web-widget-root .chat-messages-area::-webkit-scrollbar {
  width: 6px !important;
}

#chat-web-widget-root .chat-messages-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 10px !important;
}

#chat-web-widget-root .chat-message {
  display: flex !important;
  flex-direction: column !important;
  max-width: 86% !important;
}

#chat-web-widget-root .chat-message.assistant {
  align-self: flex-start !important;
}

#chat-web-widget-root .chat-message.user {
  align-self: flex-end !important;
}

#chat-web-widget-root .chat-message .message-content {
  padding: 13px 18px !important;
  font-size: 14.5px !important;
  line-height: 1.55 !important;
  word-break: break-word !important;
}

#chat-web-widget-root .chat-message.assistant .message-content {
  background: #18191f !important;
  color: #f3f4f6 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px 20px 20px 6px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

#chat-web-widget-root .chat-message.user .message-content {
  background: #3553FD !important;
  color: #ffffff !important;
  border-radius: 20px 20px 6px 20px !important;
  box-shadow: 0 4px 14px rgba(53, 83, 253, 0.25) !important;
  border: none !important;
}

/* Markdown and Typography Formatting inside messages */
#chat-web-widget-root .chat-message .message-content p {
  margin: 0 0 10px 0 !important;
  line-height: 1.55 !important;
  color: inherit !important;
}

#chat-web-widget-root .chat-message .message-content p:last-child {
  margin-bottom: 0 !important;
}

#chat-web-widget-root .chat-message .message-content ul,
#chat-web-widget-root .chat-message .message-content ol {
  margin: 8px 0 10px 0 !important;
  padding-left: 20px !important;
  list-style-position: outside !important;
}

#chat-web-widget-root .chat-message .message-content ul:last-child,
#chat-web-widget-root .chat-message .message-content ol:last-child {
  margin-bottom: 0 !important;
}

#chat-web-widget-root .chat-message .message-content ul {
  list-style-type: disc !important;
}

#chat-web-widget-root .chat-message .message-content ol {
  list-style-type: decimal !important;
}

#chat-web-widget-root .chat-message .message-content li {
  margin: 4px 0 !important;
  line-height: 1.5 !important;
  color: inherit !important;
}

#chat-web-widget-root .chat-message .message-content strong,
#chat-web-widget-root .chat-message .message-content b {
  font-weight: 600 !important;
  color: inherit !important;
}

#chat-web-widget-root .chat-message.assistant .message-content strong,
#chat-web-widget-root .chat-message.assistant .message-content b {
  color: #ffffff !important;
}

#chat-web-widget-root .chat-message .message-content em,
#chat-web-widget-root .chat-message .message-content i {
  font-style: italic !important;
}

#chat-web-widget-root .chat-message .message-content h1,
#chat-web-widget-root .chat-message .message-content h2,
#chat-web-widget-root .chat-message .message-content h3,
#chat-web-widget-root .chat-message .message-content h4 {
  margin: 12px 0 6px 0 !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #ffffff !important;
  border: none !important;
}

#chat-web-widget-root .chat-message .message-content h1:first-child,
#chat-web-widget-root .chat-message .message-content h2:first-child,
#chat-web-widget-root .chat-message .message-content h3:first-child,
#chat-web-widget-root .chat-message .message-content h4:first-child {
  margin-top: 0 !important;
}

#chat-web-widget-root .chat-message .message-content h1 {
  font-size: 17px !important;
}

#chat-web-widget-root .chat-message .message-content h2 {
  font-size: 16px !important;
}

#chat-web-widget-root .chat-message .message-content h3 {
  font-size: 15px !important;
}

#chat-web-widget-root .chat-message .message-content h4 {
  font-size: 14.5px !important;
}

#chat-web-widget-root .chat-message .message-content a {
  color: #60a5fa !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
  word-break: break-all !important;
  transition: color 0.15s ease !important;
}

#chat-web-widget-root .chat-message .message-content a:hover {
  color: #93c5fd !important;
}

#chat-web-widget-root .chat-message.user .message-content a {
  color: #ffffff !important;
}

#chat-web-widget-root .chat-message.user .message-content a:hover {
  color: #e0e7ff !important;
}

#chat-web-widget-root .chat-message .message-content code {
  background: rgba(255, 255, 255, 0.12) !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-size: 13px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  color: inherit !important;
  border: none !important;
}

#chat-web-widget-root .chat-message .message-content pre {
  background: rgba(0, 0, 0, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  overflow-x: auto !important;
  margin: 10px 0 !important;
}

#chat-web-widget-root .chat-message .message-content pre code {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: #e2e8f0 !important;
  font-size: 13px !important;
}

#chat-web-widget-root .chat-message .message-content blockquote {
  margin: 10px 0 !important;
  padding: 6px 12px !important;
  border-left: 3px solid #3553FD !important;
  color: #9ca3af !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border-radius: 0 6px 6px 0 !important;
}

#chat-web-widget-root .chat-message .message-content hr {
  border: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  margin: 12px 0 !important;
}

/* ==========================================================================
   PROMPT OPTIONS & BUTTONS
   ========================================================================== */
#chat-web-widget-root .prompt-options {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-top: 10px !important;
  padding: 0 !important;
}

#chat-web-widget-root .prompt-options:empty {
  display: none !important;
  margin: 0 !important;
}

#chat-web-widget-root .option-button {
  background: rgba(53, 83, 253, 0.12) !important;
  border: 1px solid rgba(53, 83, 253, 0.4) !important;
  color: #93b4ff !important;
  border-radius: 14px !important;
  padding: 9px 14px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  outline: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  width: 100% !important;
  margin: 0 !important;
  box-shadow: none !important;
  line-height: normal !important;
}

#chat-web-widget-root .option-button:hover {
  background: #3553FD !important;
  color: #ffffff !important;
  border-color: #3553FD !important;
  transform: translateY(-1px) !important;
}

#chat-web-widget-root .option-button.link-option {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #d1d5db !important;
}

#chat-web-widget-root .option-button.link-option:hover {
  background: #3553FD !important;
  color: #ffffff !important;
  border-color: #3553FD !important;
}

#chat-web-widget-root .option-button .option-icon {
  font-size: 14px !important;
  margin-left: 8px !important;
  flex-shrink: 0 !important;
}

/* ==========================================================================
   TYPING INDICATOR ANIMATION
   ========================================================================== */
#chat-web-widget-root .typing-indicator {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 4px 6px !important;
}

#chat-web-widget-root .typing-indicator span {
  width: 7px !important;
  height: 7px !important;
  background-color: #9ca3af !important;
  border-radius: 50% !important;
  animation: typingBounce 1.3s infinite ease-in-out both !important;
}

#chat-web-widget-root .typing-indicator span:nth-child(2) {
  animation-delay: 0.18s !important;
}

#chat-web-widget-root .typing-indicator span:nth-child(3) {
  animation-delay: 0.36s !important;
}

@keyframes typingBounce {

  0%,
  80%,
  100% {
    transform: scale(0.65);
    opacity: 0.4;
  }

  40% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* ==========================================================================
   BOTTOM PANEL (SHARED INPUT BAR)
   ========================================================================== */
#chat-web-widget-root .chat-widget-bottom-panel {
  padding: 14px 20px 20px 20px !important;
  background: #000000 !important;
  border-top: none !important;
}

#chat-web-widget-root .chat-input-form {
  display: flex !important;
  align-items: flex-end !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#chat-web-widget-root .chat-widget-disclaimer {
  margin: 14px 0 0 0 !important;
  padding: 0 !important;
  color: #ffffff !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
  font-weight: 400 !important;
  text-align: left !important;
}

#chat-web-widget-root .chat-widget-disclaimer a {
  color: #4a9eff !important;
  text-decoration: none !important;
  /* Match surrounding disclaimer text; prevent theme link styles from enlarging */
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
}

#chat-web-widget-root .chat-widget-disclaimer a:hover,
#chat-web-widget-root .chat-widget-disclaimer a:focus-visible {
  text-decoration: underline !important;
}

#chat-web-widget-root.chat-widget-minimized .chat-widget-disclaimer {
  display: none !important;
}

#chat-web-widget-root .chat-input-box {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: flex-end !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 22px !important;
  padding: 2px 14px !important;
  margin: 0 !important;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-radius 0.2s ease !important;
}

#chat-web-widget-root .chat-input-box:focus-within {
  border-color: rgba(255, 255, 255, 0.38) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 0 0 2px rgba(53, 83, 253, 0.3) !important;
}

#chat-web-widget-root .chat-input-field {
  flex: 1 !important;
  min-width: 0 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #ffffff !important;
  font-size: 14.5px !important;
  line-height: 20px !important;
  font-family: inherit !important;
  resize: none !important;
  padding: 8px 0 !important;
  margin: 0 !important;
  height: 36px;
  /* no !important: JS sets inline height to auto-grow up to 5 lines */
  min-height: 36px !important;
  max-height: 116px !important;
  /* 5 lines: (20px * 5) + 16px padding = 116px */
  overflow-y: hidden !important;
  word-wrap: break-word !important;
  white-space: pre-wrap !important;
  box-shadow: none !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent !important;
}

/* Multiline (expanded) state: scrollable and user-resizable vertically */
#chat-web-widget-root .chat-input-field.is-expanded {
  resize: vertical !important;
  overflow-y: auto !important;
  max-height: 240px !important;
  /* manual drag-resize limit (~11 lines) */
}

#chat-web-widget-root .chat-input-box.is-expanded {
  border-radius: 18px !important;
}

#chat-web-widget-root .chat-input-field::-webkit-scrollbar {
  width: 4px !important;
}

#chat-web-widget-root .chat-input-field::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25) !important;
  border-radius: 4px !important;
}

#chat-web-widget-root .chat-input-field::placeholder {
  color: #71717a !important;
  opacity: 1 !important;
  font-size: 13.5px !important;
  text-overflow: ellipsis !important;
}

#chat-web-widget-root .chat-send-circle-btn {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #8e8e93 !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: not-allowed !important;
  transition: all 0.2s ease !important;
  outline: none !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

#chat-web-widget-root .chat-send-circle-btn.can-send,
#chat-web-widget-root .chat-send-circle-btn:not(:disabled) {
  background: #3553FD !important;
  color: #ffffff !important;
  cursor: pointer !important;
}

#chat-web-widget-root .chat-send-circle-btn.can-send:hover,
#chat-web-widget-root .chat-send-circle-btn:not(:disabled):hover {
  background: #4865ff !important;
  transform: scale(1.05) !important;
}

#chat-web-widget-root .chat-send-circle-btn:active {
  transform: scale(0.95) !important;
}

/* ==========================================================================
   MOBILE RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
  #chat-web-widget-root {
    bottom: 16px;
    right: 16px;
  }

  /* 1. Before chatbox is opened: keep float button visible */
  #chat-web-widget-root:not(.chat-widget-open) {
    top: auto !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
  }

  #chat-web-widget-root:not(.chat-widget-open) #chat-web-widget-launcher {
    display: flex !important;
  }

  #chat-web-widget-root:not(.chat-widget-open) #chat-web-widget-container {
    display: none !important;
  }

  /* 2. When chatbox is opened: hide float button, expand container to full height and width */
  #chat-web-widget-root.chat-widget-open {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    z-index: 9990 !important;
  }

  /* Hide Elementor header when widget is opened in mobile view */
  html body:has(#chat-web-widget-root.chat-widget-open) .elementor-location-header,
  html body.chat-widget-open .elementor-location-header {
    display: none !important;
  }

  #chat-web-widget-root.chat-widget-open #chat-web-widget-launcher {
    display: none !important;
  }

  #chat-web-widget-root.chat-widget-open #chat-web-widget-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    max-width: 100% !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Show close button on right of New Chat */
  #chat-web-widget-root .chat-header-close-btn {
    display: inline-flex !important;
  }

  /* Starter View on mobile */
  #chat-web-widget-root .starter-card-header {
    display: flex !important;
    justify-content: flex-end !important;
    width: 100% !important;
    padding: 0 4px !important;
    margin-bottom: 8px !important;
    flex-shrink: 0 !important;
  }

  #chat-web-widget-root #chat-widget-starter-view {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 16px 20px !important;
  }

  #chat-web-widget-root #chat-widget-starter-view.active {
    display: flex !important;
    flex-direction: column !important;
  }

  #chat-web-widget-root .starter-card-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  #chat-web-widget-root .starter-headline {
    font-size: 20px !important;
    margin-bottom: 24px !important;
  }

  #chat-web-widget-root .starter-action-btn {
    font-size: 15px !important;
    padding: 14px 20px !important;
  }

  /* Conversation View on mobile */
  #chat-web-widget-root #chat-widget-conversation-view {
    flex: 1 !important;
    min-height: 0 !important;
    max-height: none !important;
    height: 100% !important;
  }

  #chat-web-widget-root #chat-widget-conversation-view.active {
    display: flex !important;
    flex-direction: column !important;
  }

  #chat-web-widget-root .chat-conversation-header {
    padding-top: 14px !important;
    padding-top: max(14px, env(safe-area-inset-top)) !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    padding-bottom: 14px !important;
    flex-shrink: 0 !important;
  }

  #chat-web-widget-root .chat-messages-area {
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 16px !important;
  }

  /* Bottom Panel on mobile */
  #chat-web-widget-root .chat-widget-bottom-panel {
    padding-top: 12px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    padding-bottom: 16px !important;
    padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
    flex-shrink: 0 !important;
  }

  #chat-web-widget-root .chat-input-box {
    overflow: hidden !important;
  }

  #chat-web-widget-root .chat-input-field {
    font-size: 16px !important;
    /* 16px prevents mobile Safari/Chrome auto-zoom on focus */
    transform: scale(0.90625) !important;
    /* 16px * 0.90625 = 14.5px visual font size */
    transform-origin: top left !important;
    width: 110.34% !important;
    /* 100% / 0.90625 to fill the container accurately */
    max-width: 110.34% !important;
  }
}

/* ==========================================================================
   MINIMIZED STATE: window collapsed to the input box only
   (Placed after the mobile block so it overrides the mobile "hidden" rules)
   ========================================================================== */
#chat-web-widget-root.chat-widget-minimized #chat-web-widget-launcher {
  display: none !important;
}

#chat-web-widget-root.chat-widget-minimized #chat-web-widget-container {
  display: flex !important;
  bottom: 0 !important;
  border-radius: 28px !important;
  cursor: text !important;
}

#chat-web-widget-root.chat-widget-minimized #chat-web-widget-container #chat-report-bar,
#chat-web-widget-root.chat-widget-minimized #chat-web-widget-container .chat-widget-view,
#chat-web-widget-root.chat-widget-minimized #chat-web-widget-container .chat-header-status,
#chat-web-widget-root.chat-widget-minimized #chat-web-widget-container .chat-header-actions {
  display: none !important;
}

/* Keep only the bot name title in the header while minimized */
#chat-web-widget-root.chat-widget-minimized .chat-conversation-header {
  padding: 12px 20px 0 20px !important;
  border-bottom: none !important;
  background: transparent !important;
}

#chat-web-widget-root.chat-widget-minimized .chat-widget-bottom-panel {
  padding: 10px 12px 12px 12px !important;
}

/* Desktop: reserve 100px from the top of the viewport.
   Container bottom sits 98px above viewport bottom (root bottom 24px + container bottom 74px). */
@media (min-width: 1201px) {
  #chat-web-widget-root #chat-web-widget-container {
    max-height: calc(100vh - 110px - 98px) !important;
    max-height: calc(100dvh - 110px - 98px) !important;
  }

  /* Allow the conversation view to shrink so messages scroll instead of overflowing */
  #chat-web-widget-root #chat-widget-conversation-view {
    min-height: 0 !important;
  }

  #chat-web-widget-root #chat-widget-starter-view {
    min-height: 0 !important;
    overflow-y: auto !important;
  }
}

/* Mobile: minimized state shows only the floating launcher icon */
@media (max-width: 1200px) {
  #chat-web-widget-root.chat-widget-minimized #chat-web-widget-launcher {
    display: flex !important;
  }

  #chat-web-widget-root.chat-widget-minimized #chat-web-widget-container {
    display: none !important;
  }
}