/* ==========================================================================
   Chat assistant: layout and behaviour.
   Colours, fonts and shapes come from the theme block at the end of this file.
   ========================================================================== */
.cbx, .cbx *, .cbx *::before, .cbx *::after { box-sizing: border-box; }
.cbx [hidden] { display: none !important; }
.cbx { font-family: var(--cb-font); font-size: 16px; line-height: 1.45; color: var(--cb-ink); }
.cbx button, .cbx input, .cbx textarea { font-family: inherit; }
.cbx-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.cbx-hp { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* the button, beside the WhatsApp button (its place is measured by chat.js) */
.cbx-launch {
  position: fixed; z-index: 45;
  right: var(--cbx-right, 76px); bottom: var(--cbx-bottom, 14px);
  min-height: var(--cbx-h, 52px); min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 18px 0 15px; margin: 0;
  max-width: calc(100vw - 28px);
  font: 700 1rem/1 var(--cb-display);
  background: var(--cb-launch-bg); color: var(--cb-launch-ink);
  border: var(--cb-launch-border, 0); border-radius: var(--cb-launch-radius);
  box-shadow: var(--cb-launch-shadow);
  text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cbx-launch:hover { background: var(--cb-launch-hover-bg); color: var(--cb-launch-hover-ink); }
.cbx-launch:focus-visible { outline: 3px solid var(--cb-focus); outline-offset: 4px; }
.cbx-launch .cbx-ico { width: 22px; height: 22px; }
.cbx-launch--link { right: 76px; }
.cbx-launch-t { white-space: nowrap; }

/* the window */
.cbx-panel {
  position: fixed; z-index: 1000;
  right: var(--cbx-edge, 14px);
  bottom: calc(var(--cbx-bottom, 14px) + var(--cbx-h, 52px) + 12px);
  width: min(396px, calc(100vw - 28px));
  height: min(640px, calc(100vh - var(--cbx-bottom, 14px) - var(--cbx-h, 52px) - 28px));
  height: min(640px, calc(100dvh - var(--cbx-bottom, 14px) - var(--cbx-h, 52px) - 28px));
  display: flex; flex-direction: column;
  background: var(--cb-bg); color: var(--cb-ink);
  border: var(--cb-panel-border); border-radius: var(--cb-radius);
  box-shadow: var(--cb-panel-shadow);
  overflow: hidden;
}
.cbx-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; background: var(--cb-head-bg); color: var(--cb-head-ink); }
.cbx-head:focus { outline: none; }
.cbx-head-t { flex: 1 1 auto; min-width: 0; }
.cbx-title { margin: 0; font: 700 1.1875rem/1.2 var(--cb-display); color: inherit; letter-spacing: var(--cb-title-track, 0); }
.cbx-sub { margin: 3px 0 0; font: 400 .6875rem/1.2 var(--cb-mono); letter-spacing: .08em; text-transform: uppercase; color: inherit; }
.cbx-hbtn { flex: none; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; font-size: .875rem; font-weight: 700; color: inherit; background: transparent; border: 1.5px solid currentColor; border-radius: var(--cb-btn-radius); cursor: pointer; }
.cbx-hbtn:hover { background: var(--cb-head-hover-bg); color: var(--cb-head-hover-ink); border-color: var(--cb-head-hover-bg); }
.cbx-hbtn:focus-visible { outline: 3px solid var(--cb-head-focus); outline-offset: 2px; }
.cbx-close { padding: 0; }
.cbx-note { flex: none; margin: 0; padding: 8px 16px; font-size: .8125rem; line-height: 1.4; color: var(--cb-ink2); background: var(--cb-note-bg); border-bottom: 1px solid var(--cb-line-soft); }

.cbx-log { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 12px; background: var(--cb-log-bg, transparent); }
.cbx-log:focus-visible { outline: 3px solid var(--cb-focus); outline-offset: -3px; }
.cbx-msg { max-width: 94%; min-width: 0; }
.cbx-me { align-self: flex-end; }
.cbx-bot { align-self: flex-start; }
.cbx-bubble { padding: 10px 12px; overflow-wrap: anywhere; border: var(--cb-bubble-border); border-radius: var(--cb-bubble-radius); }
.cbx-me .cbx-bubble { background: var(--cb-me-bg); color: var(--cb-me-ink); }
.cbx-bot .cbx-bubble { background: var(--cb-bot-bg); color: var(--cb-bot-ink); box-shadow: var(--cb-bot-shadow, none); }
.cbx-caution { margin: 0 0 8px; padding: 6px 8px; font-size: .8125rem; font-style: italic; background: var(--cb-caution-bg); border-left: 4px solid var(--cb-accent); }
.cbx-h { margin: 0 0 4px; font: 700 1rem/1.3 var(--cb-display); }
.cbx-text p { margin: 0 0 .5em; }
.cbx-text > :last-child { margin-bottom: 0; }
.cbx-ul { margin: 0 0 .5em; padding-left: 1.2em; }
.cbx-ul li { margin: 0 0 .15em; }
.cbx-src { margin: 10px 0 0; display: flex; flex-direction: column; gap: 0; font-size: .875rem; }
.cbx-where { font: 400 .6875rem/1.4 var(--cb-mono); letter-spacing: .02em; color: var(--cb-ink2); }
.cbx-link { display: inline-block; padding: 5px 0; font-weight: 700; color: var(--cb-link); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em; text-decoration-color: var(--cb-accent); }
.cbx-link:hover { color: var(--cb-link-hover); }
.cbx-link:focus-visible, .cbx-act:focus-visible, .cbx-chip:focus-visible, .cbx-cancel:focus-visible, .cbx-send:focus-visible { outline: 3px solid var(--cb-focus); outline-offset: 2px; }
.cbx-also { margin: 6px 0 0; font-size: .8125rem; color: var(--cb-ink2); }
.cbx-also-t { font-weight: 700; }

.cbx-chip-t { margin: 12px 0 6px; font: 400 .6875rem/1.3 var(--cb-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--cb-ink2); }
.cbx-first .cbx-chip-t { margin-top: 10px; }
.cbx-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cbx-chip { min-height: 44px; padding: 8px 12px; text-align: left; font-size: .875rem; line-height: 1.25; color: var(--cb-ink); background: var(--cb-chip-bg); border: 1.5px solid var(--cb-line); border-radius: var(--cb-chip-radius); cursor: pointer; }
.cbx-chip:hover { background: var(--cb-chip-hover-bg); color: var(--cb-chip-hover-ink); }

.cbx-contact { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--cb-line); }
.cbx-contact-t { margin: 0 0 6px; font: 700 .875rem/1.3 var(--cb-display); }
.cbx-acts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cbx-act { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; font: 700 .875rem/1 var(--cb-display); color: var(--cb-act-ink); background: var(--cb-act-bg); border: 1.5px solid var(--cb-line); border-radius: var(--cb-btn-radius); text-decoration: none; cursor: pointer; }
.cbx-act:hover { background: var(--cb-act-hover-bg); color: var(--cb-act-hover-ink); }
.cbx-act--wa { background: var(--cb-wa-bg); color: var(--cb-wa-ink); }
.cbx-act--wa:hover { background: var(--cb-act-hover-bg); color: var(--cb-act-hover-ink); }
.cbx-fine { margin: 6px 0 0; font-size: .75rem; color: var(--cb-ink2); }

