.dchat {
  --dchat-accent: #0F6E8C;
  --dchat-bg: #ffffff;
  --dchat-text: #1f2328;
  --dchat-muted: #5b636e;
  --dchat-line: #e3e6ea;
  --dchat-user: #eef4f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--dchat-text);
  box-sizing: border-box;
}
.dchat *, .dchat *::before, .dchat *::after { box-sizing: inherit; }

/* Floating launcher */
.dchat--floating { position: fixed; right: 20px; bottom: 20px; z-index: 99999; }
.dchat__launcher {
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--dchat-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.dchat__launcher:hover { transform: scale(1.05); }
.dchat__launcher:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.dchat--floating.is-open .dchat__launcher { display: none; }

/* Panel */
.dchat__panel {
  display: flex; flex-direction: column;
  background: var(--dchat-bg);
  border: 1px solid var(--dchat-line);
  border-radius: 14px; overflow: hidden;
}
.dchat__panel[hidden] { display: none; }
.dchat--floating .dchat__panel {
  width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 40px);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.dchat--inline .dchat__panel { width: 100%; height: 600px; max-height: 80vh; }

.dchat__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--dchat-accent); color: #fff;
}
.dchat__title { font-weight: 600; font-size: 16px; }
.dchat__close {
  background: transparent; border: 0; color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer; padding: 0 4px;
}
.dchat__notice {
  font-size: 12.5px; color: var(--dchat-muted);
  background: #f7f8fa; border-bottom: 1px solid var(--dchat-line);
  padding: 8px 16px;
}

