.chat-wrapper {
  --primary-color: #6366f1;
  --secondary-color: #4f46e5;
  --background: #f8fafc;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.chat-wrapper .chat-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  border: none;
  background: transparent;
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
  padding: 0px;
}

.chat-wrapper .chat-toggle:hover {
  background: transparent;
  transform: scale(1.1);
}

.chat-wrapper .chat-toggle.hidden {
  display: none;
}

.chat-wrapper .chat-container {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  width: 360px;
  height: 70vh;
  max-height: 700px;
  background: white;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  z-index: 9999;
}

.chat-wrapper .chat-container.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}


.chat-wrapper .chat-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem;
  background: var(--primary-color);
  border-radius: 1rem 1rem 0 0;
  color: white;
}

.chat-wrapper .chat-header h3 {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: white !important;
  font-size: var(--chat-heading-size, 18px);
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}

.chat-wrapper .chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.chat-wrapper .close-button,
.chat-wrapper .maximize-button,
.chat-wrapper .new-chat-button {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  opacity: 0.92;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.chat-wrapper .close-button:hover,
.chat-wrapper .maximize-button:hover,
.chat-wrapper .new-chat-button:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.22);
}

.chat-wrapper .new-chat-button:active,
.chat-wrapper .maximize-button:active,
.chat-wrapper .close-button:active {
  transform: scale(0.96);
}

.chat-wrapper .ai-avatar {
  background: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
}

.chat-wrapper .ai-icon {
  color: var(--primary-color);
  font-size: 1.25rem;
}

.chat-wrapper .chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  background: var(--background);
}

.chat-wrapper .message-bubble {
  max-width: 80%;
  margin: 0.5rem 0;
  animation: fadeIn 0.3s ease;
  word-break: break-word;
}

/* Initial question chips */
.initial-questions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.5rem;
  align-items: flex-start;
}

.initial-question-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1.5px solid;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  animation: fadeIn 0.3s ease;
}

.initial-question-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.initial-question-chip:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.chip-icon {
  font-size: 0.9em;
  flex-shrink: 0;
}

.chat-wrapper .message-bubble.user {
  margin-left: auto;
}

.chat-wrapper .message-content {
  font-size: 18px;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: var(--primary-color);
  color: white;
  overflow-wrap: break-word;
  /* Modern replacement for word-wrap */
  white-space: pre-wrap;
  /* Preserve spaces and wrap text naturally */
  word-break: break-word;
  /* Break long words to prevent overflow */
  /* 	line-height:20px; */
}

.message-bubble.bot .message-content {
  background: white;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  display: block;
  overflow-wrap: break-word;
  /* Ensure wrapping for bot messages */
  white-space: pre-wrap;
  /* Preserve spaces and wrap text */
  word-break: break-word;
  /* Break long words */
  align-items: flex-start;
}

/* Bot logo/icon inside message bubble */
.bot-icon {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 7px;
}

.typing-indicator {
  display: flex;
  padding: 1rem;
  justify-content: center;
}

.chat-wrapper .dot {
  width: 8px;
  height: 8px;
  margin: 0 4px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: typingPulse 1.4s infinite ease-in-out;
}

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

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

.chat-wrapper .message-form {
  display: flex;
  padding: 1rem;
  border-top: 1px solid #e2e8f0;
  gap: 0.5rem;
  align-items: center;
}

.chat-wrapper .message-form input {
  flex: 1;
  padding: .5rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  font-size: 14px;
  transition: border-color 0.2s ease;
  margin-bottom: 0px !important;
}

.message-form input:focus {
  outline: none;
}

.chat-wrapper .send-button {
  background: var(--primary-color);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  color: white;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0px
}

.send-button:hover {
  background: var(--secondary-color);
}