.cbx-think { font-style: italic; }
.cbx-dots { display: inline-block; margin-left: 1px; letter-spacing: 2px; }

.cbx-ask { flex: none; display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--cb-bg); border-top: var(--cb-rule-top); }
.cbx-input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 12px; font-size: 1rem; color: var(--cb-ink); background: var(--cb-input-bg); border: 1.5px solid var(--cb-line); border-radius: var(--cb-btn-radius); }
.cbx-input::placeholder, .cbx-field textarea::placeholder { color: var(--cb-ink2); opacity: 1; }
.cbx-input:focus-visible, .cbx-field input:focus-visible, .cbx-field textarea:focus-visible { outline: 3px solid var(--cb-focus); outline-offset: 1px; }
.cbx-send { flex: none; min-height: 44px; padding: 0 16px; font: 700 1rem/1 var(--cb-display); color: var(--cb-send-ink); background: var(--cb-send-bg); border: 1.5px solid var(--cb-send-line); border-radius: var(--cb-btn-radius); cursor: pointer; }
.cbx-send:hover:not(:disabled) { background: var(--cb-send-hover-bg); color: var(--cb-send-hover-ink); }
.cbx-send:disabled { cursor: wait; opacity: .7; }

/* the message form takes the place of the log while it is open */
.cbx-panel.is-form .cbx-log { display: none; }
.cbx-lead { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px)); }
.cbx-lead-title { margin: 0 0 4px; font: 700 1.0625rem/1.3 var(--cb-display); }
.cbx-lead-title:focus { outline: none; }
.cbx-lead-intro { margin: 0 0 12px; font-size: .875rem; color: var(--cb-ink2); }
.cbx-field { margin: 0 0 12px; }
.cbx-field label { display: block; margin: 0 0 4px; font-size: .875rem; font-weight: 700; }
.cbx-req { font-weight: 400; color: var(--cb-ink2); }
.cbx-field input[type="text"], .cbx-field textarea { display: block; width: 100%; min-height: 44px; padding: 9px 10px; font-size: 1rem; line-height: 1.35; color: var(--cb-ink); background: var(--cb-input-bg); border: 1.5px solid var(--cb-line); border-radius: var(--cb-btn-radius); }
.cbx-field textarea { min-height: 96px; resize: vertical; }
.cbx-field--check { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 10px; align-items: start; }
.cbx-field--check input { width: 24px; height: 24px; margin: 9px 0 0; accent-color: var(--cb-accent-solid); }
.cbx-field--check label { margin: 0; padding: 6px 0; font-weight: 400; line-height: 1.4; }
.cbx-field--check label a { color: var(--cb-link); font-weight: 700; }
.cbx-field--check .cbx-err { grid-column: 2; }
.cbx-err { margin: 5px 0 0; padding-left: 8px; border-left: 4px solid var(--cb-error); font-size: .8125rem; font-weight: 700; line-height: 1.35; color: var(--cb-error); }
.cbx-field [aria-invalid="true"] { border-color: var(--cb-error); border-width: 2px; }
.cbx-form-error { margin: 0 0 12px; padding: 8px 10px; font-size: .875rem; font-weight: 700; line-height: 1.4; color: var(--cb-error); background: var(--cb-error-bg); border: 1.5px solid var(--cb-error); border-radius: var(--cb-btn-radius); }
.cbx-form-error .cbx-link { color: var(--cb-error); }
.cbx-lead-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cbx-cancel { min-height: 44px; padding: 0 16px; font: 700 .9375rem/1 var(--cb-display); color: var(--cb-ink); background: transparent; border: 1.5px solid var(--cb-line); border-radius: var(--cb-btn-radius); cursor: pointer; }
.cbx-cancel:hover { background: var(--cb-chip-hover-bg); color: var(--cb-chip-hover-ink); }

