/* ADP Distribution delivery quote form. Everything scoped to .adp-form so the
   theme cannot leak in and this cannot leak out. Colours come from
   Quote Requests → Form Settings via --adp-accent / --adp-button. */

.adp-form {
	--adp-accent: #1f2a44;
	--adp-button: #c8102e;
	--adp-text: #1d2330;
	--adp-muted: #5b6474;
	--adp-line: #c9ced8;
	--adp-soft: #f4f6f9;
	--adp-card: #fff;
	--adp-error: #b42318;
	--adp-radius: 12px;
	max-width: 760px;
	margin: 0 auto;
	color: var(--adp-text);
	font-size: 16px;
	line-height: 1.5;
}
.adp-form *,
.adp-form *::before,
.adp-form *::after { box-sizing: border-box; }
.adp-form [hidden] { display: none !important; }

/* Theme reset. Divi pads every <p> (padding-bottom: 1em) and block themes
   add margins and font sizes to paragraphs and lists; inside the form the
   form decides. :where() keeps this at class weight, so the specific rules
   further down still win. */
.adp-form :where(p, ul, ol, dl, dd, h2, h3, fieldset, legend, label) {
	padding-bottom: 0;
	margin-top: 0;
	font-size: inherit;
	line-height: inherit;
	letter-spacing: normal;
}
.adp-form :where(p, dl, dd) { margin-bottom: 0; }

.adp-form .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.adp-title {
	margin: 0 0 20px;
	color: var(--adp-accent);
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
	line-height: 1.2;
}

