#chatbot-button.chatbot-launcher {
  --chatbot-brand-gradient: linear-gradient(135deg, #29b1ff 0%, #3478f6 50%, #3a4eff 100%);
  position: fixed;
  right: max(20px, env(safe-area-inset-right)) !important;
  bottom: max(20px, env(safe-area-inset-bottom)) !important;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto !important;
  min-width: 174px !important;
  height: 56px !important;
  padding: 0 18px !important;
  border: 1px solid rgba(247, 212, 105, .72);
  border-radius: 999px !important;
  background: var(--chatbot-brand-gradient) !important;
  color: #fff !important;
  font: inherit;
  font-family: "DM Sans", sans-serif !important;
  font-size: 14px !important;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 8px 24px rgba(52, 120, 246, .3), 0 0 0 1px rgba(247, 212, 105, .12) !important;
  cursor: pointer;
  isolation: isolate;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: chatbot-breathe 3s ease-in-out infinite;
}

#chatbot-button.chatbot-launcher::before,
#chatbot-button.chatbot-launcher::after {
  position: absolute;
  z-index: -1;
  inset: -4px;
  border: 1px solid rgba(52, 120, 246, .42);
  border-radius: inherit;
  content: "";
  pointer-events: none;
  animation: chatbot-pulse 2.8s ease-out infinite;
}

#chatbot-button.chatbot-launcher::after {
  inset: -8px;
  opacity: .55;
  animation-delay: 1.4s;
}

#chatbot-button.chatbot-launcher:hover,
#chatbot-button.chatbot-launcher:focus-visible {
  transform: translateY(-2px) scale(1.035);
  box-shadow: 0 12px 30px rgba(52, 120, 246, .38) !important;
}

#chatbot-button.chatbot-launcher:focus-visible,
#chatbot-close:focus-visible,
#chatbot-send:focus-visible,
#chatbot-messages button:focus-visible,
#chatbot-messages a:focus-visible,
#chatbot-messages input:focus-visible,
#chatbot-messages select:focus-visible,
#chatbot-messages textarea:focus-visible {
  outline: 3px solid var(--qx-blue, #3478f6);
  outline-offset: 3px;
}

#chatbot-button .chatbot-launcher-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
}

#chatbot-button .chatbot-launcher-icon {
  display: block;
  width: 24px;
  height: 24px;
}

#chatbot-button .chatbot-tooltip {
  position: static;
  display: inline;
  color: inherit;
  font: inherit;
  white-space: nowrap;
}

#chatbot-button .qx-icon-gold {
  stroke: #f7d469 !important;
  filter: drop-shadow(0 0 3px rgba(247, 212, 105, .45));
}

#chatbot-button .chatbot-notification {
  position: absolute;
  top: 1px;
  right: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--qx-cyan, #25a9f2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .22);
  animation: chatbot-dot 2s ease-in-out infinite;
}

#chatbot-window.chatbot-premium-panel {
  --chatbot-brand-gradient: linear-gradient(135deg, #29b1ff 0%, #3478f6 50%, #3a4eff 100%);
  position: fixed;
  right: max(20px, env(safe-area-inset-right)) !important;
  bottom: max(88px, calc(env(safe-area-inset-bottom) + 88px)) !important;
  z-index: 9999;
  display: flex;
  width: min(360px, calc(100vw - 32px)) !important;
  height: min(500px, calc(100dvh - 120px)) !important;
  min-height: 320px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(52, 120, 246, .16);
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 18px 55px rgba(15, 35, 75, .2) !important;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(12px) scale(.98);
  transform-origin: bottom right;
  transition: opacity .2s ease, transform .2s ease;
}

#chatbot-window.chatbot-premium-panel.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#chatbot-window,
#chatbot-window * {
  font-family: "DM Sans", sans-serif !important;
}

#chatbot-window {
  color: #15233d !important;
  font-size: 16px !important;
  line-height: normal !important;
}

#chatbot-header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 14px;
  background: var(--chatbot-brand-gradient) !important;
  color: #fff !important;
}

#chatbot-header h3,
#chatbot-header p {
  margin: 0;
  color: inherit;
}

#chatbot-header > span {
  font-size: 14px;
  font-weight: 700;
}

#chatbot-header h3 {
  font-size: 16px;
  font-weight: 700;
}

#chatbot-header p {
  margin-top: 3px;
  font-size: 12px;
  opacity: .9;
}

#chatbot-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

#chatbot-close:hover {
  background: rgba(255, 255, 255, .26);
}

#chatbot-messages {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 14px;
  background: #f6f9ff;
  color: #233047;
  font-family: inherit;
  font-size: 13px !important;
  line-height: 1.5;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

#chatbot-messages .chatbot-message {
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 14px;
  overflow-wrap: anywhere;
  animation: chatbot-message-in .2s ease both;
}

