/* Appointment Desk - "Chat with us". Colours are variables.
   The launcher is navy on purpose, so it never looks like the site's orange "Book Appointment" button. */
.cxc{
	--cxc-brand:var(--apd-brand,#0d3f74);--cxc-brand2:var(--apd-brand-2,#14549a);--cxc-a1:var(--apd-accent,#f78636);--cxc-a2:var(--apd-accent-2,#de2e5b);--cxc-grad:linear-gradient(135deg,var(--cxc-a1),var(--cxc-a2));
	--cxc-fab:var(--apd-brand,#0d3f74);--cxc-green:#22c55e;
	--cxc-ink:#0b1626;--cxc-text:#334155;--cxc-muted:#64748b;--cxc-line:#e3e9f1;--cxc-soft:#f2f6fb;
	--cxc-ease:cubic-bezier(.22,1,.36,1);--cxc-right:20px;--cxc-bottom:20px;--cxc-mobile-bottom:92px;
	position:fixed;right:var(--cxc-right);bottom:var(--cxc-bottom);z-index:99990;font-family:"Manrope",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;font-size:16px;line-height:1.45;color:var(--cxc-text);-webkit-font-smoothing:antialiased
}
.cxc *,.cxc *::before,.cxc *::after{box-sizing:border-box}
.cxc svg{display:block;flex:none}
.cxc button{font:inherit;cursor:pointer}
.cxc-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important}

/* Launcher: small navy pill */
.cxc-fab{position:relative;display:flex;align-items:center;gap:8px;height:46px;padding:0 16px 0 6px;border:2px solid #fff;border-radius:999px;background:var(--cxc-fab);color:#fff;box-shadow:0 12px 26px -10px rgba(var(--apd-brand-rgb,13,63,116),.6),0 2px 6px rgba(0,0,0,.1);transition:transform .3s var(--cxc-ease),box-shadow .3s,background .2s}
.cxc-fab:hover{transform:translateY(-2px);background:var(--cxc-brand2)}
.cxc-fab:focus-visible{outline:3px solid rgba(var(--apd-accent-rgb,247,134,54),.6);outline-offset:3px}
.cxc-fab__i{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.16)}
.cxc-fab__i svg{width:19px;height:19px}
.cxc-fab__label{font-weight:800;font-size:14px;white-space:nowrap}
.cxc-fab__dot{position:absolute;top:-2px;right:-2px;width:13px;height:13px;border-radius:50%;background:var(--cxc-green);border:2px solid #fff;animation:cxcPulse 2.4s ease-out infinite}
.cxc.is-open .cxc-fab__dot{display:none}
@keyframes cxcPulse{0%{box-shadow:0 0 0 0 rgba(34,197,94,.55)}70%,100%{box-shadow:0 0 0 9px rgba(34,197,94,0)}}

/* Hint bubble */
.cxc-teaser{position:absolute;right:0;bottom:58px;width:240px;padding:12px 34px 12px 14px;border-radius:16px 16px 4px 16px;background:#fff;border:1px solid var(--cxc-line);box-shadow:0 18px 40px -16px rgba(8,31,58,.4);cursor:pointer;opacity:0;transform:translateY(8px) scale(.97);transform-origin:bottom right;transition:opacity .35s,transform .45s var(--cxc-ease)}
.cxc-teaser.is-in{opacity:1;transform:none}
.cxc-teaser p{margin:0;font-weight:700;color:var(--cxc-ink);font-size:14.5px}
.cxc-teaser__x{position:absolute;top:8px;right:8px;width:22px;height:22px;padding:3px;border:0;border-radius:50%;background:var(--cxc-soft);color:var(--cxc-muted)}
.cxc-teaser__x svg{width:16px;height:16px}

/* Panel */
.cxc-panel{position:absolute;right:0;bottom:60px;width:380px;height:min(640px,calc(100vh - 100px));display:flex;flex-direction:column;border-radius:22px;background:#fff;box-shadow:0 40px 80px -30px rgba(8,31,58,.55),0 0 0 1px rgba(8,31,58,.06);overflow:hidden;opacity:0;transform:translateY(16px) scale(.97);transform-origin:bottom right;transition:opacity .28s ease,transform .45s var(--cxc-ease)}
.cxc-panel.is-in{opacity:1;transform:none}
.cxc-panel[hidden]{display:none}
.cxc-head{display:flex;align-items:center;gap:12px;padding:14px 12px 14px 16px;background:linear-gradient(135deg,var(--apd-brand,#0d3f74),var(--apd-brand-2,#14549a));color:#fff}
.cxc-head__av{position:relative;flex:none;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#fff;color:var(--cxc-a2)}
.cxc-head__av img{width:32px;height:32px;object-fit:contain}
.cxc-head__av i{position:absolute;right:0;bottom:1px;width:12px;height:12px;border-radius:50%;background:var(--cxc-green);box-shadow:0 0 0 2px #0f4783}
.cxc-head__t{flex:1;min-width:0}
.cxc-head__t strong{display:block;font-size:16px;font-weight:800}
.cxc-head__t span{display:block;font-size:13px;color:#cfe0f3}
.cxc-icon{display:grid;place-items:center;width:42px;height:42px;border:0;border-radius:12px;background:rgba(255,255,255,.12);color:#fff;text-decoration:none;transition:background .2s}
.cxc-icon:hover{background:rgba(255,255,255,.22);color:#fff}
.cxc-icon svg{width:20px;height:20px}

.cxc-body{flex:1;overflow-y:auto;padding:16px 14px 8px;display:flex;flex-direction:column;gap:10px;scroll-behavior:smooth;background:#f7f9fc}
/* Conversation sits at the bottom, next to the answer box (like WhatsApp); older messages scroll up. */
.cxc-body>:first-child{margin-top:auto}
.cxc-msg{max-width:88%;padding:11px 15px;border-radius:18px;font-size:16px;line-height:1.45;word-wrap:break-word}
.cxc-msg.is-new{animation:cxcIn .4s var(--cxc-ease) both}
@keyframes cxcIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
.cxc-msg--bot{align-self:flex-start;background:#fff;color:var(--cxc-ink);border:1px solid var(--cxc-line);border-bottom-left-radius:6px}
.cxc-msg--me{align-self:flex-end;background:var(--cxc-brand);color:#fff;border-bottom-right-radius:6px;font-weight:600}
.cxc-msg--err{background:#fff4f2;border-color:#fdd3cc;color:#8a1c12}
.cxc-msg--ok{background:#ecfdf3;border-color:#bbf0cf;color:#14532d}
.cxc-msg--ans{max-width:94%}
.cxc-msg b{font-weight:800}
.cxc-msg a{color:var(--apd-brand-2,#1d5fa8);font-weight:700}
.cxc-msg p{margin:0 0 8px}.cxc-msg p:last-child{margin:0}
.cxc-msg ul,.cxc-msg ol{margin:4px 0 8px;padding-left:20px}
.cxc-msg li{margin:3px 0}
.cxc-note{display:block;margin-top:8px;font-size:13px;line-height:1.4;color:var(--cxc-muted)}
.cxc-ref{display:block;margin-top:8px;font-size:13px}
.cxc-typing{display:flex;gap:5px;padding:15px 16px}
.cxc-typing i{width:8px;height:8px;border-radius:50%;background:#94a3b8;animation:cxcDot 1.1s infinite ease-in-out}
.cxc-typing i:nth-child(2){animation-delay:.15s}.cxc-typing i:nth-child(3){animation-delay:.3s}
@keyframes cxcDot{0%,80%,100%{transform:translateY(0);opacity:.5}40%{transform:translateY(-4px);opacity:1}}
.cxc-success{display:flex;align-items:flex-start;gap:10px}
.cxc-success>span{font-size:26px;line-height:1}
.cxc-success strong{display:block;font-size:17px;color:#14532d}

/* Answer buttons: big and easy to tap */
.cxc-chips{display:flex;flex-wrap:wrap;gap:8px;padding:10px 14px;max-height:46vh;overflow-y:auto;background:#f7f9fc}
.cxc-chips:empty{display:none}
.cxc-chips.is-list{flex-direction:column;flex-wrap:nowrap}
.cxc-chips.is-grid{display:grid;grid-template-columns:1fr 1fr}
.cxc-chip{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:10px 16px;border-radius:14px;border:2px solid #cfdcec;background:#fff;color:var(--cxc-brand);font-weight:700;font-size:15.5px;line-height:1.25;text-align:center;text-decoration:none;animation:cxcIn .35s var(--cxc-ease) both;animation-delay:var(--d,0ms);transition:background .2s,border-color .2s,transform .15s}
.cxc-chips.is-list .cxc-chip{justify-content:flex-start;text-align:left;width:100%}
.cxc-chips.is-row .cxc-chip{flex:1 1 auto;min-height:44px;font-size:14.5px}
.cxc-chip:hover{background:#eef4fb;border-color:#9fbbdb;color:var(--cxc-brand)}
.cxc-chip:active{transform:scale(.97)}
.cxc-chip.is-primary{background:var(--cxc-brand);border-color:var(--cxc-brand);color:#fff}
.cxc-chip.is-primary:hover{background:var(--cxc-brand2);color:#fff}
.cxc-chip.is-ghost{border-style:dashed;color:var(--cxc-muted);background:transparent}
.cxc-chip:disabled{opacity:.6}
.cxc-datepick{display:flex;gap:8px;width:100%}
.cxc-datepick input{flex:1;min-height:48px;padding:8px 12px;border-radius:14px;border:2px solid #cfdcec;font:inherit;font-size:16px;color:var(--cxc-ink)}

/* Step dots */
.cxc-steps{display:flex;align-items:center;gap:10px;padding:8px 16px 0;background:#fff;border-top:1px solid var(--cxc-line);font-size:12.5px;color:var(--cxc-muted)}
.cxc-steps[hidden]{display:none}
.cxc-steps span{display:flex;gap:4px}
.cxc-steps i{width:16px;height:6px;border-radius:6px;background:#dbe4ef}
.cxc-steps i.on{background:var(--cxc-a1)}
.cxc-steps b{font-weight:700}

/* Typing box */
.cxc-input{display:flex;align-items:center;gap:8px;padding:10px 12px;background:#fff;border-top:1px solid var(--cxc-line)}
.cxc-steps:not([hidden])+.cxc-input{border-top:0}
.cxc-input input[name=msg]{flex:1;min-width:0;height:50px;padding:0 14px;border-radius:14px;border:2px solid #cfdcec;background:#fff;font:inherit;font-size:16px;color:var(--cxc-ink);transition:border-color .2s,box-shadow .2s}
.cxc-input input[name=msg]::placeholder{color:#8a99ad}
.cxc-input input[name=msg]:focus{outline:none;border-color:var(--apd-brand-2,#1d5fa8);box-shadow:0 0 0 4px rgba(29,95,168,.14)}
.cxc-send{display:flex;align-items:center;gap:6px;height:50px;padding:0 16px;border:0;border-radius:14px;background:var(--cxc-grad);color:#fff;font-weight:800;font-size:15px;transition:transform .15s,filter .2s}
.cxc-send:hover{filter:brightness(1.05)}
.cxc-send:active{transform:scale(.95)}
.cxc-send svg{width:18px;height:18px}
.cxc-foot{margin:0;padding:0 14px 10px;font-size:12px;color:var(--cxc-muted);background:#fff}
/* Secondary links under the answer box (name / phone steps) */
.cxc-alt{display:flex;flex-wrap:wrap;gap:2px 16px;padding:0 14px 4px;background:#fff}
.cxc-alt:empty{display:none}
.cxc-alt__a{display:inline-flex;align-items:center;min-height:36px;padding:0;border:0;background:none;color:var(--cxc-brand2);font-size:14px;font-weight:700;text-decoration:underline;text-underline-offset:3px;text-decoration-color:rgba(20,84,154,.35)}
.cxc-alt__a:hover{color:var(--cxc-brand);text-decoration-color:currentColor}
.cxc-alt__a:focus-visible{outline:3px solid rgba(var(--apd-accent-rgb,247,134,54),.6);outline-offset:2px;border-radius:4px}
.cxc-head .cxc-icon+.cxc-icon{margin-left:-4px}

/* Phones: full-screen chat, small round launcher above the site's bottom bar. */
@media (max-width:599px){
	.cxc{right:12px;bottom:var(--cxc-mobile-bottom)}
	.cxc-fab{height:44px;padding:0 14px 0 5px}
	.cxc-fab__label{font-size:13.5px}
	.cxc-teaser{bottom:54px;width:min(240px,calc(100vw - 32px))}
	.cxc-panel{position:fixed;inset:0;width:auto;height:auto;border-radius:0;transform:translateY(24px)}
	/* Keyboard open: the panel fits the visible area (set by chat.js), so the question and the answer box stay together. */
	.cxc-panel.is-vv{bottom:auto;top:var(--cxc-vv-top,0);height:var(--cxc-vv-h,100%)}
	.cxc.is-open .cxc-fab{opacity:0;pointer-events:none}
	.cxc-head{padding-top:max(14px,env(safe-area-inset-top))}
	.cxc-input{padding-bottom:max(10px,env(safe-area-inset-bottom))}
	.cxc-send span{display:none}
	.cxc-send{width:54px;justify-content:center;padding:0}
	html.cxc-lock,html.cxc-lock body{overflow:hidden}
}
@media (prefers-reduced-motion:reduce){.cxc *,.cxc *::before{animation:none!important;transition:none!important}}
@media print{.cxc{display:none}}
.cxc-chips.is-grid .cxc-chip{font-size:14.5px;padding:8px 10px}
@media (max-height:700px){.cxc-chips{max-height:38vh}.cxc-chip{min-height:44px}}
.cxc-chips.is-grid .cxc-chip.is-wide{grid-column:1/-1;border-color:#9fbbdb;background:#eef4fb}
