/**
 * CDD Digital Strategy Day — customer-facing styles.
 *
 * AVADA COMPATIBILITY RULES, FOLLOWED THROUGHOUT
 * ----------------------------------------------
 *   - Everything is scoped under .cdd-sd. There are no bare element selectors.
 *   - No !important anywhere. The theme wins any genuine conflict.
 *   - font-family is never set, so the forms inherit the site's typography.
 *   - Colours come from custom properties, overridable from the child theme
 *     by redefining them on .cdd-sd.
 *
 * MOBILE RULES, ALSO DELIBERATE
 * -----------------------------
 *   - Inputs are 16px. Anything smaller makes iOS Safari zoom on focus and
 *     leave the page zoomed. This is the single most common mobile form bug.
 *   - Interactive targets are at least 44px tall.
 *   - Choice rows are full width and tappable across their whole area.
 *   - Selected state changes border, background AND weight, never colour alone.
 */

.cdd-sd {
	--cdd-brand: #1c7c84;
	--cdd-brand-lift: #3aaeb5;
	--cdd-navy: #0d202d;
	--cdd-wash: #f4f7f6;
	--cdd-line: #d6dfdb;
	--cdd-line-strong: #c3ceca;
	--cdd-ink: #16242c;
	--cdd-ink-soft: #55676f;
	--cdd-error: #b32d2e;
	--cdd-error-wash: #fdf2f2;
	--cdd-ok: #1e6b34;
	--cdd-radius: 4px;

	color: var(--cdd-ink);
	max-width: 780px;
}

.cdd-sd *,
.cdd-sd *::before,
.cdd-sd *::after {
	box-sizing: border-box;
}

/* ---------- Headings and intro ---------- */

.cdd-sd .cdd-sd-form-title {
	margin: 0 0 0.4em;
}

.cdd-sd .cdd-sd-form-intro {
	margin: 0 0 1.4em;
	color: var(--cdd-ink-soft);
}

/* ---------- Offer summary ---------- */

.cdd-sd .cdd-sd-offer {
	border: 1px solid var(--cdd-line);
	border-top: 3px solid var(--cdd-brand);
	background: var(--cdd-wash);
	border-radius: 2px;
	padding: 18px 20px;
	margin: 0 0 28px;
}

.cdd-sd .cdd-sd-price {
	margin: 0;
	font-size: 1.75em;
	font-weight: 700;
	line-height: 1.1;
	color: var(--cdd-navy);
}

.cdd-sd .cdd-sd-offer-list {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
}

.cdd-sd .cdd-sd-offer-list li {
	margin: 0;
	font-size: 0.92em;
	color: var(--cdd-ink-soft);
}

.cdd-sd .cdd-sd-offer-list li::before {
	content: "—";
	color: var(--cdd-brand);
	margin-right: 7px;
}

/* ---------- Groups ---------- */

.cdd-sd .cdd-sd-group {
	border: 0;
	border-top: 1px solid var(--cdd-line);
	margin: 0 0 26px;
	padding: 22px 0 0;
	min-width: 0;
}

.cdd-sd .cdd-sd-group:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.cdd-sd .cdd-sd-legend {
	padding: 0;
	margin: 0 0 16px;
	font-size: 1.12em;
	font-weight: 600;
	color: var(--cdd-navy);
}

.cdd-sd .cdd-sd-subgroup {
	border: 0;
	margin: 0 0 20px;
	padding: 0;
	min-width: 0;
}

.cdd-sd .cdd-sd-sublegend {
	padding: 0;
	margin: 0 0 4px;
	font-weight: 600;
	line-height: 1.4;
}

/* ---------- Fields ---------- */

.cdd-sd .cdd-sd-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 0 18px;
}

.cdd-sd .cdd-sd-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin: 0 0 18px;
}

.cdd-sd .cdd-sd-field label,
.cdd-sd .cdd-sd-label-static {
	font-weight: 600;
	line-height: 1.4;
}

.cdd-sd .cdd-sd-req {
	color: var(--cdd-error);
	font-weight: 400;
}

.cdd-sd .cdd-sd-help {
	font-size: 0.86em;
	line-height: 1.5;
	color: var(--cdd-ink-soft);
}

.cdd-sd input[type="text"],
.cdd-sd input[type="email"],
.cdd-sd input[type="tel"],
.cdd-sd input[type="url"],
.cdd-sd textarea {
	width: 100%;
	min-height: 46px;
	padding: 11px 13px;
	border: 1px solid var(--cdd-line-strong);
	border-radius: var(--cdd-radius);
	background: #fff;
	color: var(--cdd-ink);

	/* 16px minimum. Below this, iOS Safari zooms the page on focus. */
	font-size: 16px;
	font-family: inherit;
	line-height: 1.5;
}

