/**
 * Request a call back (parts/v3-callback.php): floating trigger and dialog.
 * Sitewide, so self-contained: own tokens, px sizes (legacy html is 10px),
 * and resets on inputs, labels and legends.
 * Mobile first: bottom sheet, centred panel from 640px.
 */
.acma-cb-trigger,
.acma-cb {
	--cb-navy: #071a33;
	--cb-blue: #005f9f;
	--cb-green: #7ab242;
	--cb-ink: #0e1622;
	--cb-text: #3f4a57;
	--cb-muted: #5f6b78;
	--cb-line: #c9d0d9; /* same as --v3-field-line */
	--cb-surface: #f3f5f8;
	--cb-error: #b42318; /* same as every form's errors (--v3-danger) */
	--cb-ease: cubic-bezier(.2, .7, .1, 1);
	font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
}
/* Every child uses the dialog's type. */
.acma-cb-trigger *,
.acma-cb * { font-family: inherit; letter-spacing: normal; }
.acma-cb :is(input, select, button, textarea) { font: inherit; }
.acma-cb :is(p, a, small, span, li) { font-weight: 400; }

/* ── Trigger: round on phones, labelled pill from 768px. Bottom left, clear of the chat bubble (bottom right). */
.acma-cb-trigger {
	position: fixed; z-index: 990; visibility: visible; /* v3-chrome.css hides it until this sheet loads. */
	left: 16px; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	display: inline-flex; align-items: center; gap: 10px;
	height: 52px; min-width: 52px; margin: 0; padding: 0;
	border: 0; border-radius: 999px;
	background: var(--cb-navy); color: #fff;
	box-shadow: 0 10px 28px -10px rgba(4, 13, 28, .55), 0 0 0 1px rgba(255, 255, 255, .08);
	font-size: 15px; font-weight: 600; line-height: 1;
	cursor: pointer;
	transition: transform .35s var(--cb-ease), background-color .2s, box-shadow .2s;
}
.acma-cb-trigger[hidden] { display: none; }
.acma-cb-trigger.is-tucked { transform: translateY(calc(100% + 32px)); }
.acma-cb-trigger.is-early { visibility: hidden; opacity: 0; }
.acma-cb-trigger:hover { background: var(--cb-blue); color: #fff; }
.acma-cb-trigger:focus-visible { outline: 3px solid var(--cb-green); outline-offset: 3px; }
.acma-cb-trigger__icon {
	display: grid; place-items: center; flex: none;
	width: 52px; height: 52px; border-radius: 50%;
}
.acma-cb-trigger__icon .acma-cb-i { width: 22px; height: 22px; }
.acma-cb-trigger__text {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
@media (min-width: 768px) {
	.acma-cb-trigger { left: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); padding-right: 22px; gap: 4px; }
	.acma-cb-trigger__icon { width: 44px; height: 44px; margin-left: 4px; background: var(--cb-green); color: var(--cb-navy); }
	.acma-cb-trigger__text { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
/* Desktop, scrolled: icon only; hover or keyboard focus brings the label back. */
@media (min-width: 768px) {
	.acma-cb-trigger.is-compact:not(:hover, :focus-visible) { padding-right: 4px; gap: 0; }
	.acma-cb-trigger.is-compact:not(:hover, :focus-visible) .acma-cb-trigger__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
html.acma-cb-open .acma-cb-trigger { visibility: hidden; }

/* ── Dialog shell ─────────────────────────────────────────────────────── */
html.acma-cb-open { overflow: hidden; }
.acma-cb {
	position: fixed; inset: auto 0 0 0;
	width: 100%; max-width: 100%; max-height: 94vh;
	margin: 0; padding: 0; border: 0;
	background: transparent; color: var(--cb-ink);
	overflow: visible;
	font-size: 16px; line-height: 1.5; text-align: left;
}
@supports (height: 1dvh) { .acma-cb { max-height: 94dvh; } }
.acma-cb::backdrop { background: rgba(4, 13, 28, .55); }
.acma-cb[open] { display: flex; }
.acma-cb__panel {
	position: relative;
	display: flex; flex-direction: column;
	width: 100%; max-height: inherit;
	overflow-y: auto; overscroll-behavior: contain;
	padding: 28px 20px calc(24px + env(safe-area-inset-bottom, 0px));
	border-radius: 20px 20px 0 0;
	background: #fff;
	box-shadow: 0 -18px 50px -20px rgba(4, 13, 28, .45);
}
.acma-cb__grip {
	position: absolute; top: 10px; left: 50%;
	width: 40px; height: 4px; margin-left: -20px;
	border-radius: 4px; background: var(--cb-line);
}
@media (min-width: 640px) {
	.acma-cb { inset: 0; margin: auto; width: min(560px, calc(100vw - 48px)); height: fit-content; max-height: calc(100vh - 48px); }
	@supports (height: 1dvh) { .acma-cb { max-height: calc(100dvh - 48px); } }
	.acma-cb__panel { padding: 36px 36px 32px; border-radius: 20px; box-shadow: 0 30px 80px -30px rgba(4, 13, 28, .6); }
	.acma-cb__grip { display: none; }
}

/* Motion: sheet slides up on phones, panel rises and fades on desktop. */
.acma-cb[open] .acma-cb__panel { animation: acma-cb-up .42s var(--cb-ease) both; }
.acma-cb[open]::backdrop { animation: acma-cb-fade .3s ease both; }
.acma-cb.is-closing .acma-cb__panel { animation: acma-cb-down .24s ease-in both; }
.acma-cb.is-closing::backdrop { animation: acma-cb-fade .24s ease reverse both; }
@keyframes acma-cb-up { from { transform: translateY(100%); } }
@keyframes acma-cb-down { to { transform: translateY(100%); } }
@keyframes acma-cb-fade { from { opacity: 0; } }
@media (min-width: 640px) {
	@keyframes acma-cb-up { from { opacity: 0; transform: translateY(16px) scale(.98); } }
	@keyframes acma-cb-down { to { opacity: 0; transform: translateY(12px) scale(.98); } }
}
@media (prefers-reduced-motion: reduce) {
	.acma-cb-trigger { transition: none; }
	.acma-cb[open] .acma-cb__panel,
	.acma-cb[open]::backdrop,
	.acma-cb.is-closing .acma-cb__panel,
	.acma-cb.is-closing::backdrop { animation: none; }
}

/* ── Content ─────────────────────────────────────────────────────────── */
.acma-cb__close {
	position: absolute; top: 12px; right: 12px;
	display: grid; place-items: center;
	width: 44px; height: 44px; margin: 0; padding: 0;
	border: 0; border-radius: 50%;
	background: var(--cb-surface); color: var(--cb-ink);
	cursor: pointer; transition: background-color .2s, color .2s;
}
.acma-cb__close:hover { background: var(--cb-navy); color: #fff; }
.acma-cb__close svg { width: 20px; height: 20px; }
.acma-cb .acma-cb__title {
	margin: 0 52px 8px 0; padding: 0;
	font-family: inherit !important; /* style.css forces heading fonts with !important */
	font-size: 24px; font-weight: 700; line-height: 1.25; color: var(--cb-navy);
	letter-spacing: -.01em; text-transform: none;
}
.acma-cb .acma-cb__title:focus { outline: none; }
.acma-cb .acma-cb__lead { margin: 0 0 22px; font-size: 16px; line-height: 1.55; color: var(--cb-text); }
@media (min-width: 640px) { .acma-cb .acma-cb__title { font-size: 28px; } }

.acma-cb__form { display: grid; gap: var(--v3-q-gap, 20px); margin: 0; }
.acma-cb label,
.acma-cb legend,
.acma-cb summary {
	display: block; float: none; width: auto;
	margin: 0 0 var(--v3-lbl-gap, 10px); padding: 0; border: 0;
	font-size: var(--v3-lbl-fs, 15px); font-weight: 600; line-height: 1.4; color: var(--cb-ink);
	text-transform: none; letter-spacing: normal;
}
.acma-cb fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.acma-cb input[type="text"],
.acma-cb input[type="tel"],
.acma-cb input[type="email"],
.acma-cb select {
	display: block; width: 100%; height: var(--v3-fld-h, 56px); margin: 0;
	padding: 0 16px;
	border: 1px solid var(--cb-line); border-radius: var(--v3-fld-r, 12px);
	background: #fff; color: var(--cb-ink);
	box-shadow: none;
	font-family: inherit; font-size: var(--v3-fld-fs, 16px); font-weight: 400; line-height: 1.3;
	-webkit-appearance: none; appearance: none;
	transition: border-color .2s, box-shadow .2s;
}
.acma-cb input::placeholder { color: var(--v3-placeholder, #6b7683); opacity: 1; }
/* Legacy style.css sets `body input[type="text"]:focus { border-color: #8bc34a !important }` (and on hover): outrank it. */
body .acma-cb :is(input[type], select):hover { border-color: var(--v3-field-hover, #9aa5b2) !important; }
body .acma-cb :is(input[type], select):focus { outline: none; border-color: var(--cb-blue) !important; box-shadow: var(--v3-fld-focus, 0 0 0 1px #005f9f, 0 0 0 5px rgba(0, 95, 159, .16)); }
body .acma-cb :is(input[type], select)[aria-invalid="true"] { border-color: var(--cb-error) !important; box-shadow: 0 0 0 1px var(--cb-error); }
body .acma-cb :is(input[type], select)[aria-invalid="true"]:focus { box-shadow: 0 0 0 1px var(--cb-error), 0 0 0 5px rgba(180, 35, 24, .14); }

.acma-cb__phone { display: flex; gap: 8px; }
.acma-cb__phone > input { flex: 1 1 auto; min-width: 0; }
.acma-cb__select { position: relative; flex: 0 0 116px; }
.acma-cb__select select { padding-right: 40px; cursor: pointer; }
.acma-cb__select svg { position: absolute; right: 16px; top: 50%; width: 16px; height: 16px; margin-top: -8px; pointer-events: none; color: var(--cb-muted); }
.acma-cb__sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.acma-cb .acma-cb__err { margin: 8px 0 0; font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--cb-error); }
.acma-cb .acma-cb__err[hidden] { display: none; }
.acma-cb .acma-cb__err--form { margin: 0; }
.acma-cb legend:has(+ .acma-cb__hint) { margin-bottom: 2px; }
.acma-cb .acma-cb__hint { margin: 0 0 var(--v3-lbl-gap, 10px); font-size: 14px; line-height: 1.45; color: var(--cb-muted); }

/* Best time: four chips, 2 by 2 on phones, one row from 480px. */
.acma-cb__chips { display: grid; grid-template-columns: 1fr 1fr; gap: var(--v3-chip-gap, 10px); }
@media (min-width: 480px) { .acma-cb__chips { grid-template-columns: repeat(4, 1fr); } }
.acma-cb .acma-cb__chip { position: relative; margin: 0; font-weight: 400; cursor: pointer; }
.acma-cb__chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.acma-cb__chip span {
	position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px;
	height: 100%; min-height: var(--v3-fld-h, 56px); padding: 10px 12px;
	border: 1px solid var(--cb-line); border-radius: var(--v3-fld-r, 12px);
	background: #fff;
	transition: border-color .2s, background-color .2s, color .2s;
}
.acma-cb__chip strong { padding-right: 16px; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--cb-ink); }
.acma-cb__chip small { font-size: 13px; line-height: 1.35; color: var(--cb-muted); white-space: nowrap; }
.acma-cb__chip:hover span { border-color: var(--v3-field-hover, #9aa5b2); background: var(--cb-surface); }
.acma-cb__chip input:checked + span { border-color: var(--cb-navy); background: var(--cb-navy); }
.acma-cb__chip input:checked + span :is(strong, small) { color: #fff; }
/* A tick as well as the fill, so the choice is not shown by colour alone. */
.acma-cb__chip input:checked + span::after { content: ""; position: absolute; top: 15px; right: 12px; width: 10px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.acma-cb__chip input:focus-visible + span { outline: 2px solid var(--cb-blue); outline-offset: 2px; }

/* Optional fields, collapsed. */
.acma-cb__more { border-top: 1px solid #dde2e8; padding-top: 14px; }
.acma-cb .acma-cb__more summary {
	display: flex; align-items: center; gap: 8px; margin: 0;
	list-style: none; cursor: pointer; color: var(--cb-blue);
}
.acma-cb__more summary::-webkit-details-marker { display: none; }
.acma-cb__more summary::before {
	content: ""; width: 8px; height: 8px; margin: 0 4px 3px 2px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(-45deg); transition: transform .2s;
}
.acma-cb__more[open] summary::before { transform: rotate(45deg); margin-bottom: 5px; }
.acma-cb__more summary span { font-weight: 400; color: var(--cb-muted); }
.acma-cb__more summary:hover { color: var(--cb-navy); }
.acma-cb__more summary:focus-visible { outline: 2px solid var(--cb-blue); outline-offset: 3px; border-radius: 4px; }
.acma-cb__more-grid { display: grid; gap: 16px; margin-top: 14px; }
@media (min-width: 640px) { .acma-cb__more-grid { grid-template-columns: 1fr 1fr; } }

/* Consent */
.acma-cb__consent { display: grid; grid-template-columns: 22px 1fr; gap: 4px 12px; align-items: start; }
.acma-cb__consent input {
	width: 22px; height: 22px; margin: 1px 0 0; padding: 0;
	accent-color: var(--cb-navy); cursor: pointer;
}
.acma-cb .acma-cb__consent label { margin: 0; font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--cb-text); cursor: pointer; }
.acma-cb__consent .acma-cb__err { grid-column: 2; margin: 0; }
.acma-cb a { color: var(--cb-blue); text-decoration: underline; text-underline-offset: 2px; }
.acma-cb a:hover { color: var(--cb-navy); }
.acma-cb a:focus-visible { outline: 2px solid var(--cb-blue); outline-offset: 2px; border-radius: 2px; }
.acma-cb__consent input:focus-visible { outline: 2px solid var(--cb-blue); outline-offset: 2px; }

.acma-cb__bot:empty { display: none; }
.acma-cb__bot iframe { max-width: 100%; }

/* Buttons */
.acma-cb .acma-cb__submit {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	width: 100%; min-height: clamp(52px, 3.4vw, 64px); margin: 0; padding: 0 24px; /* the .v3-btn height */
	border: 0; border-radius: 999px;
	background: var(--cb-blue); color: #fff;
	font-family: inherit; font-size: clamp(15px, .3vw + 12px, 19px); font-weight: 700; line-height: 1.2;
	text-transform: none; letter-spacing: normal;
	cursor: pointer; transition: background-color .2s, color .2s, opacity .2s;
}
.acma-cb .acma-cb__submit span { font-weight: 700; } /* The generic span reset above set the label to 400. */
.acma-cb .acma-cb__submit:hover { background: var(--cb-navy); color: #fff; }
.acma-cb .acma-cb__submit:focus-visible { outline: 3px solid var(--cb-blue); outline-offset: 3px; }
.acma-cb .acma-cb__submit[disabled] { cursor: progress; opacity: .75; }
.acma-cb .acma-cb__submit[aria-busy="true"]::after {
	content: ""; width: 16px; height: 16px; border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
	animation: acma-cb-spin .8s linear infinite;
}
@keyframes acma-cb-spin { to { transform: rotate(360deg); } }
.acma-cb .acma-cb__submit--ghost { background: var(--cb-surface); color: var(--cb-navy); }
.acma-cb .acma-cb__submit--ghost:hover { background: var(--cb-navy); color: #fff; }
.acma-cb .acma-cb__alt { margin: -4px 0 0; font-size: 14px; line-height: 1.5; color: var(--cb-muted); text-align: center; }
.acma-cb .acma-cb__alt a { white-space: nowrap; }


/* Hindi and other translations: give tall glyphs room. */
html.translated-ltr .acma-cb :is(.acma-cb__title, label, legend, summary, .acma-cb__lead) { line-height: 1.6; }
html:is(.translated-ltr, .translated-rtl) .acma-cb__chip small { white-space: normal; }