.send-button:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.hello-help-text {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  background: #fff;
  font-size: 16px;
  padding: 5px 20px;
  cursor: pointer;
  /* Show clickable hand cursor */
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

.chatbot-footer-text {
  font-size: 11px;
  text-align: center;
  padding: 0px 12px 10px;
  color: gray;
  line-height: 18px;
}


.message-bubble.bot .message-content {
  width: fit-content;
}

.message-bubble.user .message-content {
  width: fit-content;
}

.message-bubble.user {
  display: flex;
  justify-content: end;
}

.message-content a {
  color: #2563eb;
  text-decoration: underline;
  background: transparent;
  padding: 0;
  display: inline;
  font-weight: normal;
}

.message-content a:hover {
  color: #1d4ed8;
}

.message-content a.chatbot-text-link,
.message-content a.chatbot-text-link:hover {
  background: none;
  padding: 0;
  margin: 0;
  display: inline;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
  border-radius: 0;
  text-decoration: none;
  box-shadow: none;
}

.message-content a.chatbot-custom-link {
  color: #fff;
  background-color: #e62129;
  padding: 6px 12px;
  display: inline-block;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 13px;
  line-height: 1.2;
}

.message-content a.chatbot-custom-link:hover {
  color: #000;
  opacity: 0.9;
}

/* Disabled badge shown after appointment is booked */
.message-content .chatbot-booked-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #1a7f37;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 13px;
  line-height: 1.2;
  cursor: default;
  user-select: none;
  opacity: 0.9;
}

.chat-container.open.maximized {
  width: 100%;
  height: 100%;
  bottom: 0;
  right: 0;
  border-radius: 0px !important;
  min-height: 100%;
}

.chat-container.open.maximized header.chat-header {
  border-radius: 0px !important;
}

.chat-container.open.maximized button.chat-toggle {
  display: none;
}

/* @keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
 
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-1px); }
} */

@keyframes typingPulse {

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

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

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .chat-container {
    width: 90%;
    height: 55vh;
    bottom: 5rem;
  }

  .chat-header {
    padding: 0.75rem;
  }

  .ai-avatar {
    width: 30px;
    height: 30px;
  }

  .ai-icon {
    font-size: 1.1rem;
  }

  .message-content {
    font-size: 16px;
    padding: 0.5rem 0.75rem;
  }

  .message-form input {
    font-size: 12px;
    padding: 0.5rem 0.75rem;
  }

  .send-button {
    width: 35px;
    height: 35px;
  }

  .send-button:hover {
    background: var(--primary-color);
  }

  .chat-container.open {
    width: 100%;
    right: 0;
    height: 100%;
    bottom: 0;
    min-height: 100%;
  }

  header.chat-header {
    border-radius: 0px !important;
  }

  .chat-wrapper .chat-header {
    justify-content: space-between;
  }

  button.maximize-button {
    display: none;
  }
}

@media (max-width: 480px) {
  .chat-toggle {
    width: 50px;
    height: 50px;
  }

  .chat-container {
    bottom: 6rem;
    width: 70%;
    height: 45vh;
  }

  .message-form input {
    font-size: 14px;
    padding: 0.5rem;
  }

  .send-button {
    width: 38px;
    height: 38px;
  }

  .ai-avatar {
    width: 28px;
    height: 28px;
  }

  .chat-container.open {
    width: 100%;
    right: 0;
    height: 100%;
    bottom: 0;
    min-height: 100%;
  }

  header.chat-header {
    border-radius: 0px !important;
  }

  .chat-wrapper .chat-header {
    justify-content: space-between;
  }

  button.maximize-button {
    display: none;
  }
}

/* IPad media query start here */
@media (min-width: 768px) and (max-width: 1024px) {
  .chat-container.open {
    width: 75%;
  }

  .chat-container.open.maximized {
    width: 100%;
    top: 0;
    right: 0;
    min-height: 100%;
  }
}

.history-loading-indicator svg {
  animation: spin 1s linear infinite;
}

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

/* ─── Lead Forms ──────────────────────────────────────────────────── */

.cb-lead-form {
  width: 100%;
  max-width: 315px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8eaf0;
  margin-top: 12px;
  overflow: hidden;
  animation: cbFormSlideIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.cb-lead-form__header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px 12px;
  border-bottom: 1px solid #f1f3f7;
  background: linear-gradient(135deg, #fafbff 0%, #f8f9fc 100%);
}

.cb-lead-form__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--cb-icon-bg, rgba(99, 102, 241, 0.10));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cb-lead-form__title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.cb-lead-form__subtitle {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.cb-lead-form__body {
  padding: 14px 15px 16px;
}

.cb-lead-form__label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  margin-top: 11px;
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}

