/* Dream Weaver Group website assistant: floating launcher and chat window. */

/* ---------- Launcher ---------- */
.x3-chatbot-launcher {
  position: fixed;
  bottom: 84px;
  z-index: 10000;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #133b61;
  color: #fff;
  box-shadow: 0 10px 28px rgba(5, 10, 30, 0.24);
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.x3-chatbot-launcher.is-right { right: 30px; }
.x3-chatbot-launcher.is-left { left: 30px; }
.x3-chatbot-launcher i {
  margin: 0;
  color: inherit;
  font-size: 23px;
}

/* The branded artwork is 64px. Give the launcher the same footprint so layout
   systems measure the visible control correctly. Offsets below keep its visual
   position above the WhatsApp button. */
.x3-chatbot-launcher.is-branded {
  bottom: 78px;
  width: 64px;
  height: 64px;
  padding: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.x3-chatbot-launcher.is-branded.is-right { right: 24px; }
.x3-chatbot-launcher.is-branded.is-left { left: 24px; }

.x3-chatbot-launcher.is-branded img {
  display: block;
  width: 64px;
  height: 64px;
  max-width: none;
  box-sizing: border-box;
  border: 1px solid #fff;
  border-radius: 50%;
  object-fit: contain;
  pointer-events: none;
}

.x3-chatbot-launcher.is-branded:hover,
.x3-chatbot-launcher.is-branded:focus-visible {
  background: transparent;
  box-shadow: none;
}
.x3-chatbot-launcher:hover,
.x3-chatbot-launcher:focus-visible {
  background: #ea762c;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(5, 10, 30, 0.30);
}
.x3-chatbot-launcher:focus-visible {
  outline: 3px solid #ea762c;
  outline-offset: 3px;
}
/* Keep the launcher centred between the mobile Back to Top and WhatsApp controls. */
@media (max-width: 767px) {
  .x3-chatbot-launcher { bottom: 90px; }
  .x3-chatbot-launcher.is-branded { bottom: 84px; }
}
@media (max-width: 575px) {
  .x3-chatbot-launcher { bottom: 86px; }
  .x3-chatbot-launcher.is-right { right: 18px; }
  .x3-chatbot-launcher.is-left { left: 18px; }
  .x3-chatbot-launcher.is-branded { bottom: 80px; }
  .x3-chatbot-launcher.is-branded.is-right { right: 12px; }
  .x3-chatbot-launcher.is-branded.is-left { left: 12px; }
}
@media (max-width: 767px) {
  .dw-mobile-footer-actions .x3-chatbot-launcher.is-branded { inset: auto; }
}

/* ---------- Chat window ---------- */
.x3-chatbot-panel {
  --chat-navy: #133b61;
  --chat-ink: #050a1e;
  --chat-orange: #ea762c;
  --chat-green: #4c8154;
  --chat-text: #1f3346;
  --chat-muted: #5d7083;
  --chat-line: #e3e9ef;
  --chat-soft: #f2f5f8;
  position: fixed;
  bottom: 156px;
  z-index: 10001;
  width: min(390px, calc(100vw - 36px));
  height: min(620px, calc(100vh - 186px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(19, 59, 97, .14);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 26px 64px rgba(5, 10, 30, .26);
  color: var(--chat-text);
  font-family: "Century Gothic DW", "Century Gothic", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  animation: x3-chatbot-in .2s ease-out;
}
.x3-chatbot-panel[hidden] { display: none; }
.x3-chatbot-panel.is-right { right: 30px; }
.x3-chatbot-panel.is-left { left: 30px; }
@keyframes x3-chatbot-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.x3-chatbot-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  background: linear-gradient(135deg, var(--chat-ink) 0%, var(--chat-navy) 100%);
  color: #fff;
}
.x3-chatbot-avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: #fff;
}
.x3-chatbot-heading { flex: 1 1 auto; min-width: 0; }
.x3-chatbot-heading h2 {
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}
.x3-chatbot-heading p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  line-height: 1.35;
}
.x3-chatbot-icon-button {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
  transition: background-color .2s ease;
}
.x3-chatbot-icon-button i { margin: 0; font-size: 14px; }
.x3-chatbot-icon-button:hover,
.x3-chatbot-icon-button:focus-visible { background: var(--chat-orange); outline: none; }

.x3-chatbot-log {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 14px 8px;
  background: #fbfcfd;
}

.x3-chatbot-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
}
.x3-chatbot-msg.is-user { align-items: flex-end; }
.x3-chatbot-bubble {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 16px 16px 16px 4px;
  background: var(--chat-soft);
  color: var(--chat-text);
  overflow-wrap: anywhere;
}
.x3-chatbot-msg.is-user .x3-chatbot-bubble {
  border-radius: 16px 16px 4px 16px;
  background: var(--chat-navy);
  color: #fff;
}
.x3-chatbot-text p { margin: 0 0 6px; color: inherit; font-size: inherit; line-height: inherit; }
.x3-chatbot-text p:last-child { margin-bottom: 0; }
.x3-chatbot-text ul,
.x3-chatbot-text ol { margin: 4px 0 6px; padding-left: 18px; }
.x3-chatbot-text ul { list-style: disc; }
.x3-chatbot-text ol { list-style: decimal; }
.x3-chatbot-text li { margin: 2px 0; color: inherit; font-size: inherit; line-height: 1.45; }