.dchat__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.dchat__msg { max-width: 88%; padding: 10px 13px; border-radius: 12px; word-wrap: break-word; }
.dchat__msg p { margin: 0 0 .5em; }
.dchat__msg p:last-child { margin-bottom: 0; }
.dchat__msg ul, .dchat__msg ol { margin: .25em 0 .5em 1.2em; padding: 0; }
.dchat__msg li { margin: .15em 0; }
.dchat__msg--assistant { align-self: flex-start; background: #f3f4f6; border-bottom-left-radius: 4px; }
.dchat__msg--user { align-self: flex-end; background: var(--dchat-accent); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.dchat__msg--error { background: #fdecec; color: #8a1c1c; }

.dchat__msg--typing { display: flex; gap: 4px; align-items: center; }
.dchat__msg--typing span {
  width: 7px; height: 7px; border-radius: 50%; background: #9aa1aa;
  animation: dchat-bounce 1.2s infinite ease-in-out;
}
.dchat__msg--typing span:nth-child(2) { animation-delay: .15s; }
.dchat__msg--typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dchat-bounce { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.dchat__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--dchat-line); align-items: flex-end; }
.dchat__input {
  flex: 1; resize: none; border: 1px solid var(--dchat-line); border-radius: 10px;
  padding: 9px 11px; font: inherit; color: inherit; min-height: 40px; max-height: 120px; background: #fff;
}
.dchat__input:focus { outline: none; border-color: var(--dchat-accent); box-shadow: 0 0 0 3px rgba(15,110,140,.15); }
.dchat__send {
  border: 0; border-radius: 10px; padding: 0 16px; height: 40px; cursor: pointer;
  background: var(--dchat-accent); color: #fff; font: inherit; font-weight: 600;
}
.dchat__send:disabled { opacity: .5; cursor: default; }

@media (max-width: 480px) {
  .dchat--floating { right: 12px; bottom: 12px; }
  .dchat--floating .dchat__panel { width: calc(100vw - 24px); height: calc(100vh - 24px); }
}

/* =========================================================================
* Hero chat — [doctari_hero]
 * ====================================================================== */
.dhero {
  --dhero-accent: #CC2027;
  --dhero-bg: #11111d;
  --dhero-text: #ffffff;
  --dhero-muted: #a3a6b4;
  --dhero-field: #1e1e2b;
  --dhero-line: rgba(255,255,255,.14);
  position: relative;
  box-sizing: border-box;
  width: 100%;
  border-radius: 40px;
  overflow: hidden;
  color: var(--dhero-text);
  background:
    radial-gradient(ellipse 60% 70% at 0% 0%, rgba(120,24,40,.55), rgba(120,24,40,0) 70%),
    var(--dhero-bg);
  padding: clamp(56px, 9vw, 130px) clamp(18px, 6vw, 80px) clamp(56px, 8vw, 120px);
  font-family: var(--dhero-font, var(--e-global-typography-text-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif)), sans-serif;
}
.dhero *,
.dhero *::before,
.dhero *::after { box-sizing: border-box; }
.dhero .dhero__inner {
  max-width: 1500px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}

.dhero .dhero__badge {
  display: inline-block;
  padding: 10px 32px;
  border: 1px solid var(--dhero-line);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  font-size: 17px;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.dhero .dhero__title {
  font-family: var(--dhero-heading-font, var(--e-global-typography-primary-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial)), sans-serif;
  color: var(--dhero-text);
  font-weight: 700;
  font-size: clamp(34px, 5.4vw, 80px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(18px, 2.5vw, 30px);
  transition: font-size .25s ease, margin .25s ease;
}
.dhero .dhero__sub {
  color: var(--dhero-muted);
  font-size: clamp(16px, 1.9vw, 25px);
  line-height: 1.5;
  margin: 0 0 clamp(36px, 5vw, 80px);
  max-width: 1000px;
}

/* Conversation */
.dhero .dhero__log {
  width: 100%; max-width: 1500px;
  max-height: 520px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  text-align: left;
  margin-bottom: 24px;
  padding: 4px 4px 4px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.dhero .dhero__log[hidden] { display: none; }
.dhero .dhero__msg {
  max-width: min(820px, 88%);
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 16.5px; line-height: 1.6;
  word-wrap: break-word;
}
.dhero .dhero__msg p { margin: 0 0 .6em; }
.dhero .dhero__msg p:last-child { margin-bottom: 0; }
.dhero .dhero__msg ul,
.dhero .dhero__msg ol { margin: .3em 0 .6em 1.25em; padding: 0; }
.dhero .dhero__msg li { margin: .2em 0; }
.dhero .dhero__msg a { color: #ff8a8f; text-decoration: underline; }
.dhero .dhero__msg--user {
  align-self: flex-end;
  background: var(--dhero-accent); color: #fff;
  border-bottom-right-radius: 6px;
  white-space: pre-wrap;
}
.dhero .dhero__msg--assistant {
  align-self: flex-start;
  background: var(--dhero-field);
  border: 1px solid var(--dhero-line);
  border-bottom-left-radius: 6px;
}
.dhero .dhero__msg--error { background: rgba(204,32,39,.15); border-color: rgba(204,32,39,.5); }
.dhero .dhero__msg--typing { display: flex; gap: 5px; align-items: center; min-height: 50px; }
.dhero .dhero__msg--typing span {
  width: 8px; height: 8px; border-radius: 50%; background: #8d90a0;
  animation: dchat-bounce 1.2s infinite ease-in-out;
}
.dhero .dhero__msg--typing span:nth-child(2) { animation-delay: .15s; }
.dhero .dhero__msg--typing span:nth-child(3) { animation-delay: .3s; }

/* Input bar */
.dhero .dhero__form {
  width: 100%; max-width: 1500px;
  display: flex; align-items: center; gap: 14px;
  background: var(--dhero-field);
  border: 1px solid var(--dhero-line);
  border-radius: 28px;
  padding: 18px 18px 18px 34px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.dhero .dhero__form:focus-within { border-color: rgba(255,255,255,.3); box-shadow: 0 0 0 4px rgba(204,32,39,.18); }
.dhero .dhero__icon { color: #9a9dad; flex: none; }
.dhero .dhero__input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none; box-shadow: none;
  color: var(--dhero-text);
  font: inherit; font-size: clamp(17px, 1.9vw, 24px); line-height: 1.4;
  resize: none; padding: 8px 0 8px 14px; margin: 0;
  min-height: 0; max-height: 160px;
}
.dhero .dhero__input::placeholder { color: #8d90a0; opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dhero .dhero__send {
  flex: none; width: 64px; height: 72px;
  border: 0; border-radius: 16px; cursor: pointer;
  background: var(--dhero-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: filter .15s ease, transform .15s ease;
  padding: 0;
}
.dhero .dhero__send:hover { filter: brightness(1.1); }
.dhero .dhero__send:active { transform: scale(.96); }
.dhero .dhero__send:disabled { opacity: .55; cursor: default; }
.dhero .dhero__send svg { width: 30px; height: 30px; }

/* Chips */
.dhero .dhero__chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 18px;
  margin-top: 40px;
}
.dhero .dhero__chip {
  display: inline-block;
  padding: 14px 32px;
  border: 1px solid var(--dhero-line);
  border-radius: 999px;
  background: rgba(255,255,255,.02);
  color: var(--dhero-text);
  font: inherit; font-size: clamp(15px, 1.5vw, 19px); line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.dhero .dhero__chip:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); color: #fff; }

.dhero .dhero__reset {
  margin-top: 18px;
  background: none; border: 0; padding: 4px 8px; cursor: pointer;
  color: var(--dhero-muted); font: inherit; font-size: 14.5px;
  text-decoration: underline; text-underline-offset: 3px;
}
.dhero .dhero__reset[hidden] { display: none; }
.dhero .dhero__reset:hover { color: #fff; }
.dhero .dhero__disclaimer {
  margin: 28px 0 0;
  color: #7d8090; font-size: 13px; line-height: 1.5; max-width: 760px;
}

/* After the first question: compact header, room for the conversation */
.dhero.is-active .dhero .dhero__title,
.dhero.is-active .dhero__title { font-size: clamp(26px, 3vw, 40px); margin-bottom: 12px; }
.dhero.is-active .dhero__badge { margin-bottom: 20px; }
.dhero.is-active .dhero__sub { display: none; }
.dhero.is-active .dhero__log { margin-top: 20px; }
.dhero.is-active .dhero__chips { display: none; }

@media (max-width: 640px) {
.dhero { border-radius: 24px; }
.dhero .dhero__title br { display: none; }
.dhero .dhero__icon { display: none; }
.dhero .dhero__input { padding-left: 4px; }
.dhero .dhero__form { padding: 10px 10px 10px 18px; border-radius: 20px; gap: 8px; }
.dhero .dhero__send { width: 52px; height: 52px; border-radius: 14px; }
.dhero .dhero__send svg { width: 24px; height: 24px; }
.dhero .dhero__chips { gap: 10px; margin-top: 28px; }
.dhero .dhero__chip { padding: 11px 20px; }
.dhero .dhero__log { max-height: 60vh; }
.dhero .dhero__msg { max-width: 94%; font-size: 15.5px; }
}

/* ---- Shield the hero from theme / Elementor global button & form styles ---- */
.dhero .dhero__badge,
.dhero .dhero__chip { font-family: var(--dhero-heading-font, var(--e-global-typography-primary-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial)), sans-serif; }
.dhero button.dhero__chip,
.dhero a.dhero__chip,
.dhero button.dhero__send,
.dhero button.dhero__reset,
.dhero textarea.dhero__input {
  text-transform: none; letter-spacing: normal; text-shadow: none;
  box-shadow: none; min-height: 0; min-width: 0; width: auto; margin: 0;
  font-weight: 400; text-align: center; white-space: normal; outline: none;
}
.dhero textarea.dhero__input { text-align: left; border-radius: 0; height: auto; white-space: pre-wrap; }
.dhero textarea.dhero__input:focus { background: transparent; border: 0; box-shadow: none; color: var(--dhero-text); }
.dhero button.dhero__send { width: 64px; background: var(--dhero-accent); color: #fff; border: 0; border-radius: 16px; padding: 0; line-height: 1; }
.dhero button.dhero__send:hover,
.dhero button.dhero__send:focus { background: var(--dhero-accent); color: #fff; }
.dhero button.dhero__chip:focus,
.dhero a.dhero__chip:focus { background: rgba(255,255,255,.08); color: #fff; }
.dhero button.dhero__chip:focus-visible,
.dhero a.dhero__chip:focus-visible,
.dhero button.dhero__send:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.dhero button.dhero__reset:hover,
.dhero button.dhero__reset:focus { background: none; color: #fff; }
@media (max-width: 640px) {
  .dhero button.dhero__send { width: 52px; border-radius: 14px; }
}