.cb-lead-form__label:first-child {
  margin-top: 0;
}

.cb-lead-form__label-optional {
  font-weight: 400;
  color: #b0b8c8;
  margin-left: 3px;
  font-size: 10.5px;
}

.cb-lead-form__input,
.cb-lead-form__select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #b4b4b4 !important;
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  color: #1e293b !important;
  background: #ffffff !important;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  appearance: auto;
  line-height: 1.4;
	margin-bottom:0px!important;
}

.cb-lead-form__input::placeholder {
  color: #878787;
  font-size: 12.5px;
}

.cb-lead-form__input:hover:not(:disabled),
.cb-lead-form__select:hover:not(:disabled) {
  border-color: #cbd5e1;
}

.cb-lead-form__input:focus,
.cb-lead-form__select:focus {
  border-color: var(--cb-accent, #6366f1);
  box-shadow: 0 0 0 3px var(--cb-focus-ring, rgba(99, 102, 241, 0.15));
  background: #ffffff !important;
}

.cb-lead-form__input--error,
.cb-lead-form__input--error:focus {
  border-color: #f87171 !important;
}

.cb-lead-form__input:disabled,
.cb-lead-form__select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8fafc !important;
}

/* ── Custom inline service dropdown (replaces native <select>) ── */
.cb-custom-select {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
}

.cb-custom-select__trigger {
  width: 100%;
  padding: 9px 11px;
  border:1px solid #b4b4b4 !important;
  font-size: 13px;
  font-family: inherit;
  color: #1e293b;
  background: #ffffff;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cb-custom-select__trigger:hover:not(:disabled) {
  border-color: #cbd5e1;
}

.cb-custom-select--open .cb-custom-select__trigger {
  border-color: var(--cb-accent, #6366f1);
  box-shadow: 0 0 0 3px var(--cb-focus-ring, rgba(99,102,241,0.15));
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.cb-custom-select--error .cb-custom-select__trigger {
  border-color: #f87171 !important;
}

.cb-custom-select__placeholder {
  color: #c1c9d8;
}

.cb-custom-select__arrow {
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform 0.15s ease;
}

.cb-custom-select--open .cb-custom-select__arrow {
  transform: rotate(180deg);
}

/* Inline list — no absolute positioning, pushes content down */
.cb-custom-select__options {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid var(--cb-accent, #6366f1);
  border-top: none;
  border-bottom-left-radius: 9px;
  border-bottom-right-radius: 9px;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  box-sizing: border-box;
}

.cb-custom-select__option {
  padding: 8px 11px;
  font-size: 13px;
  color: #1e293b;
  cursor: pointer;
  transition: background 0.1s ease;
}

.cb-custom-select__option:hover {
  background: var(--cb-icon-bg, rgba(99,102,241,0.08));
}

.cb-custom-select__option--active {
  background: var(--cb-icon-bg, rgba(99,102,241,0.12));
  color: var(--cb-accent, #6366f1);
  font-weight: 500;
}

.cb-custom-select--disabled .cb-custom-select__trigger {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8fafc;
}

.cb-lead-form__input:-webkit-autofill,
.cb-lead-form__input:-webkit-autofill:hover,
.cb-lead-form__input:-webkit-autofill:focus,
.cb-lead-form__input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0px 9999px #ffffff inset !important;
  box-shadow: 0 0 0px 9999px #ffffff inset !important;
  -webkit-text-fill-color: #1e293b !important;
  caret-color: #1e293b !important;
  transition: background-color 99999s ease-in-out 0s !important;
}

.cb-lead-form__field-error {
  display: block;
  font-size: 11px;
  color: #ef4444;
  margin-top: 4px;
  line-height: 1.3;
}

.cb-lead-form__btn {
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: #ed1c24;
  color: var(--cb-btn-color, #fff);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  margin-top: 16px;
  font-family: inherit;
  letter-spacing: 0.02em;
  transition: opacity 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px var(--cb-focus-ring, rgba(99,102,241,0.3));
}

.cb-lead-form__btn:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: 0 4px 14px var(--cb-focus-ring, rgba(99,102,241,0.4));
}

.cb-lead-form__btn:active:not(:disabled) {
  transform: scale(0.98);
  opacity: 1;
}

.cb-lead-form__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.cb-lead-form__error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 12px;
  margin-top: 12px;
  line-height: 1.4;
}

/* Success */
.cb-lead-form__success {
  padding: 26px 16px;
  text-align: center;
  animation: cbSuccessPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cbSuccessPop {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1);    }
}

.cb-lead-form__success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 0 0 6px rgba(5, 150, 105, 0.08);
}