#chatbot-messages .chatbot-message.assistant-message {
  align-self: flex-start;
  border: 1px solid rgba(52, 120, 246, .08);
  border-bottom-left-radius: 4px;
  background: #fff !important;
  color: #29364a !important;
  box-shadow: 0 2px 8px rgba(24, 44, 78, .05);
}

#chatbot-messages .chatbot-message.user-message {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: rgba(52, 120, 246, .1) !important;
  color: var(--qx-blue, #3478f6) !important;
  font-weight: 600;
}

#chatbot-messages .chatbot-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-self: flex-start;
  max-width: 100%;
  animation: chatbot-message-in .2s ease both;
  background: transparent !important;
}

#chatbot-messages .chatbot-quick-replies button,
#chatbot-messages .chatbot-contact-links a,
#chatbot-messages .chatbot-closing-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid rgba(52, 120, 246, .28);
  border-radius: 999px;
  background: #fff;
  color: var(--qx-blue, #3478f6);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

#chatbot-messages .chatbot-quick-replies button:hover,
#chatbot-messages .chatbot-contact-links a:hover,
#chatbot-messages .chatbot-closing-link:hover {
  border-color: transparent;
  background: var(--chatbot-brand-gradient);
  color: #fff;
}

#chatbot-messages .chatbot-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
  background: transparent !important;
}

#chatbot-messages .chatbot-enquiry-form {
  display: grid;
  width: 100%;
  gap: 8px;
  margin-top: 10px;
}

#chatbot-messages .chatbot-enquiry-form label {
  display: grid;
  gap: 4px;
  color: #425069;
  font-size: 11px;
  font-weight: 600;
}

#chatbot-messages .chatbot-enquiry-form input,
#chatbot-messages .chatbot-enquiry-form select,
#chatbot-messages .chatbot-enquiry-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 36px;
  padding: 8px 9px;
  border: 1px solid #dce5f3;
  border-radius: 8px;
  background: #fff;
  color: #233047;
  font: inherit;
  font-size: 12px;
}

#chatbot-messages .chatbot-enquiry-form textarea {
  min-height: 68px;
  resize: vertical;
}

#chatbot-messages .chatbot-enquiry-form button[type="submit"] {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: var(--chatbot-brand-gradient);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

#chatbot-messages .chatbot-enquiry-form button[type="submit"]:disabled {
  cursor: wait;
  opacity: .7;
}

#chatbot-messages .chatbot-form-status {
  margin: 0;
  color: #b42318;
  font-size: 11px;
}

#chatbot-messages .chatbot-form-status.success {
  color: #18794e;
}

#chatbot-messages .chatbot-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#chatbot-messages .chatbot-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--qx-blue, #3478f6);
  animation: chatbot-typing 1s ease-in-out infinite;
}

#chatbot-messages .chatbot-typing span:nth-child(2) {
  animation-delay: .15s;
}

#chatbot-messages .chatbot-typing span:nth-child(3) {
  animation-delay: .3s;
}

#chatbot-input-area {
  display: flex;
  box-sizing: border-box;
  min-height: 63px;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border-top: 1px solid #e7edf7;
  background: #fff;
  color: #15233d !important;
}

#chatbot-input {
  box-sizing: border-box;
  min-width: 0;
  height: 40px !important;
  min-height: 40px !important;
  flex: 1;
  padding: 9px 11px !important;
  border: 1px solid #dce5f3 !important;
  border-radius: 999px;
  background: #fff !important;
  color: #233047 !important;
  font: 13px "DM Sans", sans-serif !important;
}

#chatbot-input::placeholder {
  color: #8793a7;
}

#chatbot-input:focus {
  border-color: #dce5f3 !important;
  box-shadow: none !important;
  outline: none !important;
}

#chatbot-input-area #chatbot-send {
  display: grid;
  box-sizing: border-box;
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px;
  place-items: center;
  padding: 0 !important;
  border: 0;
  border-radius: 50%;
  background: var(--chatbot-brand-gradient) !important;
  background-image: var(--chatbot-brand-gradient) !important;
  color: #fff !important;
  font-size: 0 !important;
  line-height: 1;
  cursor: pointer;
}

#chatbot-input-area #chatbot-send svg {
  display: block;
  width: 19px;
  height: 19px;
}

#chatbot-send:disabled {
  cursor: not-allowed;
  opacity: .55;
}

@keyframes chatbot-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

@keyframes chatbot-mobile-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes chatbot-pulse {
  0% { opacity: .55; transform: scale(.98); }
  100% { opacity: 0; transform: scale(1.08); }
}

@keyframes chatbot-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 255, 255, .22); }
  50% { box-shadow: 0 0 0 5px rgba(255, 255, 255, .1); }
}