.x3-chatbot-links,
.x3-chatbot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
}
.x3-chatbot-link,
.x3-chatbot-agent-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.x3-chatbot-link {
  border: 1px solid var(--chat-line);
  background: #fff;
  color: var(--chat-navy);
}
.x3-chatbot-link i { margin: 0; font-size: 10px; color: var(--chat-orange); }
.x3-chatbot-link:hover,
.x3-chatbot-link:focus-visible { border-color: var(--chat-navy); color: var(--chat-navy); text-decoration: none; }
.x3-chatbot-agent-inline {
  border: 1px solid var(--chat-green);
  background: var(--chat-green);
  color: #fff;
}
.x3-chatbot-agent-inline i { margin: 0; font-size: 12px; }
.x3-chatbot-agent-inline:hover,
.x3-chatbot-agent-inline:focus-visible { background: #3d6b44; border-color: #3d6b44; color: #fff; text-decoration: none; }

.x3-chatbot-chip {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(234, 118, 44, .55);
  border-radius: 999px;
  background: #fff;
  color: #9a4510;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.x3-chatbot-chip:hover,
.x3-chatbot-chip:focus-visible { border-color: var(--chat-orange); background: var(--chat-orange); color: #fff; outline: none; }

.x3-chatbot-typing .x3-chatbot-bubble {
  display: inline-flex;
  gap: 4px;
  padding: 13px 14px;
}
.x3-chatbot-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #93a3b3;
  animation: x3-chatbot-dot 1s infinite ease-in-out;
}
.x3-chatbot-typing span:nth-child(2) { animation-delay: .15s; }
.x3-chatbot-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes x3-chatbot-dot {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.x3-chatbot-agent-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 12px 10px;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--chat-green);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .2s ease;
}
.x3-chatbot-agent-bar i { margin: 0; font-size: 14px; }
.x3-chatbot-agent-bar:hover,
.x3-chatbot-agent-bar:focus-visible { background: #3d6b44; color: #fff; text-decoration: none; }

.x3-chatbot-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--chat-line);
  background: #fff;
}
.x3-chatbot-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #cfd8e1;
  border-radius: 999px;
  background: #fff;
  color: var(--chat-text);
  font: inherit;
  font-size: 15px;
}
.x3-chatbot-input::placeholder { color: #8495a6; }
.x3-chatbot-input:focus { border-color: var(--chat-navy); outline: 2px solid rgba(19, 59, 97, .15); }
.x3-chatbot-send {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--chat-orange);
  color: #fff;
  cursor: pointer;
  transition: background-color .2s ease;
}
.x3-chatbot-send i { margin: 0; font-size: 15px; }
.x3-chatbot-send:hover,
.x3-chatbot-send:focus-visible { background: var(--chat-navy); outline: none; }

@media (max-width: 575px) {
  .x3-chatbot-panel,
  .x3-chatbot-panel.is-right,
  .x3-chatbot-panel.is-left {
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .x3-chatbot-header { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
  .x3-chatbot-form { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  html.x3-chatbot-open,
  html.x3-chatbot-open body { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .x3-chatbot-launcher,
  .x3-chatbot-panel,
  .x3-chatbot-typing span { transition: none; animation: none; }
}