.cb-lead-form__success-title {
  font-size: 14px;
  font-weight: 700;
  color: #065f46;
  letter-spacing: -0.01em;
}

.cb-lead-form__success-msg {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
  line-height: 1.55;
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Service Checkbox Group ────────────────────────────── */
.cb-checkbox-group {
  display: flex;
    flex-direction: column;
  gap: 6px 8px;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #fafbff;
  margin-top: 2px;
  transition: border-color 0.2s ease;
}
.cb-checkbox-group input.cb-checkbox-input {
    padding: 8px!important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cb-checkbox-group--error {
  border-color: #ef4444;
  background: #fff5f5;
}

.cb-checkbox-group--disabled {
  opacity: 0.5;
  pointer-events: none;
}

.cb-checkbox-item {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 5px 6px;
  border-radius: 7px;
  transition: background 0.15s ease;
  font-size: 12.5px;
  color: #1e293b;
  user-select: none;
}

.cb-checkbox-item:hover {
  background: #ebebeb;
}

.cb-checkbox-input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.cb-checkbox-input:checked {
  background: var(--cb-accent, #6366f1);
  border-color: var(--cb-accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.cb-checkbox-input:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.cb-checkbox-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.cb-checkbox-label {
  line-height: 1.3;
}

/* "Other" text-input row — spans full width */
.cb-checkbox-other-wrap {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
  margin-top: 4px;
}

.cb-checkbox-other-label {
  font-size: 11.5px !important;
  color: #000 !important;
  font-weight: 600 !important;
  margin: 0 !important;
}

/* Welcome bubble sits above the launcher.
   The tail is a plain downward triangle under the bubble's right side,
   aimed at the button. No clip-path, so there is no fold line. */
.chat-wrapper .wb-bubble {
  --wb-bg: #ffffff;
  --wb-title: #0f172a;
  --wb-accent: #2563eb;
  position: fixed;
  z-index: 1001;
  right: 2rem;
  bottom: calc(2rem + var(--wb-toggle, 60px) + 16px);
  width: min(280px, calc(100vw - 4rem));
  animation: wbIn 0.28s ease;
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.12));
}

.chat-wrapper .wb-bubble::before {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
  right: calc(var(--wb-toggle, 60px) / 2 - 9px);
  bottom: -8px;
  width: 0;
  height: 0;
  background: none;
  border-style: solid;
  border-width: 9px 9px 0 9px;
  border-color: var(--wb-bg) transparent transparent transparent;
  -webkit-clip-path: none;
  clip-path: none;
}

.chat-wrapper .wb-card {
  position: relative;
  z-index: 1;
  background: var(--wb-bg);
  color: var(--wb-title);
  border-radius: 18px;
  padding: 16px 18px 14px;
  cursor: pointer;
}

.chat-wrapper .wb-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
  padding: 0;
}

.chat-wrapper .wb-close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
}

.chat-wrapper .wb-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-right: 16px;
}

.chat-wrapper .wb-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #e8f1ff;
  color: var(--wb-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.chat-wrapper .wb-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-wrapper .wb-glyph-mark {
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
}

.chat-wrapper .wb-copy {
  min-width: 0;
  flex: 1;
}

.chat-wrapper .wb-title {
  font-size: 15px;
  font-weight: 750;
  font-weight: 700;
  line-height: 1.35;
  color: var(--wb-title);
}

.chat-wrapper .wb-title p,
.chat-wrapper .wb-body p {
  margin: 0 0 4px;
}

.chat-wrapper .wb-body {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
}

.chat-wrapper .wb-title a,
.chat-wrapper .wb-body a {
  color: #2563eb;
  text-decoration: underline;
}

.chat-wrapper .wb-questions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  max-height: 220px;
  overflow: auto;
}

.chat-wrapper .wb-question {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: #eaf3ff;
  color: #1e3a8a;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.chat-wrapper .wb-question:hover {
  background: #dbeafe;
}