/* ---- Progress ---- */
.adp-progress {
	display: flex;
	gap: 8px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
	counter-reset: none;
}
.adp-progress__item {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0 0 10px;
	border-bottom: 4px solid var(--adp-line);
	color: var(--adp-muted);
	font-size: 15px;
	font-weight: 600;
}
.adp-progress__num {
	display: inline-grid;
	place-items: center;
	flex: 0 0 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--adp-soft);
	border: 2px solid var(--adp-line);
	font-size: 14px;
}
.adp-progress__item.is-current,
.adp-progress__item.is-done { border-bottom-color: var(--adp-accent); color: var(--adp-accent); }
.adp-progress__item.is-current .adp-progress__num,
.adp-progress__item.is-done .adp-progress__num { background: var(--adp-accent); border-color: var(--adp-accent); color: #fff; }
/* Without JS both steps show at once, so the progress bar would mislead. */
.adp-form:not(.is-js) .adp-progress { display: none; }

/* ---- Steps ---- */
.adp-step + .adp-step { margin-top: 40px; }
.adp-form.is-js .adp-step + .adp-step { margin-top: 0; }
.adp-form.is-js .adp-step:not(.is-active) { display: none; }
.adp-step__heading {
	margin: 0 0 20px;
	color: var(--adp-accent);
	font-size: 1.3rem;
	line-height: 1.3;
	outline: none;
}
.adp-step__count { color: var(--adp-muted); font-weight: 400; }

/* ---- Groups & fields ---- */
.adp-group {
	margin: 0 0 22px;
	padding: 0;
	border: 0;
	min-width: 0;
}
.adp-group__legend {
	display: block;
	margin: 0 0 12px;
	padding: 0;
	font-size: 1.05rem;
	font-weight: 700;
}
.adp-field { margin: 0 0 20px; }
.adp-group .adp-field:last-child { margin-bottom: 0; }

.adp-label {
	display: block;
	margin: 0 0 6px;
	font-weight: 600;
}
.adp-req { color: var(--adp-error); font-weight: 700; }
.adp-opt { color: var(--adp-muted); font-weight: 400; }
.adp-hint {
	margin: -2px 0 8px;
	color: var(--adp-muted);
	font-size: 15px;
}
.adp-error {
	display: flex;
	gap: 6px;
	margin: 0 0 8px;
	color: var(--adp-error);
	font-size: 15px;
	font-weight: 600;
}
.adp-error::before { content: "!"; display: inline-grid; place-items: center; flex: 0 0 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--adp-error); color: #fff; font-size: 13px; }

.adp-form input[type="text"],
.adp-form input[type="email"],
.adp-form input[type="tel"],
.adp-form input[type="date"],
.adp-form textarea {
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 11px 14px;
	border: 2px solid var(--adp-line);
	border-radius: var(--adp-radius);
	background: #fff;
	color: var(--adp-text);
	font: inherit;
	font-size: 16px; /* 16px stops iOS zooming in on focus */
	line-height: 1.4;
	box-shadow: none;
	transition: border-color .15s;
}
.adp-form textarea { resize: vertical; }
.adp-form input[type="date"] { max-width: 16em; appearance: none; -webkit-appearance: none; }
.adp-form .adp-input--short { max-width: 10em; }
.adp-form .adp-input--medium { max-width: 18em; }
.adp-form input:hover,
.adp-form textarea:hover { border-color: #9aa2b1; }
.adp-form input:focus-visible,
.adp-form textarea:focus-visible,
.adp-form button:focus-visible,
.adp-vehicle__input:focus-visible + .adp-vehicle__card,
.adp-choice input:focus-visible + span {
	outline: 3px solid var(--adp-accent);
	outline-offset: 2px;
}
.adp-form input:focus,
.adp-form textarea:focus { border-color: var(--adp-accent); }
.adp-field.has-error input,
.adp-field.has-error textarea { border-color: var(--adp-error); }
.adp-field.is-valid input,
.adp-field.is-valid textarea {
	border-color: #2e7d4f;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e7d4f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 18px;
	padding-right: 40px;
}
.adp-field.is-valid textarea { background-position: right 12px top 14px; }
.adp-field.is-valid input[type="date"] { background-image: none; padding-right: 14px; }

/* ---- Vehicle cards ---- */
.adp-vehicles__grid {
	--adp-cols: 3;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}
.adp-vehicles__grid > .adp-vehicle { flex: 0 0 calc((100% - (var(--adp-cols) - 1) * 8px) / var(--adp-cols)); }
/* Seven cards: 4 + 3 when there is room, 3 + 3 + 1 on phones; the short
   last row is centred rather than left hanging. */
.adp-vehicles { container-type: inline-size; }
@container (min-width: 400px) {
	.adp-vehicles__grid { --adp-cols: 4; }
}
.adp-vehicle { position: relative; }
.adp-vehicle__input {
	position: absolute;
	opacity: 0;
	width: 1px; height: 1px;
	margin: 0;
}
.adp-vehicle__card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 2px;
	height: 100%;
	padding: 10px 8px 9px;
	border: 2px solid var(--adp-line);
	border-radius: var(--adp-radius);
	background: var(--adp-card);
	color: var(--adp-text);
	text-align: center;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.adp-vehicle__card:hover { border-color: #9aa2b1; }
.adp-icon {
	display: block;
	width: 100%;
	max-width: 64px;
	height: auto;
	margin-bottom: 2px;
	color: #6b7485;
}
.adp-icon .adp-wheel { fill: var(--adp-card); }
.adp-vehicle__name { font-size: 14px; font-weight: 700; line-height: 1.25; }
.adp-vehicle__hint { color: var(--adp-muted); font-size: 12px; line-height: 1.3; }

.adp-vehicle__input:checked + .adp-vehicle__card {
	border-color: var(--adp-accent);
	background: var(--adp-soft);
	box-shadow: 0 0 0 1px var(--adp-accent);
	--adp-card: var(--adp-soft);
}
.adp-vehicle__input:checked + .adp-vehicle__card .adp-icon { color: var(--adp-accent); }
.adp-vehicle__input:checked + .adp-vehicle__card::after {
	content: "";
	position: absolute;
	top: 6px; right: 6px;
	width: 18px; height: 18px;
	border-radius: 50%;
	background: var(--adp-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.adp-vehicles.has-error .adp-vehicle__card { border-color: var(--adp-error); }



/* ---- Body type chips ---- */
.adp-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.adp-choice { position: relative; margin: 0; cursor: pointer; }
.adp-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.adp-choice span {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 18px;
	border: 2px solid var(--adp-line);
	border-radius: var(--adp-radius);
	background: #fff;
	font-weight: 600;
}
.adp-choice input:checked + span {
	border-color: var(--adp-accent);
	background: var(--adp-soft);
	box-shadow: 0 0 0 1px var(--adp-accent);
	color: var(--adp-accent);
}

/* ---- Step 2 recap ---- */
.adp-recap {
	margin: 0 0 28px;
	padding: 16px 20px;
	border-radius: var(--adp-radius);
	background: var(--adp-soft);
}
.adp-form:not(.is-js) .adp-recap { display: none; }
.adp-recap__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 8px; }
.adp-form .adp-recap__title { margin: 0; font-weight: 700; }
.adp-recap__list { display: grid; gap: 4px; margin: 0; }
.adp-recap__list div { display: grid; grid-template-columns: 5em 1fr; gap: 12px; }
.adp-recap__list dt { color: var(--adp-muted); }
.adp-recap__list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* ---- Buttons ---- */
.adp-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 28px;
}
.adp-form:not(.is-js) .adp-actions--next,
.adp-form:not(.is-js) [data-adp-back] { display: none; }
.adp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 52px;
	padding: 12px 28px;
	border: 2px solid transparent;
	border-radius: var(--adp-radius);
	font: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s, background-color .15s;
}
.adp-btn--primary { background: var(--adp-button); color: #fff; }
.adp-btn--primary:hover { filter: brightness(.9); }
.adp-btn--primary[disabled] { opacity: .7; cursor: progress; }
.adp-btn--secondary { background: transparent; border-color: var(--adp-line); color: var(--adp-text); }
.adp-btn--secondary:hover { border-color: var(--adp-text); }
.adp-link {
	padding: 4px 0;
	border: 0;
	background: none;
	color: var(--adp-accent);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

@media (max-width: 560px) {
	.adp-vehicles__grid { gap: 6px; }
	.adp-vehicles__grid > .adp-vehicle { flex-basis: calc((100% - (var(--adp-cols) - 1) * 6px) / var(--adp-cols)); }
	.adp-vehicle__card { padding: 8px 4px 7px; }
	.adp-icon { max-width: 52px; }
	.adp-vehicle__name { font-size: 13px; }
	.adp-vehicle__hint { font-size: 11px; }
	.adp-inline { flex-wrap: wrap; }
	.adp-actions { flex-direction: column-reverse; align-items: stretch; }
	.adp-actions .adp-btn { width: 100%; }
	.adp-progress__item { font-size: 14px; }
}

/* ---- Messages ---- */
.adp-error-summary {
	margin: 0 0 24px;
	padding: 16px 20px;
	border: 2px solid var(--adp-error);
	border-radius: var(--adp-radius);
	background: #fff5f4;
	outline: none;
}
.adp-error-summary__title { margin: 0 0 6px; font-weight: 700; color: var(--adp-error); }
.adp-error-summary ul { margin: 0; padding-left: 1.2em; }
.adp-error-summary li { margin: 2px 0; }
.adp-error-summary a { color: var(--adp-error); font-weight: 600; }

.adp-privacy { margin: 8px 0 0; color: var(--adp-muted); font-size: 15px; }
.adp-privacy a { color: inherit; }

.adp-field--hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px; height: 1px;
	overflow: hidden;
}

.adp-success {
	padding: 32px 28px;
	border-radius: var(--adp-radius);
	background: var(--adp-soft);
	text-align: center;
	outline: none;
}
.adp-success svg { width: 56px; height: 56px; margin: 0 auto 12px; fill: #2e7d4f; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.adp-success h3 { margin: 0 0 8px; color: var(--adp-accent); font-size: 1.35rem; }
.adp-success p { margin: 0 0 10px; }
.adp-success a { color: var(--adp-accent); font-weight: 600; }

/* ---- Address lookup ---- */
.adp-address .adp-field { margin-bottom: 14px; }
.adp-address__lines .adp-field:last-child { margin-bottom: 0; }
.adp-inline { display: flex; align-items: flex-start; gap: 8px; }
.adp-inline input { flex: 0 1 10em; }
.adp-btn--find {
	flex: 0 0 auto;
	min-height: 48px;
	padding: 10px 18px;
	font-size: 16px;
	background: var(--adp-accent);
	color: #fff;
}
.adp-btn--find:hover { filter: brightness(1.15); }
.adp-btn--find[disabled] { opacity: .7; cursor: progress; }
.adp-form select {
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 10px 40px 10px 14px;
	border: 2px solid var(--adp-line);
	border-radius: var(--adp-radius);
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6474' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
	color: var(--adp-text);
	font: inherit;
	font-size: 16px;
	appearance: none;
	-webkit-appearance: none;
}
.adp-form select:focus-visible { outline: 3px solid var(--adp-accent); outline-offset: 2px; }
.adp-address__status:empty { display: none; }
.adp-address__status { margin: -6px 0 10px; color: var(--adp-muted); font-size: 15px; }
.adp-address__manual-link { font-size: 15px; }
.adp-address__picked {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 16px;
	padding: 12px 16px;
	border: 2px solid var(--adp-line);
	border-radius: var(--adp-radius);
	background: var(--adp-soft);
}
.adp-address__picked-text { flex: 1 1 100%; margin: 0; font-weight: 600; outline: none; }
.adp-address__lines { margin-top: 4px; }
/* Without JS the lookup cannot run: show plain fields only. */
.adp-form:not(.is-js) [data-adp-find],
.adp-form:not(.is-js) .adp-address__manual-link { display: none; }

/* Collection and delivery side by side; stacked when too narrow for two. */
.adp-address-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 0 24px;
	align-items: start;
}
.adp-address-row .adp-inline input { flex: 1 1 6em; min-width: 0; }

/* =====================================================================
   Compact layout: [adp_delivery_quote layout="compact"]
   Three steps in a white card, built for a 400–500px column in a page
   header. Step headings are kept for screen readers but hidden, because
   the progress bar already names each step.
   ===================================================================== */
.adp-form--compact {
	max-width: 500px;
	margin: 0;
	padding: 22px 22px 24px;
	border-radius: var(--adp-radius);
	background: #fff;
	box-shadow: 0 10px 30px rgba(20, 30, 50, .12), 0 2px 6px rgba(20, 30, 50, .06);
	font-size: 15px;
	text-align: left;
}
.adp-form--compact .adp-title { margin: 0 0 14px; font-size: 1.35rem; }
.adp-form--compact .adp-progress { gap: 6px; margin-bottom: 18px; }
.adp-form--compact .adp-progress__item { gap: 6px; padding-bottom: 8px; border-bottom-width: 3px; font-size: 13px; }
.adp-form--compact .adp-progress__num { flex-basis: 22px; height: 22px; font-size: 12px; border-width: 1.5px; }
.adp-form--compact .adp-step__heading {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.adp-form--compact .adp-group { margin-bottom: 16px; }
.adp-form--compact .adp-group__legend { margin-bottom: 8px; font-size: 1rem; }
.adp-form--compact .adp-field { margin-bottom: 14px; }
.adp-form--compact .adp-label { margin-bottom: 4px; font-size: 15px; }
.adp-form--compact .adp-hint,
.adp-form--compact .adp-error,
.adp-form--compact .adp-privacy { font-size: 14px; }
.adp-form--compact input[type="text"],
.adp-form--compact input[type="email"],
.adp-form--compact input[type="tel"],
.adp-form--compact input[type="date"],
.adp-form--compact textarea,
.adp-form--compact select,
.adp-form--compact .adp-btn--find { min-height: 44px; padding-top: 9px; padding-bottom: 9px; }
.adp-form--compact .adp-address-row { gap: 0; }
.adp-form--compact .adp-recap { margin-bottom: 18px; padding: 12px 14px; font-size: 14px; }
.adp-form--compact .adp-choice span { min-height: 40px; padding: 6px 14px; font-size: 14px; }
.adp-form--compact .adp-actions { flex-direction: row-reverse; flex-wrap: nowrap; margin-top: 18px; gap: 10px; }
.adp-form--compact .adp-actions .adp-btn--primary { flex: 1 1 auto; }
.adp-form--compact .adp-btn { min-height: 48px; padding: 10px 20px; font-size: 16px; }
.adp-form--compact .adp-error-summary { margin-bottom: 16px; padding: 12px 14px; font-size: 14px; }
.adp-form--compact .adp-success { padding: 20px 8px; background: none; text-align: center; }
/* Keep Back beside the main button even on phones: there is room. */
@media (max-width: 560px) {
	.adp-form--compact { padding: 18px 16px 20px; }
	.adp-form--compact .adp-actions .adp-btn { width: auto; }
	.adp-form--compact .adp-actions .adp-btn--primary { flex: 1 1 auto; }
}
/* Three cards per row in the card: four at ~100px each wraps every label. */
.adp-form--compact .adp-vehicles__grid { --adp-cols: 3; }
.adp-form--compact .adp-vehicle__card { padding: 10px 6px 9px; }
/* The card is short on height: the names carry enough on their own here. */
.adp-form--compact .adp-vehicle__hint { display: none; }

.adp-form--compact .adp-recap__head { margin-bottom: 4px; }
.adp-form--compact .adp-recap__title { font-size: 14px; }
.adp-form--compact .adp-recap__list { gap: 2px; font-size: 13px; }
.adp-form--compact .adp-recap__list div { grid-template-columns: 4em 1fr; gap: 8px; }
.adp-form--compact .adp-recap .adp-link { padding: 0; }
.adp-add-message { display: block; margin: -2px 0 12px; font-size: 15px; }

/* Compact: numbers only in the progress bar, to save height. The step names
   stay in the markup for screen readers. */
.adp-form--compact .adp-progress__label {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
/* Lines only: no numbers either. */
.adp-form--compact .adp-progress__num { display: none; }
.adp-form--compact .adp-progress__item { padding-bottom: 0; }

/* Keep the number centred in its circle whatever line height the theme sets. */
.adp-form .adp-progress__num { line-height: 1; padding: 0; }