/* motion, only when the visitor has not asked for less */
@media (prefers-reduced-motion: no-preference) {
  .cbx-panel:not([hidden]) { animation: cbx-in .18s ease-out; }
  .cbx-msg { animation: cbx-msg .18s ease-out; }
  .cbx-launch, .cbx-chip, .cbx-act, .cbx-send, .cbx-hbtn { transition: background-color .14s, color .14s, border-color .14s; }
  .cbx-dots { animation: cbx-blink 1.1s ease-in-out infinite; }
}
@keyframes cbx-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cbx-msg { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes cbx-blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* phones and short screens: the window becomes the whole screen, on top of the page */
@media (max-width: 600px), (max-height: 520px) {
  .cbx-panel { top: var(--cbx-vt, 0px); right: 0; left: 0; bottom: auto; width: auto; height: var(--cbx-vh, 100vh); height: var(--cbx-vh, 100dvh); max-height: none; border-width: 0; border-radius: 0; box-shadow: none; }
  .cbx.is-open .cbx-launch { display: none; }
  .cbx-msg { max-width: 100%; }
  .cbx-head { padding-top: max(10px, env(safe-area-inset-top, 0px)); }
}
@media (max-width: 600px) {
  .cbx-launch { padding: 0 14px 0 12px; }
}
html.cbx-lock, html.cbx-lock body { overflow: hidden; }

@media print { .cbx { display: none !important; } }
@media (forced-colors: active) {
  .cbx-launch, .cbx-panel, .cbx-chip, .cbx-act, .cbx-send, .cbx-input, .cbx-hbtn, .cbx-bubble { border: 1px solid CanvasText; }
}

/* ==========================================================================
   Theme: this site's own colours, fonts and shapes.
   ========================================================================== */
.cbx {
  --cb-font: var(--f-text, "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  --cb-display: var(--f-display, "Anek Latin", "Atkinson Hyperlegible Next", system-ui, sans-serif);
  --cb-mono: var(--f-mono, "Martian Mono", "Anek Latin", ui-monospace, Menlo, Consolas, monospace);
  --cb-ink: #14212B;
  --cb-ink2: #46555F;
  --cb-bg: #F4F6F3;
  --cb-note-bg: #D6E0DD;
  --cb-line: rgba(20, 33, 43, .55);
  --cb-line-soft: rgba(20, 33, 43, .24);
  --cb-accent: #EE5A22;
  --cb-accent-solid: #B3340A;
  --cb-focus: #EE5A22;
  --cb-link: #14212B;
  --cb-link-hover: #B3340A;
  --cb-error: #B3340A;
  --cb-error-bg: #FBEDE6;
  --cb-radius: 14px;
  --cb-btn-radius: 10px;
  --cb-chip-radius: 22px;
  --cb-panel-border: 2px solid #14212B;
  --cb-panel-shadow: 0 18px 44px rgba(20, 33, 43, .32);
  --cb-launch-bg: #EE5A22;
  --cb-launch-ink: #14212B;
  --cb-launch-hover-bg: #14212B;
  --cb-launch-hover-ink: #F4F6F3;
  --cb-launch-radius: 26px;
  --cb-launch-shadow: 0 0 0 2px #F4F6F3, 0 8px 22px rgba(20, 33, 43, .28);
  --cb-head-bg: #1F4250;
  --cb-head-ink: #F4F6F3;
  --cb-head-hover-bg: #F4F6F3;
  --cb-head-hover-ink: #14212B;
  --cb-head-focus: #F4F6F3;
  --cb-me-bg: #D6E0DD;
  --cb-me-ink: #14212B;
  --cb-bot-bg: #FFFFFF;
  --cb-bot-ink: #14212B;
  --cb-bubble-border: 1.5px solid rgba(20, 33, 43, .55);
  --cb-bubble-radius: 12px;
  --cb-caution-bg: #FDF1EA;
  --cb-chip-bg: #FFFFFF;
  --cb-chip-hover-bg: #EE5A22;
  --cb-chip-hover-ink: #14212B;
  --cb-act-bg: #FFFFFF;
  --cb-act-ink: #14212B;
  --cb-act-hover-bg: #14212B;
  --cb-act-hover-ink: #F4F6F3;
  --cb-wa-bg: #14212B;
  --cb-wa-ink: #F4F6F3;
  --cb-input-bg: #FFFFFF;
  --cb-send-bg: #EE5A22;
  --cb-send-ink: #14212B;
  --cb-send-line: #14212B;
  --cb-send-hover-bg: #14212B;
  --cb-send-hover-ink: #F4F6F3;
  --cb-rule-top: 1.5px solid #14212B;
}
.cbx-launch .cbx-ico { color: #14212B; }
.cbx-launch:hover .cbx-ico { color: #EE5A22; }
.cbx-title { font-stretch: 104%; }