.chat-wrapper .wb-q-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #2563eb;
}

.chat-wrapper .wb-q-icon svg {
  width: 16px;
  height: 16px;
}

.chat-wrapper .wb-q-label {
  flex: 1;
  min-width: 0;
}

.chat-wrapper .wb-q-chevron {
  color: #60a5fa;
  font-size: 18px;
  line-height: 1;
}

.chat-wrapper .wb-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.chat-wrapper .wb-spark {
  color: #f59e0b;
  margin-right: 4px;
}

.chat-wrapper .wb-deco {
  position: absolute;
  pointer-events: none;
}

.chat-wrapper .wb-deco-offer {
  right: -14px;
  top: 8px;
  width: 14px;
  height: 22px;
}

.chat-wrapper .wb-deco-offer::before,
.chat-wrapper .wb-deco-offer::after {
  content: "";
  position: absolute;
  left: 4px;
  width: 3px;
  height: 10px;
  border-radius: 99px;
  background: #22c55e;
}

.chat-wrapper .wb-deco-offer::before { transform: rotate(28deg); top: 0; }
.chat-wrapper .wb-deco-offer::after { transform: rotate(-28deg); top: 8px; left: 8px; }

.chat-wrapper .wb-deco-urgent {
  right: -6px;
  bottom: 46px;
  color: #fb7185;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
}

.chat-wrapper .wb-deco-urgent::before {
  content: "! !";
}

.chat-wrapper .wb-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  border: 2px solid #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-sizing: border-box;
}