.cdd-sd textarea {
	min-height: 96px;
	resize: vertical;
}

.cdd-sd input:focus,
.cdd-sd textarea:focus {
	outline: none;
	border-color: var(--cdd-brand);
	box-shadow: 0 0 0 3px rgba(58, 174, 181, 0.2);
}

.cdd-sd input:focus-visible,
.cdd-sd textarea:focus-visible,
.cdd-sd button:focus-visible {
	outline: 2px solid var(--cdd-brand);
	outline-offset: 2px;
}

/* ---------- Choices ---------- */

.cdd-sd .cdd-sd-choices {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 8px;
	margin-top: 10px;
}

.cdd-sd .cdd-sd-choices--inline {
	grid-template-columns: repeat(auto-fit, minmax(120px, max-content));
}

.cdd-sd .cdd-sd-choice {
	display: flex;
	align-items: center;
	gap: 11px;
	min-height: 48px;
	padding: 11px 14px;
	border: 1px solid var(--cdd-line-strong);
	border-radius: var(--cdd-radius);
	background: #fff;
	cursor: pointer;
	line-height: 1.35;
	font-weight: 400;
	transition: border-color 0.12s ease, background-color 0.12s ease;
}

.cdd-sd .cdd-sd-choice--block {
	width: 100%;
}

.cdd-sd .cdd-sd-choice:hover {
	border-color: var(--cdd-brand-lift);
}

.cdd-sd .cdd-sd-choice input {
	width: 19px;
	height: 19px;
	margin: 0;
	flex: none;
	accent-color: var(--cdd-brand);
}

/* Selection changes weight and background as well as colour, so it is
   distinguishable without colour vision and in bright sunlight. */
.cdd-sd .cdd-sd-choice.is-on {
	border-color: var(--cdd-brand);
	background: var(--cdd-wash);
	font-weight: 600;
	box-shadow: inset 0 0 0 1px var(--cdd-brand);
}

.cdd-sd .cdd-sd-choice:focus-within {
	outline: 2px solid var(--cdd-brand);
	outline-offset: 2px;
}

/* ---------- Service area ---------- */

.cdd-sd .cdd-sd-area {
	border: 1px solid var(--cdd-line);
	border-left: 3px solid var(--cdd-brand-lift);
	background: var(--cdd-wash);
	border-radius: 0 var(--cdd-radius) var(--cdd-radius) 0;
	padding: 14px 16px;
}

.cdd-sd .cdd-sd-area p {
	margin: 0 0 10px;
	color: var(--cdd-ink-soft);
	line-height: 1.6;
}

.cdd-sd .cdd-sd-area strong {
	color: var(--cdd-ink);
}

/* ---------- Errors ---------- */

.cdd-sd .cdd-sd-err {
	display: none;
	font-size: 0.86em;
	line-height: 1.45;
	color: var(--cdd-error);
	font-weight: 600;
}

.cdd-sd .cdd-sd-err.is-shown {
	display: block;
}

.cdd-sd .cdd-sd-field.has-error input,
.cdd-sd .cdd-sd-field.has-error textarea {
	border-color: var(--cdd-error);
	background: var(--cdd-error-wash);
}

.cdd-sd .cdd-sd-alert {
	border: 1px solid var(--cdd-error);
	border-left-width: 3px;
	background: var(--cdd-error-wash);
	color: var(--cdd-error);
	border-radius: 0 var(--cdd-radius) var(--cdd-radius) 0;
	padding: 13px 16px;
	margin: 0 0 22px;
	font-weight: 600;
	line-height: 1.55;
}

.cdd-sd .cdd-sd-alert--quiet {
	border-color: var(--cdd-line);
	border-left-color: var(--cdd-brand-lift);
	background: var(--cdd-wash);
	color: var(--cdd-ink-soft);
	font-weight: 400;
}

.cdd-sd .cdd-sd-alert p {
	margin: 0;
}

/* ---------- Submit ---------- */

.cdd-sd .cdd-sd-submit {
	margin-top: 8px;
}

.cdd-sd .cdd-sd-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 14px 32px;
	border: 0;
	border-radius: var(--cdd-radius);
	background: var(--cdd-brand);
	color: #fff;
	font-family: inherit;
	font-size: 1.02em;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.12s ease;
}

