/* Spaxio chat widget — navy/grey, mobile full-screen at max-width 640px */
#spaxio-chat-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99990;
  font-family: Arial, Helvetica, sans-serif;
  color: #233365;
  width: auto;
  max-width: none;
  pointer-events: none;
}
#spaxio-chat-root,
#spaxio-chat-root * {
  box-sizing: border-box;
}
#spaxio-chat-root button,
#spaxio-chat-root input,
#spaxio-chat-root textarea,
#spaxio-chat-root a {
  pointer-events: auto;
}

#spaxio-chat-bubble {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: #233365;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(35, 51, 101, 0.35);
  padding: 0;
  margin: 0;
  font-size: 16px;
  line-height: 1;
}
#spaxio-chat-bubble:focus {
  outline: 2px solid #307AB7;
  outline-offset: 2px;
}
#spaxio-chat-bubble svg {
  width: 26px;
  height: 26px;
  fill: #fff;
  display: block;
}

#spaxio-chat-panel {
  pointer-events: auto;
  display: none;
  flex-direction: column;
  position: absolute;
  right: 0;
  bottom: 68px;
  width: 360px;
  max-width: calc(100vw - 24px);
  height: 480px;
  max-height: calc(100vh - 96px);
  background: #fff;
  border: 1px solid #d5dae3;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(35, 51, 101, 0.22);
  overflow: hidden;
  overflow-x: hidden;
}
#spaxio-chat-root.is-open #spaxio-chat-panel {
  display: flex;
}

#spaxio-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #233365;
  color: #fff;
  padding: 10px 12px;
  min-height: 52px;
  flex: 0 0 auto;
}
#spaxio-chat-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}
#spaxio-chat-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  color: #c9d2e4;
}
#spaxio-chat-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}
#spaxio-chat-close:focus {
  outline: 2px solid #307AB7;
}

#spaxio-chat-log {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  background: #f4f5f7;
  -webkit-overflow-scrolling: touch;
}
.spaxio-msg {
  max-width: 100%;
  margin: 0 0 10px;
  display: flex;
}
.spaxio-msg--visitor {
  justify-content: flex-end;
}
.spaxio-msg--bot,
.spaxio-msg--spaxio,
.spaxio-msg--system {
  justify-content: flex-start;
}
.spaxio-msg__bubble {
  max-width: 85%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
}
.spaxio-msg--visitor .spaxio-msg__bubble {
  background: #233365;
  color: #fff;
  border-bottom-right-radius: 3px;
}
.spaxio-msg--bot .spaxio-msg__bubble,
.spaxio-msg--spaxio .spaxio-msg__bubble {
  background: #fff;
  color: #233365;
  border: 1px solid #d5dae3;
  border-bottom-left-radius: 3px;
}
.spaxio-msg--spaxio .spaxio-msg__bubble {
  border-color: #307AB7;
}
.spaxio-msg--system .spaxio-msg__bubble {
  background: transparent;
  border: 0;
  color: #5a6478;
  font-size: 14px;
  padding: 4px 0;
  max-width: 100%;
}

#spaxio-chat-form {
  flex: 0 0 auto;
  border-top: 1px solid #d5dae3;
  background: #fff;
  padding: 8px 10px 6px;
  width: 100%;
  max-width: 100%;
}
#spaxio-chat-form .spaxio-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}
#spaxio-chat-input,
#spaxio-chat-email {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-size: 16px;
  line-height: 1.4;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid #c5cad3;
  border-radius: 8px;
  color: #233365;
  background: #fff;
  resize: none;
  font-family: inherit;
}
#spaxio-chat-send {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #233365;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
#spaxio-chat-send:disabled {
  opacity: 0.6;
  cursor: default;
}
#spaxio-chat-send:focus,
#spaxio-chat-input:focus,
#spaxio-chat-email:focus {
  outline: 2px solid #307AB7;
  outline-offset: 1px;
}

/* Hidden honeypot: not visible, not in tab order visually but present in DOM */
#spaxio-chat-honey {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#spaxio-chat-privacy {
  margin: 6px 2px 2px;
  font-size: 13px;
  line-height: 1.35;
  color: #5a6478;
  max-width: 100%;
}
#spaxio-chat-privacy a {
  color: #233365;
  text-decoration: underline;
}