@keyframes chatbot-message-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes chatbot-typing {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 600px) {
  #chatbot-button.chatbot-launcher {
    right: max(14px, env(safe-area-inset-right)) !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    height: 52px !important;
    padding: 0 !important;
    gap: 0;
    border: 1px solid rgba(52, 120, 246, .8);
    border-radius: 50% !important;
    background: #3478f6 !important;
    box-shadow: 0 0 16px rgba(52, 120, 246, .42) !important;
    animation: chatbot-mobile-breathe 3s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
  }

  #chatbot-button.chatbot-launcher::before,
  #chatbot-button.chatbot-launcher::after {
    border-color: rgba(52, 120, 246, .65);
  }

  #chatbot-button .chatbot-tooltip {
    display: none;
  }

  #chatbot-button .chatbot-launcher-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
  }

  #chatbot-button .qx-icon-gold {
    stroke: #fff !important;
    filter: none;
  }

  #chatbot-button.chatbot-launcher:active {
    filter: brightness(.9);
  }

  #chatbot-button .chatbot-notification {
    top: 0;
    right: 0;
  }

  #chatbot-window.chatbot-premium-panel {
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: max(76px, calc(env(safe-area-inset-bottom) + 76px)) !important;
    left: auto !important;
    width: min(360px, calc(100vw - 40px)) !important;
    height: min(500px, calc(100dvh - 94px)) !important;
    max-height: min(500px, calc(100dvh - 94px)) !important;
    min-height: min(300px, calc(100dvh - 94px)) !important;
  }

  #chatbot-window.chatbot-premium-panel.keyboard-open {
    top: calc(var(--chatbot-viewport-offset-top, 0px) + env(safe-area-inset-top) + 8px) !important;
    right: max(6px, env(safe-area-inset-right)) !important;
    bottom: auto !important;
    left: max(6px, env(safe-area-inset-left)) !important;
    width: auto !important;
    height: calc(var(--chatbot-viewport-height, 100dvh) - env(safe-area-inset-top) - 16px) !important;
    max-height: none !important;
    min-height: 0 !important;
    border-radius: 16px !important;
  }

  #chatbot-messages {
    padding: 13px 11px !important;
  }

  #chatbot-header {
    padding: 11px 14px !important;
    font-size: 13px !important;
  }
}

@media (max-width: 600px) {
  html.ios-chatbot-viewport #chatbot-button.chatbot-launcher {
    z-index: 2147483000 !important;
    box-sizing: border-box;
  }

  html.ios-chatbot-viewport #chatbot-window.chatbot-premium-panel {
    position: fixed !important;
    z-index: 2147483001 !important;
    top: auto !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: calc(env(safe-area-inset-bottom) + 76px) !important;
    left: max(10px, env(safe-area-inset-left)) !important;
    box-sizing: border-box;
    width: auto !important;
    height: min(500px, calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 100px)) !important;
    max-height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 100px) !important;
    overflow: hidden;
    transform: none !important;
    transition: opacity .2s ease;
  }

  html.ios-chatbot-viewport #chatbot-window.chatbot-premium-panel.keyboard-open {
    top: calc(var(--chatbot-viewport-offset-top, 0px) + env(safe-area-inset-top) + 8px) !important;
    right: max(6px, env(safe-area-inset-right)) !important;
    bottom: auto !important;
    left: max(6px, env(safe-area-inset-left)) !important;
    width: auto !important;
    height: max(0px, calc(var(--chatbot-viewport-height, 100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px)) !important;
    max-height: max(0px, calc(var(--chatbot-viewport-height, 100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px)) !important;
    min-height: 0 !important;
  }

  html.ios-chatbot-viewport #chatbot-window #chatbot-input,
  html.ios-chatbot-viewport #chatbot-window .chatbot-enquiry-form input,
  html.ios-chatbot-viewport #chatbot-window .chatbot-enquiry-form select,
  html.ios-chatbot-viewport #chatbot-window .chatbot-enquiry-form textarea {
    font-size: 16px !important;
  }

  html.ios-chatbot-viewport #chatbot-messages {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 600px) and (hover: hover) {
  #chatbot-button.chatbot-launcher:hover {
    animation-play-state: paused;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(52, 120, 246, .55) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #chatbot-button.chatbot-launcher,
  #chatbot-button.chatbot-launcher::before,
  #chatbot-button.chatbot-launcher::after,
  #chatbot-button .chatbot-notification,
  #chatbot-messages .chatbot-message,
  #chatbot-messages .chatbot-quick-replies,
  #chatbot-messages .chatbot-typing span {
    animation: none !important;
  }

  #chatbot-button.chatbot-launcher,
  #chatbot-window.chatbot-premium-panel {
    transition: none !important;
  }
}