.cdd-sd .cdd-sd-button:hover {
	background: #17696f;
}

.cdd-sd .cdd-sd-button[disabled] {
	opacity: 0.62;
	cursor: default;
}

.cdd-sd .cdd-sd-terms {
	margin: 16px 0 0;
	font-size: 0.86em;
	line-height: 1.6;
	color: var(--cdd-ink-soft);
	max-width: 62ch;
}

/* ---------- Confirmation ---------- */

.cdd-sd .cdd-sd-done {
	border: 1px solid var(--cdd-line);
	border-top: 3px solid var(--cdd-ok);
	background: var(--cdd-wash);
	border-radius: 2px;
	padding: 24px 26px;
}

.cdd-sd .cdd-sd-done:focus {
	outline: none;
}

.cdd-sd .cdd-sd-done-title {
	margin: 0 0 10px;
	color: var(--cdd-navy);
}

.cdd-sd .cdd-sd-done-body {
	margin: 0;
	line-height: 1.65;
	color: var(--cdd-ink-soft);
	max-width: 62ch;
}

.cdd-sd .cdd-sd-done-ref {
	margin: 14px 0 0;
	font-size: 0.86em;
	color: var(--cdd-ink-soft);
}

/* ---------- Honeypot ---------- */

/* Removed from the layout and from the accessibility tree. A screen reader
   user is never asked to fill this in; only automation finds it. */
.cdd-sd .cdd-sd-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Administrator-only notice ---------- */

.cdd-sd-pending {
	border: 1px dashed #c3ceca;
	background: #f4f7f6;
	border-radius: 4px;
	padding: 13px 16px;
	margin: 12px 0;
	font-size: 0.92em;
	line-height: 1.55;
	color: #55676f;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.cdd-sd * {
		transition-duration: 0.01ms;
	}
}

/* ---------- Narrow screens ---------- */

@media (max-width: 640px) {
	.cdd-sd .cdd-sd-row {
		grid-template-columns: 1fr;
	}

	.cdd-sd .cdd-sd-choices {
		grid-template-columns: 1fr;
	}

	.cdd-sd .cdd-sd-choices--inline {
		grid-template-columns: 1fr;
	}

	.cdd-sd .cdd-sd-button {
		width: 100%;
	}

	.cdd-sd .cdd-sd-offer {
		padding: 15px 16px;
	}
}

/* ============================================================
   Booking page
   ============================================================ */

.cdd-sd .cdd-sd-booking-title {
	margin: 0 0 0.35em;
}

.cdd-sd .cdd-sd-booking-intro {
	margin: 0 0 1.4em;
	color: var(--cdd-ink-soft);
	line-height: 1.65;
	max-width: 62ch;
}

.cdd-sd .cdd-sd-booking-heading {
	margin: 26px 0 4px;
	font-size: 1.1em;
}

/* Dates are a list, not a grid. A month view on a 360px screen gives 30px
   tap targets; only a handful of dates are ever offered, so a list of real
   ones is easier to tap and easier to decide from. */
.cdd-sd .cdd-sd-dates {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 9px;
	margin-top: 12px;
}

.cdd-sd .cdd-sd-date {
	display: flex;
	align-items: center;
	gap: 13px;
	min-height: 62px;
	padding: 12px 15px;
	border: 1px solid var(--cdd-line-strong);
	border-radius: var(--cdd-radius);
	background: #fff;
	cursor: pointer;
	transition: border-color 0.12s ease, background-color 0.12s ease;
}

.cdd-sd .cdd-sd-date:hover {
	border-color: var(--cdd-brand-lift);
}

.cdd-sd .cdd-sd-date:focus-within {
	outline: 2px solid var(--cdd-brand);
	outline-offset: 2px;
}

.cdd-sd .cdd-sd-date input {
	width: 19px;
	height: 19px;
	margin: 0;
	flex: none;
	accent-color: var(--cdd-brand);
}

.cdd-sd .cdd-sd-date-body {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}

.cdd-sd .cdd-sd-date-dow {
	font-size: 0.76em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cdd-ink-soft);
}

.cdd-sd .cdd-sd-date-main {
	font-size: 1.12em;
	font-weight: 600;
}

.cdd-sd .cdd-sd-date-year {
	font-size: 0.82em;
	color: var(--cdd-ink-soft);
}

.cdd-sd .cdd-sd-date.is-on {
	border-color: var(--cdd-brand);
	background: var(--cdd-wash);
	box-shadow: inset 0 0 0 1px var(--cdd-brand);
}