@media (max-width: 640px) {
  #spaxio-chat-root {
    right: 0;
    bottom: 0;
    left: 0;
    top: auto;
    width: 100%;
    max-width: 100%;
  }
  #spaxio-chat-root:not(.is-open) {
    right: 12px;
    bottom: 12px;
    left: auto;
    width: auto;
  }
  #spaxio-chat-root.is-open #spaxio-chat-bubble {
    display: none;
  }
  #spaxio-chat-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100%;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
    bottom: 0;
  }
  .spaxio-msg__bubble {
    max-width: 90%;
  }
}


/* Homepage inline chat (large box on #sx-help). Navy/grey/blue only — no product colours. */
.sx-help-chat {
  width: 100%;
  max-width: 820px;
  min-width: 0;
  margin: 0 0 8px;
  background: #fff;
  border: 1px solid #d5dae3;
  border-radius: 12px;
  overflow: hidden;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  max-height: 560px;
  color: #233365;
  box-sizing: border-box;
}
.sx-help-chat,
.sx-help-chat * { box-sizing: border-box; }
.sx-help-chat #spaxio-chat-log {
  flex: 1 1 auto;
  min-height: 200px;
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px;
  background: #f4f5f7;
  -webkit-overflow-scrolling: touch;
}
.sx-help-chat #spaxio-chat-form {
  flex: 0 0 auto;
  border-top: 1px solid #d5dae3;
  background: #fff;
  padding: 10px 10px 8px;
  width: 100%;
  max-width: 100%;
}
.sx-help-chat .spaxio-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}
.sx-help-chat #spaxio-chat-input,
.sx-help-chat #spaxio-chat-email {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-size: 16px;
  line-height: 1.4;
  padding: 10px 12px;
  min-height: 72px;
  border: 1px solid #c5cad3;
  border-radius: 8px;
  color: #233365;
  background: #fff;
  resize: none;
  font-family: inherit;
}
.sx-help-chat #spaxio-chat-email {
  min-height: 44px;
  margin-top: 8px;
  display: block;
}
.sx-help-chat #spaxio-chat-send {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #307AB7;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.sx-help-chat #spaxio-chat-send:hover,
.sx-help-chat #spaxio-chat-send:focus {
  background: #233365;
  color: #fff;
  outline: 2px solid #307AB7;
  outline-offset: 1px;
}
.sx-help-chat #spaxio-chat-input:focus,
.sx-help-chat #spaxio-chat-email:focus {
  outline: 2px solid #307AB7;
  outline-offset: 1px;
}
.sx-help-chat .spaxio-hint,
.sx-help-chat #spaxio-chat-privacy {
  margin: 8px 2px 2px;
  font-size: 13px;
  line-height: 1.35;
  color: #5a6478;
  max-width: 100%;
}
.sx-help-chat #spaxio-chat-privacy a {
  color: #233365;
  text-decoration: underline;
}
.sx-help-chat #spaxio-chat-honey {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.sx-help-chat .spaxio-msg { max-width: 100%; margin: 0 0 10px; display: flex; }
.sx-help-chat .spaxio-msg--visitor { justify-content: flex-end; }
.sx-help-chat .spaxio-msg--bot,
.sx-help-chat .spaxio-msg--spaxio,
.sx-help-chat .spaxio-msg--system { justify-content: flex-start; }
.sx-help-chat .spaxio-msg__bubble {
  max-width: 85%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
}
.sx-help-chat .spaxio-msg--visitor .spaxio-msg__bubble {
  background: #233365;
  color: #fff;
  border-bottom-right-radius: 3px;
}
.sx-help-chat .spaxio-msg--bot .spaxio-msg__bubble,
.sx-help-chat .spaxio-msg--spaxio .spaxio-msg__bubble {
  background: #fff;
  color: #233365;
  border: 1px solid #d5dae3;
  border-bottom-left-radius: 3px;
}

@media (max-width: 640px) {
  .sx-help { margin-bottom: 96px; padding-bottom: 12px; }
  .sx-help-chat {
    min-height: 300px;
    max-height: none;
  }
  .sx-help-chat #spaxio-chat-log {
    min-height: 220px;
    max-height: 320px;
  }
  .sx-help-chat .spaxio-row {
    flex-wrap: wrap;
  }
  .sx-help-chat #spaxio-chat-send {
    width: 100%;
    height: 48px;
  }
  .sx-help-chat .spaxio-msg__bubble { max-width: 90%; }
}


/* RTL: keep honeypot off-canvas without sideways scroll (steady 2026-11-23) */
html[dir=rtl] #spaxio-chat-honey{left:auto!important;right:-10000px!important}