/* Per-design skins matched to the reference sheet */
.chat-wrapper .wb-bubble { filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.12)); --wb-border: #e2e8f0; }
.chat-wrapper .wb-card { box-shadow: none; }
.chat-wrapper .wb-title { color: var(--wb-title); font-size: 15.5px; letter-spacing: -0.01em; }
.chat-wrapper .wb-body { color: #475569; }
.chat-wrapper .wb-bubble { --wb-title: #0b2559; }

/* Plain line icons (no tile) for tooth / gift / bell designs */
.chat-wrapper .wb-design-consultation .wb-icon,
.chat-wrapper .wb-design-service .wb-icon,
.chat-wrapper .wb-design-offer .wb-icon,
.chat-wrapper .wb-design-urgent .wb-icon {
  background: transparent;
  width: 34px;
  height: 34px;
  border-radius: 0;
}
.chat-wrapper .wb-design-consultation .wb-icon svg,
.chat-wrapper .wb-design-service .wb-icon svg,
.chat-wrapper .wb-design-offer .wb-icon svg,
.chat-wrapper .wb-design-urgent .wb-icon svg { width: 30px; height: 30px; }
.chat-wrapper .wb-icon.has-image { background: transparent; }

/* CTA: full width for consultation, compact pill with arrow for others */
.chat-wrapper .wb-cta { border-radius: 10px; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15); }
.chat-wrapper .wb-design-service .wb-cta,
.chat-wrapper .wb-design-offer .wb-cta,
.chat-wrapper .wb-design-urgent .wb-cta {
  display: inline-flex;
  width: auto;
  min-width: 60%;
  margin-left: 44px;
  padding: 10px 18px;
}
.chat-wrapper .wb-design-urgent .wb-cta { border-radius: 999px; }
.chat-wrapper .wb-cta-arrow { margin-left: 8px; }

/* 1 simple */
.chat-wrapper .wb-design-simple .wb-title { font-size: 17px; font-weight: 800; }

/* 3 service */
.chat-wrapper .wb-design-service { --wb-bg: #e8f2ff; --wb-border: #cfe1fb; }

/* 4 question */
.chat-wrapper .wb-design-question .wb-icon {
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  width: 38px;
  height: 38px;
}

/* 5 actions */
.chat-wrapper .wb-design-actions .wb-title { display: inline; font-size: 14px; font-weight: 500; color: #1e293b; }
.chat-wrapper .wb-design-actions .wb-body { display: inline; font-size: 14px; color: #1e293b; }
.chat-wrapper .wb-design-actions .wb-copy { font-size: 14px; line-height: 1.45; padding-left: 26px; position: relative; }
.chat-wrapper .wb-design-actions .wb-spark { position: absolute; left: 0; top: -2px; font-size: 18px; }
.chat-wrapper .wb-design-actions .wb-question { background: #e6f0fd; color: #1d4ed8; font-weight: 500; border-radius: 10px; }

/* 6 offer */
.chat-wrapper .wb-design-offer { --wb-bg: #e9f8ef; --wb-border: #c6ecd4; --wb-title: #0b2559; --wb-accent: #16a34a; }
.chat-wrapper .wb-design-offer .wb-icon { color: #16a34a; }

/* 7 friendly */
.chat-wrapper .wb-design-friendly .wb-icon {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 3px #bfdbfe;
}
.chat-wrapper .wb-design-friendly .wb-title { font-size: 17px; font-weight: 800; }

/* 8 urgent */
.chat-wrapper .wb-design-urgent { --wb-bg: #fff0f2; --wb-border: #fdd5dc; --wb-title: #e11d48; --wb-accent: #e11d48; }
.chat-wrapper .wb-design-urgent .wb-icon { color: #e11d48; }

/* 9 minimal */
.chat-wrapper .wb-design-minimal { width: min(220px, calc(100vw - 2rem - var(--wb-toggle, 56px) - 24px)); }
.chat-wrapper .wb-design-minimal .wb-card { border-radius: 16px 16px 16px 16px; padding: 12px 14px; }
.chat-wrapper .wb-design-minimal .wb-close { display: none; }
.chat-wrapper .wb-design-minimal .wb-top { align-items: center; padding-right: 0; }
.chat-wrapper .wb-design-minimal .wb-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eef2f7;
  color: #1e3a8a;
}
.chat-wrapper .wb-design-minimal .wb-title { font-size: 14px; font-weight: 700; }

/* Attention rays above the launcher (offer = green, urgent = red) */
.chat-wrapper .wb-deco-offer,
.chat-wrapper .wb-deco-urgent {
  right: calc(var(--wb-toggle, 60px) * -0.75);
  bottom: calc(var(--wb-toggle, 60px) * 0.62);
  top: auto;
  width: 26px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) 50% 0 / 3px 11px no-repeat;
  border-radius: 2px;
  color: #22c55e;
}
.chat-wrapper .wb-deco-urgent { color: #f43f5e; }
.chat-wrapper .wb-deco-offer::before,
.chat-wrapper .wb-deco-offer::after,
.chat-wrapper .wb-deco-urgent::before,
.chat-wrapper .wb-deco-urgent::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 3px;
  height: 10px;
  border-radius: 99px;
  background: currentColor;
}
.chat-wrapper .wb-deco-offer::before,
.chat-wrapper .wb-deco-urgent::before { left: 2px; transform: rotate(-30deg); }
.chat-wrapper .wb-deco-offer::after,
.chat-wrapper .wb-deco-urgent::after { left: auto; right: 2px; transform: rotate(30deg); }

@keyframes wbIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .chat-wrapper .wb-bubble {
    left: auto;
    right: 1.25rem;
    bottom: calc(1.25rem + var(--wb-toggle, 60px) + 16px);
    width: min(240px, calc(100vw - 2.5rem));
  }
  .chat-wrapper .chat-toggle {
    right: 1.25rem;
    bottom: 1.25rem;
  }
  .chat-wrapper .wb-card {
    max-height: min(42vh, 260px);
    overflow: auto;
    padding: 12px 12px 10px;
    border-radius: 18px;
  }
  .chat-wrapper .wb-questions {
    max-height: 96px;
  }
  .chat-wrapper .wb-title { font-size: 14px; }
  .chat-wrapper .wb-body,
  .chat-wrapper .wb-question { font-size: 12px; }
  .chat-wrapper .wb-icon { width: 34px; height: 34px; }
  .chat-wrapper .wb-design-friendly .wb-icon { width: 48px; height: 48px; }
  .chat-wrapper .wb-deco { display: none; }
  .chat-wrapper .hello-help-text {
    left: auto;
    right: calc(1.25rem + var(--wb-toggle, 56px) + 8px);
    max-width: min(210px, calc(100vw - var(--wb-toggle, 56px) - 2.75rem));
    bottom: calc(1.25rem + (var(--wb-toggle, 56px) / 2) - 14px);
  }
}