.cdd-sd .cdd-sd-date.is-on .cdd-sd-date-dow,
.cdd-sd .cdd-sd-date.is-on .cdd-sd-date-year {
	color: var(--cdd-brand);
}

.cdd-sd .cdd-sd-date-group {
	border: 0;
	padding: 0;
	margin: 0 0 18px;
}

/* Hold countdown */

.cdd-sd .cdd-sd-hold-bar {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	background: #fcf6e8;
	border: 1px solid #eddfb8;
	border-radius: var(--cdd-radius);
	padding: 13px 15px;
	margin: 16px 0 4px;
	color: #7a5605;
	line-height: 1.55;
}

.cdd-sd .cdd-sd-hold-bar p {
	margin: 0;
}

.cdd-sd .cdd-sd-hold-icon {
	font-size: 1.1em;
	line-height: 1.3;
}

.cdd-sd .cdd-sd-countdown {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	margin-left: 6px;
}

.cdd-sd .cdd-sd-hold-note {
	display: block;
	font-size: 0.88em;
	opacity: 0.85;
	margin-top: 2px;
}

/* Actions */

.cdd-sd .cdd-sd-booking-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 20px;
}

.cdd-sd .cdd-sd-button-quiet {
	background: none;
	border: 0;
	padding: 12px 4px;
	min-height: 44px;
	color: var(--cdd-ink-soft);
	font-family: inherit;
	font-size: 0.94em;
	text-decoration: underline;
	cursor: pointer;
}

.cdd-sd .cdd-sd-button-quiet:hover {
	color: var(--cdd-brand);
}

.cdd-sd .cdd-sd-secure {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 16px 0 0;
	font-size: 0.88em;
	color: var(--cdd-ink-soft);
	line-height: 1.55;
	max-width: 60ch;
}

.cdd-sd .cdd-sd-lead-note {
	margin: 14px 0 0;
	font-size: 0.86em;
	color: var(--cdd-ink-soft);
	line-height: 1.6;
	max-width: 62ch;
}

.cdd-sd .cdd-sd-invalid-lead {
	font-weight: 600;
	color: var(--cdd-ink);
	margin-bottom: 8px;
}

@media (max-width: 640px) {
	.cdd-sd .cdd-sd-dates {
		grid-template-columns: 1fr;
	}

	.cdd-sd .cdd-sd-booking-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.cdd-sd .cdd-sd-button-quiet {
		width: 100%;
	}
}

/* ---------- Containers ---------- */

/* No visual weight of their own; declared so the stylesheet accounts for
   every class the templates use, and so a theme has a stable hook. */

.cdd-sd .cdd-sd-form-wrap,
.cdd-sd.cdd-sd-form-wrap {
	margin: 0;
}

.cdd-sd .cdd-sd-form,
.cdd-sd.cdd-sd-booking {
	margin: 0;
}

/* ---------- Confirmation ---------- */

.cdd-sd .cdd-sd-receipt {
	border: 1px solid var(--cdd-line);
	border-radius: var(--cdd-radius);
	overflow: hidden;
	margin: 20px 0;
}

.cdd-sd .cdd-sd-receipt-head {
	background: var(--cdd-navy);
	color: #fff;
	padding: 16px 20px;
}

.cdd-sd .cdd-sd-receipt-head strong {
	display: block;
	font-size: 1.18em;
	line-height: 1.3;
}

.cdd-sd .cdd-sd-receipt-head span {
	display: block;
	margin-top: 3px;
	font-size: 0.88em;
	color: #b6d2d4;
}

.cdd-sd .cdd-sd-receipt-rows {
	padding: 4px 20px 14px;
}

.cdd-sd .cdd-sd-receipt-row {
	display: flex;
	justify-content: space-between;
	gap: 18px;
	padding: 10px 0;
	border-bottom: 1px solid var(--cdd-line);
	font-size: 0.94em;
}

.cdd-sd .cdd-sd-receipt-row:last-child {
	border-bottom: 0;
}

.cdd-sd .cdd-sd-receipt-row span {
	color: var(--cdd-ink-soft);
}

.cdd-sd .cdd-sd-receipt-row b {
	font-weight: 600;
	text-align: right;
}

@media (max-width: 640px) {
	.cdd-sd .cdd-sd-receipt-head,
	.cdd-sd .cdd-sd-receipt-rows {
		padding-left: 15px;
		padding-right: 15px;
	}
}
