/* Home-page enquiry assistant. All styles are isolated to these two IDs. */
#bits-enquiry-launcher {
  position: fixed; right: 24px; bottom: 88px; z-index: 1040;
  display: flex; align-items: center; gap: 9px; padding: 13px 18px;
  border: 0; border-radius: 28px; background: var(--purple, #483493);
  color: #fff; font: 600 14px/1.4 var(--font-body, sans-serif);
  box-shadow: 0 4px 20px #29204426; cursor: pointer;
}
#bits-enquiry-launcher i { font-size: 21px; }
#bits-enquiry-launcher:hover { background: var(--purple-dark, #352270); }
#bits-enquiry-launcher:focus-visible { outline: 3px solid var(--orange, #f26522); outline-offset: 4px; }
#bits-enquiry-chat {
  position: fixed; right: 24px; bottom: 150px; z-index: 1045;
  width: min(390px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 170px));
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #e4dff1; border-radius: 20px; background: #fff;
  box-shadow: 0 12px 48px #29204433; color: #292044;
  font: 14px/1.55 var(--font-body, sans-serif);
}
#bits-enquiry-launcher[hidden], #bits-enquiry-chat[hidden], #bits-enquiry-chat [hidden] { display: none !important; }
#bits-enquiry-chat * { box-sizing: border-box; }
#bits-enquiry-chat .bits-chat-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px; flex-shrink: 0; background: var(--purple, #483493); color: #fff;
}
#bits-enquiry-chat .bits-chat-header h2 { margin: 0; font: 600 17px/1.4 var(--font-body, sans-serif); color: #fff; }
#bits-enquiry-chat .bits-chat-progress { margin: 3px 0 0; font-size: 12px; color: #eee9fa; }
#bits-enquiry-chat button { font: inherit; cursor: pointer; }
#bits-enquiry-chat .bits-chat-close { border: 0; background: transparent; color: #fff; width: 36px; height: 36px; font-size: 26px; }
#bits-enquiry-chat .bits-chat-messages { padding: 18px; overflow: auto; min-height: 80px; flex: 1 1 auto; background: #faf9fd; }
#bits-enquiry-chat .bits-chat-bubble { margin: 0 28px 12px 0; padding: 10px 13px; border-radius: 12px 12px 12px 3px; background: #ede9f7; overflow-wrap: anywhere; white-space: pre-wrap; }
#bits-enquiry-chat .bits-chat-customer { margin-right: 0; margin-left: 28px; border-radius: 12px 12px 3px 12px; background: #fff; border: 1px solid #e6e0f0; }
#bits-enquiry-chat .bits-chat-form { padding: 14px 18px; border-top: 1px solid #e6e0f0; flex-shrink: 0; }
#bits-enquiry-chat label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 13px; }
#bits-enquiry-chat input, #bits-enquiry-chat select, #bits-enquiry-chat textarea {
  display: block; width: 100%; padding: 10px 11px; border: 1px solid #cfc7df;
  border-radius: 9px; background: #fff; color: #292044; font: inherit;
}
#bits-enquiry-chat textarea { resize: vertical; max-height: 110px; }
#bits-enquiry-chat :focus-visible { outline: 2px solid var(--orange, #f26522); outline-offset: 2px; }
#bits-enquiry-chat .bits-chat-status { min-height: 18px; margin: 6px 0; font-size: 12px; color: #a12b20; }
#bits-enquiry-chat .bits-chat-actions { display: flex; gap: 8px; align-items: center; }
#bits-enquiry-chat .bits-chat-next { margin-left: auto; padding: 9px 14px; border: 0; border-radius: 9px; background: var(--purple, #483493); color: #fff; font-weight: 600; }
#bits-enquiry-chat .bits-chat-back, #bits-enquiry-chat .bits-chat-skip, #bits-enquiry-chat .bits-chat-restart { padding: 8px 10px; border: 1px solid #cfc7df; border-radius: 9px; background: #fff; color: #483493; }
#bits-enquiry-chat button:disabled { opacity: .65; cursor: wait; }
#bits-enquiry-chat .bits-chat-review { padding: 14px; margin: 0 0 12px; border: 1px solid #e6e0f0; border-radius: 12px; background: #fff; }
#bits-enquiry-chat .bits-chat-review dt { font-size: 12px; color: #6b627b; font-weight: 600; }
#bits-enquiry-chat .bits-chat-review dd { margin: 0 0 10px; overflow-wrap: anywhere; white-space: pre-wrap; }
#bits-enquiry-chat .bits-chat-review dd:last-child { margin-bottom: 0; }
#bits-enquiry-chat .bits-chat-note { margin: 9px 0 0; color: #746c80; font-size: 11px; }
@media (max-width: 575.98px) {
  #bits-enquiry-launcher { right: 16px; bottom: 74px; padding: 11px 15px; }
  #bits-enquiry-chat { right: 16px; bottom: 132px; max-height: calc(100dvh - 148px); }
  #bits-enquiry-chat input, #bits-enquiry-chat select, #bits-enquiry-chat textarea { font-size: 16px; }
}
/* Site-wide sticky assistant refresh. */
#bits-enquiry-launcher {
  right:24px; bottom:88px; padding:12px 19px; gap:10px;
  background:linear-gradient(135deg, #483493, #35236f);
  box-shadow:0 7px 24px #29204430;
  transition:transform .2s ease, box-shadow .2s ease;
}
#bits-enquiry-launcher:hover { transform:translateY(-3px); box-shadow:0 10px 28px #29204442; }
#bits-enquiry-launcher[aria-expanded="true"] { background:#35236f; }
#bits-enquiry-chat {
  bottom:150px; width:min(410px,calc(100vw - 32px));
  height:min(610px,calc(100dvh - 170px)); max-height:calc(100dvh - 170px);
  border-radius:20px; box-shadow:0 16px 56px #21194735;
  animation:bitsChatReveal .22s ease-out; transform-origin:bottom right;
}
#bits-enquiry-chat .bits-chat-header { padding:17px 19px; background:linear-gradient(125deg,#483493,#35236f); }
#bits-enquiry-chat .bits-chat-header h2 { font-size:16px; letter-spacing:.1px; }
#bits-enquiry-chat .bits-chat-close { border-radius:50%; background:#ffffff14; flex-shrink:0; margin-left:12px; }
#bits-enquiry-chat .bits-chat-close:hover { background:#ffffff28; }
#bits-enquiry-chat .bits-chat-messages { padding:19px; scrollbar-width:thin; scrollbar-color:#c5bbdf transparent; }
#bits-enquiry-chat .bits-chat-bubble { border-radius:14px 14px 14px 4px; background:#eeebf8; padding:11px 14px; }
#bits-enquiry-chat .bits-chat-customer { background:#fff; border-radius:14px 14px 4px 14px; }
#bits-enquiry-chat .bits-chat-bubble:last-of-type { animation:bitsChatMessage .18s ease-out; }
#bits-enquiry-chat .bits-chat-form { padding:15px 19px; background:#fff; }
#bits-enquiry-chat .bits-chat-field label { color:#483b62; }
#bits-enquiry-chat input,#bits-enquiry-chat select,#bits-enquiry-chat textarea { border-radius:10px; min-height:43px; }
#bits-enquiry-chat .bits-chat-actions { flex-wrap:wrap; }
#bits-enquiry-chat .bits-chat-next { min-height:41px; padding:10px 17px; border-radius:10px; transition:background .18s ease; }
#bits-enquiry-chat .bits-chat-next:hover { background:#35236f; }
#bits-enquiry-chat .bits-chat-secure {
  width:100%; border:1px solid #483493; border-radius:10px; padding:10px;
  background:#f0edf8; color:#35236f; margin:0 0 6px; font-weight:600;
}
#bits-enquiry-chat .bits-chat-status { line-height:1.5; }
#bits-enquiry-chat .bits-chat-note { line-height:1.5; }
#bits-enquiry-chat .bits-chat-review { padding:15px; }
#bits-enquiry-chat .bits-chat-review dt { margin:0 0 2px; }
#bits-enquiry-chat .bits-chat-review dd { font-size:14px; margin-bottom:12px; }
@keyframes bitsChatReveal { from { opacity:0; transform:translateY(14px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes bitsChatMessage { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:575.98px) {
  #bits-enquiry-launcher { right:16px; bottom:74px; padding:11px 16px; }
  #bits-enquiry-chat { right:12px; bottom:132px; width:calc(100vw - 24px); height:min(610px,calc(100dvh - 148px)); max-height:calc(100dvh - 148px); }
  #bits-enquiry-chat .bits-chat-header,#bits-enquiry-chat .bits-chat-form { padding:13px 15px; }
  #bits-enquiry-chat .bits-chat-messages { padding:15px; }
}
@media(prefers-reduced-motion:reduce) {
  #bits-enquiry-chat,#bits-enquiry-chat .bits-chat-bubble:last-of-type { animation:none; }
  #bits-enquiry-launcher,#bits-enquiry-chat .bits-chat-next { transition:none; }
}
@media(max-height:540px) {
  #bits-enquiry-chat { top:12px; bottom:12px; height:auto; max-height:none; }
  #bits-enquiry-chat .bits-chat-messages { min-height:0; }
  #bits-enquiry-chat .bits-chat-header { padding:10px 15px; }
  #bits-enquiry-chat .bits-chat-form { padding:10px 15px; }
}

/* Colourful chatbot launcher. Presentation only; chat logic is unchanged. */
#bits-enquiry-launcher {
  min-height:68px; padding:8px 21px 8px 9px; gap:12px;
  border:2px solid #fff; border-radius:38px;
  background:linear-gradient(120deg,#6743c5 0%,#4d2f9c 52%,#35216d 100%);
  color:#fff; box-shadow:0 7px 24px #3b246b38,0 0 0 3px #f4772b1c;
  isolation:isolate; text-align:left;
}
#bits-enquiry-launcher::before {
  content:""; position:absolute; inset:-6px; border:2px solid #f4772b;
  border-radius:44px; pointer-events:none; opacity:0;
  animation:bitsLauncherRing 2.2s ease-out 3;
}
#bits-enquiry-launcher .bits-launcher-avatar {
  display:grid; place-items:center; width:48px; height:48px; flex:0 0 48px;
  border:3px solid #ffad62; border-radius:50%; background:#fff;
  box-shadow:0 2px 8px #21194720;
}
#bits-enquiry-launcher .bits-launcher-avatar svg { display:block; width:36px; height:36px; }
#bits-enquiry-launcher .bits-launcher-copy { display:flex; flex-direction:column; gap:2px; }
#bits-enquiry-launcher .bits-launcher-copy strong { font:700 18px/1.2 var(--font-body,sans-serif); letter-spacing:.1px; color:#fff; }
#bits-enquiry-launcher .bits-launcher-copy>span { font:500 11px/1.3 var(--font-body,sans-serif); color:#f1eaff; letter-spacing:.15px; }
#bits-enquiry-launcher .bits-launcher-spark {
  position:absolute; top:-8px; right:13px; display:grid; place-items:center;
  width:25px; height:25px; border:2px solid #fff; border-radius:50%;
  background:#f4772b; color:#fff; font-size:15px; line-height:1;
}
#bits-enquiry-launcher:hover { background:linear-gradient(120deg,#7650d4,#4b2b96); box-shadow:0 10px 28px #3b246b48,0 0 0 3px #f4772b2b; }
#bits-enquiry-launcher[aria-expanded="true"] { background:linear-gradient(120deg,#5635ac,#35216d); }
#bits-enquiry-launcher[aria-expanded="true"]::before { animation:none; }
#bits-enquiry-chat { bottom:174px; height:min(610px,calc(100dvh - 194px)); max-height:calc(100dvh - 194px); }
@keyframes bitsLauncherRing { 0%{opacity:.65;transform:scale(.97);} 75%,100%{opacity:0;transform:scale(1.09);} }
@media(max-width:575.98px) {
  #bits-enquiry-launcher { min-height:60px; padding:6px 17px 6px 7px; gap:10px; }
  #bits-enquiry-launcher .bits-launcher-avatar { width:42px; height:42px; flex-basis:42px; }
  #bits-enquiry-launcher .bits-launcher-avatar svg { width:32px; height:32px; }
  #bits-enquiry-launcher .bits-launcher-copy strong { font-size:16px; }
  #bits-enquiry-launcher .bits-launcher-copy>span { font-size:10px; }
  #bits-enquiry-chat { bottom:150px; height:min(610px,calc(100dvh - 166px)); max-height:calc(100dvh - 166px); }
}
@media(max-height:540px) { #bits-enquiry-chat { top:12px; bottom:12px; height:auto; max-height:none; } }
@media(prefers-reduced-motion:reduce) { #bits-enquiry-launcher::before { animation:none; } }

#bits-enquiry-chat .bits-chat-status[data-kind="info"] { color:#483493; padding:9px 11px; background:#f1edf9; border-radius:8px; }
