/**
 * Workshop Service Enquiries — front-end form styles.
 *
 * Self-contained: nothing here depends on the active theme, theme.json presets
 * or other plugins. Text inherits the page's text colour and font; borders,
 * surfaces and muted text are derived from that colour (currentColor), so the
 * defaults stay legible (WCAG 2.2 AA) on light AND dark page backgrounds.
 *
 * Public theming API (optional) — CSS custom properties on .wse-form-wrap:
 *
 *   --wse-accent        Primary buttons, progress, selected cards.   #2563eb
 *   --wse-accent-text   Text on --wse-accent (≥ 4.5:1).               #fff
 *   --wse-bg            Background of text inputs.                    transparent
 *   --wse-surface       Card / notice tint.                           currentColor 6%
 *   --wse-text          Form text colour.                             currentColor (inherits the page)
 *   --wse-muted         Help and secondary text.                      --wse-text 80%
 *   --wse-border        Form-control boundaries (≥ 3:1).              --wse-text 65%
 *   --wse-error         Error icons, bars and borders.                #d93025
 *   --wse-success       Success icon and border.                      #15803d
 *   --wse-radius        Inputs, cards and panels.                     8px
 *   --wse-radius-pill   Buttons.                                      999px
 *   --wse-font-heading  Headings and buttons.                         inherit
 *   --wse-font-body     Labels and inputs.                            inherit
 *   --wse-focus         Focus ring (paired with a currentColor halo). --wse-accent
 *
 * Defaults are declared with zero specificity, so any rule that targets the
 * wrapper overrides them, e.g.:
 *
 *   .wse-form-wrap { --wse-accent: #b91c1c; --wse-radius: 4px; }
 *
 * Error and success message TEXT is derived by mixing --wse-error /
 * --wse-success with the text colour, so it adapts to light and dark pages.
 * Other --wse-* properties are private implementation details.
 *
 * Structure rules use `.wse-form-wrap .wse-form element.class` (specificity
 * ≥ 0,3,1) so typical global theme rules for input, textarea, button,
 * fieldset, legend, summary and lists cannot break the form.
 *
 * @package WorkshopServiceEnquiries
 */

/* -------------------------------------------------------------------------
 * Tokens.
 * ---------------------------------------------------------------------- */

:where(.wse-form-wrap) {

	/* Public API. */
	--wse-accent: #2563eb;
	--wse-accent-text: #fff;
	--wse-bg: transparent;
	--wse-text: currentColor;
	--wse-surface: color-mix(in srgb, var(--wse-text) 6%, transparent);
	--wse-muted: color-mix(in srgb, var(--wse-text) 80%, transparent);
	--wse-border: color-mix(in srgb, var(--wse-text) 65%, transparent);
	--wse-error: #d93025;
	--wse-success: #15803d;
	--wse-radius: 8px;
	--wse-radius-pill: 999px;
	--wse-font-heading: inherit;
	--wse-font-body: inherit;
	--wse-focus: var(--wse-accent);

	/* Private, derived. */
	--wse-border-subtle: color-mix(in srgb, var(--wse-text) 35%, transparent);
	--wse-accent-hover: color-mix(in srgb, var(--wse-accent) 86%, #000);
	--wse-accent-tint: color-mix(in srgb, var(--wse-accent) 8%, transparent);
	--wse-error-text: color-mix(in srgb, var(--wse-error) 50%, var(--wse-text));
	--wse-error-tint: color-mix(in srgb, var(--wse-error) 8%, transparent);
	--wse-on-error: #fff;
	--wse-success-text: color-mix(in srgb, var(--wse-success) 50%, var(--wse-text));
	--wse-success-tint: color-mix(in srgb, var(--wse-success) 8%, transparent);
	--wse-focus-width: 3px;
	--wse-space-1: 0.25rem;
	--wse-space-2: 0.5rem;
	--wse-space-3: 0.75rem;
	--wse-space-4: 1rem;
	--wse-space-5: 1.5rem;
	--wse-space-6: 2rem;
	--wse-font-size-small: max(0.9375rem, 15px);
	--wse-font-size-control: max(1rem, 16px);
}

/* Browsers without color-mix(): solid, full-contrast equivalents. */
@supports not (color: color-mix(in srgb, red, blue)) {

	:where(.wse-form-wrap) {
		--wse-surface: transparent;
		--wse-muted: var(--wse-text);
		--wse-border: var(--wse-text);
		--wse-border-subtle: var(--wse-text);
		--wse-accent-hover: var(--wse-accent);
		--wse-accent-tint: transparent;
		--wse-error-text: var(--wse-text);
		--wse-error-tint: transparent;
		--wse-success-text: var(--wse-text);
		--wse-success-tint: transparent;
	}
}

/* -------------------------------------------------------------------------
 * Wrapper.
 * ---------------------------------------------------------------------- */

.wse-form-wrap {
	box-sizing: border-box;
	max-width: 100%;
	margin-block: var(--wse-space-5);
	color: var(--wse-text);
	font-family: var(--wse-font-body, inherit);
	line-height: 1.5;
	text-align: start;
	overflow-wrap: break-word;
}

.wse-form-wrap *,
.wse-form-wrap *::before,
.wse-form-wrap *::after {
	box-sizing: inherit;
}

.wse-form-wrap [hidden] {
	display: none !important;
}

/* -------------------------------------------------------------------------
 * Utilities.
 * ---------------------------------------------------------------------- */

.wse-form-wrap .wse-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Honeypot: off-screen (not display:none) so simple bots still fill it in. */
.wse-form-wrap .wse-hp {
	position: absolute !important;
	top: auto !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

[dir="rtl"] .wse-form-wrap .wse-hp {
	right: -10000px !important;
	left: auto !important;
}

.wse-form-wrap .wse-progress,
.wse-form-wrap .wse-step-heading,
.wse-form-wrap .wse-error-summary,
.wse-form-wrap .wse-success,
.wse-form-wrap .wse-field {
	scroll-margin-top: 5rem;
}

/* -------------------------------------------------------------------------
 * Text elements (headings, paragraphs, links).
 * ---------------------------------------------------------------------- */

.wse-form-wrap .wse-form {
	margin: 0;
	padding: 0;
}

.wse-form-wrap h2.wse-step-heading,
.wse-form-wrap h3.wse-service-group-title,
.wse-form-wrap h3.wse-summary-title,
.wse-form-wrap h2.wse-error-summary-title,
.wse-form-wrap h2.wse-success-title {
	padding: 0;
	color: inherit;
	font-family: var(--wse-font-heading, inherit);
	font-style: normal;
	font-weight: 700;
	letter-spacing: normal;
	text-transform: none;
	background: none;
	border: 0;
}

.wse-form-wrap p.wse-form-intro,
.wse-form-wrap p.wse-required-note {
	margin: 0 0 var(--wse-space-3);
}

.wse-form-wrap .wse-required {
	margin-inline-start: 0.15em;
	color: var(--wse-error-text);
	font-weight: 700;
}

.wse-form-wrap .wse-help a,
.wse-form-wrap .wse-error-summary a {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: max(1px, 0.0625em);
	text-underline-offset: 0.15em;
}

.wse-form-wrap .wse-help a:hover,
.wse-form-wrap .wse-error-summary a:hover {
	text-decoration-thickness: max(2px, 0.125em);
}

/* -------------------------------------------------------------------------
 * Notes and notices.
 * ---------------------------------------------------------------------- */

.wse-form-wrap p.wse-estimate-note,
.wse-form-wrap p.wse-notice,
.wse-form-wrap p.wse-no-services {
	margin: var(--wse-space-3) 0;
	padding: var(--wse-space-3) var(--wse-space-4);
	color: inherit;
	font-size: var(--wse-font-size-small);
	background: var(--wse-surface);
	border: 0;
	border-inline-start: 4px solid var(--wse-accent);
	border-radius: 0;
	border-start-end-radius: var(--wse-radius);
	border-end-end-radius: var(--wse-radius);
}

.wse-form-wrap p.wse-no-services {
	margin: 0;
	padding: var(--wse-space-4);
	font-size: inherit;
}

/* -------------------------------------------------------------------------
 * Error summary.
 * ---------------------------------------------------------------------- */

.wse-form-wrap .wse-error-summary {
	margin: 0 0 var(--wse-space-5);
	padding: var(--wse-space-4) var(--wse-space-5);
	color: inherit;
	background: var(--wse-error-tint);
	border: 3px solid var(--wse-error);
	border-inline-start-width: 8px;
	border-radius: var(--wse-radius);
}

.wse-form-wrap h2.wse-error-summary-title {
	display: flex;
	gap: var(--wse-space-2);
	align-items: center;
	margin: 0 0 var(--wse-space-2);
	font-size: max(1.25rem, 20px);
	line-height: 1.3;
}

.wse-form-wrap .wse-error-summary-title::before,
.wse-form-wrap .wse-field-error::before {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 1.25em;
	height: 1.25em;
	color: var(--wse-on-error);
	font-family: inherit;
	font-size: 0.875em;
	font-weight: 700;
	line-height: 1;
	background: var(--wse-error);
	border-radius: 50%;
	content: "!";
	content: "!" / "";
}

.wse-form-wrap p.wse-error-summary-general {
	margin: 0 0 var(--wse-space-2);
	font-weight: 600;
}

.wse-form-wrap ul.wse-error-summary-list {
	margin: 0;
	padding: 0;
	padding-inline-start: 1.25rem;
	list-style: disc;
}

.wse-form-wrap ul.wse-error-summary-list > li {
	margin: var(--wse-space-1) 0;
	padding: 0;
}

.wse-form-wrap .wse-error-summary-list a {
	color: var(--wse-error-text);
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Progress indicator (revealed by JavaScript).
 * ---------------------------------------------------------------------- */

.wse-form-wrap ol.wse-progress {
	display: flex;
	gap: var(--wse-space-2);
	margin: 0 0 var(--wse-space-5);
	padding: 0;
	list-style: none;
}

.wse-form-wrap ol.wse-progress > li.wse-progress-step {
	display: flex;
	flex: 0 0 auto;
	gap: var(--wse-space-2);
	align-items: center;
	min-width: 0;
	margin: 0;
	padding: var(--wse-space-2) 0 0;
	font-size: max(0.875rem, 14px);
	line-height: 1.3;
	list-style: none;
	background: none;
	border: 0;
	border-top: 4px solid var(--wse-border);
}

.wse-form-wrap ol.wse-progress > li.wse-progress-step::before,
.wse-form-wrap ul.wse-price-list > li::before {
	content: none;
}

.wse-form-wrap ol.wse-progress > li.wse-progress-current {
	flex: 1 1 auto;
	font-weight: 700;
	border-top-color: var(--wse-accent);
}

.wse-form-wrap ol.wse-progress > li.wse-progress-complete {
	border-top-color: var(--wse-accent);
}

.wse-form-wrap .wse-progress-number {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	min-width: 28px;
	height: 1.75rem;
	min-height: 28px;
	font-weight: 700;
	line-height: 1;
	border: 2px solid currentColor;
	border-radius: 50%;
}

.wse-form-wrap .wse-progress-current .wse-progress-number {
	color: var(--wse-accent-text);
	background: var(--wse-accent);
	border-color: var(--wse-accent);
}

/* On narrow screens only the current step shows its label. */
.wse-form-wrap .wse-progress-step:not(.wse-progress-current) .wse-progress-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.wse-form-wrap .wse-progress-label {
	min-width: 0;
	overflow-wrap: anywhere;
}

/* -------------------------------------------------------------------------
 * Steps.
 * ---------------------------------------------------------------------- */

.wse-form-wrap .wse-form fieldset.wse-step {
	display: block;
	min-width: 0;
	margin: 0 0 var(--wse-space-6);
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.wse-form-wrap.wse-js .wse-form fieldset.wse-step {
	margin-bottom: var(--wse-space-4);
}

.wse-form-wrap .wse-form legend.wse-step-title {
	display: block;
	float: none;
	width: 100%;
	max-width: 100%;
	margin: 0 0 var(--wse-space-2);
	padding: 0;
	color: inherit;
	font-size: inherit;
	white-space: normal;
	text-transform: none;
	background: none;
	border: 0;
}

.wse-form-wrap h2.wse-step-heading {
	margin: 0;
	font-size: max(1.375rem, 22px);
	line-height: 1.25;
}

.wse-form-wrap .wse-step-count {
	display: block;
	margin-bottom: var(--wse-space-1);
	color: var(--wse-muted);
	font-family: var(--wse-font-body, inherit);
	font-size: max(0.875rem, 14px);
	font-weight: 600;
	letter-spacing: 0.02em;
}

.wse-form-wrap p.wse-step-description {
	margin: 0 0 var(--wse-space-4);
}

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

.wse-form-wrap .wse-fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wse-space-5);
}

.wse-form-wrap .wse-field {
	min-width: 0;
}

.wse-form-wrap .wse-form label.wse-label,
.wse-form-wrap .wse-form legend.wse-services-legend {
	display: block;
	float: none;
	width: auto;
	margin: 0 0 var(--wse-space-1);
	padding: 0;
	color: inherit;
	font-family: var(--wse-font-body, inherit);
	font-size: inherit;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
	border: 0;
}

.wse-form-wrap .wse-form input.wse-input,
.wse-form-wrap .wse-form textarea.wse-textarea {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	height: auto;
	min-height: 44px;
	margin: 0;
	padding: 0.5rem 0.75rem;
	color: var(--wse-text);
	font-family: var(--wse-font-body, inherit);
	font-size: var(--wse-font-size-control);
	font-style: normal;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: normal;
	text-align: start;
	text-indent: 0;
	text-shadow: none;
	text-transform: none;
	background: var(--wse-bg);
	border: 2px solid var(--wse-border);
	border-radius: var(--wse-radius);
	box-shadow: none;
	opacity: 1;
	-webkit-appearance: none;
	appearance: none;
}

.wse-form-wrap .wse-form textarea.wse-textarea {
	min-height: 8rem;
	resize: vertical;
}

.wse-form-wrap .wse-form input.wse-input::placeholder,
.wse-form-wrap .wse-form textarea.wse-textarea::placeholder {
	color: var(--wse-muted);
	opacity: 1;
}

.wse-form-wrap .wse-form .wse-field-type-date input.wse-input {
	max-width: 20rem;
}

.wse-form-wrap .wse-form .wse-field-registration input.wse-input {
	text-transform: uppercase;
}

/* Date input internals (Chromium/WebKit): keep the value and icon legible on dark pages. */
.wse-form-wrap .wse-form input[type="date"].wse-input::-webkit-date-and-time-value {
	min-height: 1.4em;
	text-align: start;
}

.wse-form-wrap .wse-form input[type="date"].wse-input::-webkit-calendar-picker-indicator {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	margin-inline-start: var(--wse-space-2);
	padding: 0;
	background: currentColor;
	opacity: 1;
	cursor: pointer;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wse-form-wrap p.wse-help {
	margin: var(--wse-space-1) 0 0;
	color: var(--wse-muted);
	font-size: var(--wse-font-size-small);
}

.wse-form-wrap .wse-form p.wse-notice {
	margin-bottom: 0;
}

.wse-form-wrap p.wse-field-error {
	display: flex;
	gap: var(--wse-space-2);
	align-items: flex-start;
	margin: var(--wse-space-2) 0 0;
	padding: 0;
	color: var(--wse-error-text);
	font-weight: 600;
}

.wse-form-wrap .wse-field-error::before {
	margin-top: 0.15em;
}

.wse-form-wrap .wse-form .wse-has-error input.wse-input,
.wse-form-wrap .wse-form .wse-has-error textarea.wse-textarea {
	border-color: var(--wse-error);
	border-inline-start-width: 6px;
}

.wse-form-wrap .wse-form .wse-has-error fieldset.wse-services,
.wse-form-wrap .wse-form .wse-field-type-checkbox.wse-has-error .wse-checkbox {
	padding-inline-start: var(--wse-space-3);
	border-inline-start: 4px solid var(--wse-error);
}

/* Checkboxes: native control, accent colour, ≥ 44px label hit area. */
.wse-form-wrap .wse-checkbox,
.wse-form-wrap .wse-service-header {
	position: relative;
}

.wse-form-wrap .wse-form input[type="checkbox"].wse-checkbox-input,
.wse-form-wrap .wse-form input[type="checkbox"].wse-service-checkbox {
	display: block;
	position: absolute;
	top: 0.625rem;
	inset-inline-start: 0.625rem;
	width: max(1.5rem, 24px);
	min-width: 0;
	max-width: none;
	height: max(1.5rem, 24px);
	min-height: 0;
	margin: 0;
	padding: 0;
	color: var(--wse-text);
	opacity: 1;
	visibility: visible;
	accent-color: var(--wse-accent);
	cursor: pointer;
	clip: auto;
	clip-path: none;
	-webkit-appearance: auto;
	appearance: auto;
}

.wse-form-wrap .wse-form input[type="checkbox"].wse-checkbox-input {
	inset-inline-start: 0;
}

.wse-form-wrap .wse-form label.wse-checkbox-label,
.wse-form-wrap .wse-form label.wse-service-title {
	display: block;
	float: none;
	width: auto;
	min-height: 44px;
	margin: 0;
	padding-block: 0.625rem;
	padding-inline: 2.25rem 0;
	color: inherit;
	font-family: var(--wse-font-body, inherit);
	font-size: inherit;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
}

.wse-form-wrap .wse-form .wse-field-type-checkbox.wse-has-error input[type="checkbox"].wse-checkbox-input {
	inset-inline-start: var(--wse-space-3);
}

.wse-form-wrap .wse-form .wse-field-type-checkbox.wse-has-error label.wse-checkbox-label {
	padding-inline-start: 2.25rem;
}

/* -------------------------------------------------------------------------
 * Services.
 * ---------------------------------------------------------------------- */

.wse-form-wrap .wse-form fieldset.wse-services {
	display: block;
	min-width: 0;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
}

.wse-form-wrap .wse-service-group {
	margin: var(--wse-space-5) 0 0;
}

.wse-form-wrap h3.wse-service-group-title {
	margin: 0 0 var(--wse-space-3);
	font-size: max(1.125rem, 18px);
	line-height: 1.3;
}

/*
 * One service per row: expanding a service's details never stretches
 * neighbouring cards, and long checklists stay readable.
 */
.wse-form-wrap .wse-service-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
	gap: var(--wse-space-3);
}

.wse-form-wrap .wse-service {
	min-width: 0;
	padding-bottom: var(--wse-space-3);
	background: var(--wse-surface);
	border: 2px solid var(--wse-border-subtle);
	border-radius: var(--wse-radius);
}

.wse-form-wrap .wse-service-selected,
.wse-form-wrap .wse-service:has(.wse-service-checkbox:checked) {
	background: var(--wse-accent-tint);
	border-color: var(--wse-accent);
}

/* The label covers the whole card header so the hit area is at least 44px. */
.wse-form-wrap .wse-form label.wse-service-title {
	padding-block: 0.625rem 0.25rem;
	padding-inline: 2.75rem 0.75rem;
	font-weight: 600;
}

.wse-form-wrap .wse-form ul.wse-price-list {
	margin: 0;
	padding: 0 0.75rem;
	font-size: var(--wse-font-size-small);
	list-style: none;
}

.wse-form-wrap .wse-form ul.wse-price-list > li {
	margin: 0.125rem 0;
	padding: 0;
	list-style: none;
}

.wse-form-wrap .wse-price-label {
	font-weight: 600;
}

.wse-form-wrap .wse-price-amount {
	font-variant-numeric: tabular-nums;
}

.wse-form-wrap .wse-price-note {
	color: var(--wse-muted);
}

.wse-form-wrap .wse-form details.wse-service-details {
	margin: var(--wse-space-2) 0.75rem 0;
	padding: 0;
	background: none;
	border: 0;
}

/* "Prices" disclosure: the card shows only its title row until opened. */
.wse-form-wrap .wse-form details.wse-service-prices {
	margin: 0;
	padding: 0 0 var(--wse-space-1);
	background: none;
	border: 0;
}

.wse-form-wrap .wse-form details.wse-service-prices > summary {
	margin: 0 0.75rem;
}

.wse-form-wrap .wse-form details.wse-service-prices > ul.wse-price-list {
	margin-top: var(--wse-space-1);
}

/* With JavaScript the summary is replaced by a toggle button in the title row. */
.wse-form-wrap .wse-form button.wse-service-toggle {
	display: inline-flex;
	flex: none;
	gap: var(--wse-space-2);
	align-items: center;
	min-height: 44px;
	margin: 0;
	padding: 0 0.75rem;
	color: inherit;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-decoration: underline;
	text-transform: none;
	text-underline-offset: 0.15em;
	background: none;
	border: 0;
	border-radius: var(--wse-radius);
	box-shadow: none;
	cursor: pointer;
}

.wse-form-wrap .wse-form button.wse-service-toggle .wse-service-toggle-icon {
	display: block;
	flex: none;
	width: 0.5em;
	height: 0.5em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.15s ease-in-out;
}

.wse-form-wrap .wse-form button.wse-service-toggle[aria-expanded="true"] .wse-service-toggle-icon {
	transform: rotate(-135deg);
}

.wse-form-wrap .wse-service-enhanced .wse-service-header {
	display: flex;
	gap: var(--wse-space-2);
	align-items: center;
	cursor: pointer;
}

.wse-form-wrap .wse-form .wse-service-enhanced label.wse-service-title {
	flex: 1 1 auto;
	min-width: 0;
}

.wse-form-wrap .wse-form details.wse-service-details > summary,
.wse-form-wrap .wse-form details.wse-service-prices > summary {
	display: inline-flex;
	gap: var(--wse-space-2);
	align-items: center;
	min-height: 44px;
	margin: 0;
	padding: 0 var(--wse-space-1);
	color: inherit;
	font-size: inherit;
	font-weight: 600;
	letter-spacing: normal;
	text-decoration: underline;
	text-transform: none;
	text-underline-offset: 0.15em;
	list-style: none;
	background: none;
	border: 0;
	cursor: pointer;
}

.wse-form-wrap .wse-form details.wse-service-details > summary::-webkit-details-marker,
.wse-form-wrap .wse-form details.wse-service-prices > summary::-webkit-details-marker {
	display: none;
}

.wse-form-wrap .wse-form details.wse-service-details > summary::before,
.wse-form-wrap .wse-form details.wse-service-prices > summary::before {
	display: block;
	flex: none;
	width: 0.5em;
	height: 0.5em;
	margin: 0;
	border: 0;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform 0.15s ease-in-out;
	content: "";
}

.wse-form-wrap .wse-form details.wse-service-details > summary::after,
.wse-form-wrap .wse-form details.wse-service-prices > summary::after {
	content: none;
}

[dir="rtl"] .wse-form-wrap .wse-form details.wse-service-details > summary::before,
.wse-form-wrap .wse-form details.wse-service-prices > summary::before {
	transform: rotate(135deg);
}

.wse-form-wrap .wse-form details.wse-service-details[open] > summary::before,
.wse-form-wrap .wse-form details.wse-service-prices[open] > summary::before {
	transform: rotate(45deg);
}

.wse-form-wrap .wse-service-description {
	padding: 0 0 var(--wse-space-2);
	font-size: var(--wse-font-size-small);
}

.wse-form-wrap .wse-service-description > :first-child {
	margin-top: 0;
}

.wse-form-wrap .wse-service-description > :last-child {
	margin-bottom: 0;
}

.wse-form-wrap .wse-service-description p,
.wse-form-wrap .wse-service-description ul,
.wse-form-wrap .wse-service-description ol {
	margin: var(--wse-space-2) 0;
}

.wse-form-wrap .wse-service-description ul,
.wse-form-wrap .wse-service-description ol {
	padding: 0;
	padding-inline-start: 1.25rem;
}

.wse-form-wrap .wse-service-description ul {
	list-style: disc;
}

.wse-form-wrap .wse-service-description ol {
	list-style: decimal;
}

.wse-form-wrap .wse-service-description li,
.wse-form-wrap ul.wse-summary-services > li {
	margin: 0.125rem 0;
	padding: 0;
}

.wse-form-wrap .wse-service-description h3,
.wse-form-wrap .wse-service-description h4 {
	margin: var(--wse-space-3) 0 var(--wse-space-1);
	color: inherit;
	font-size: 1em;
	text-transform: none;
}

/* -------------------------------------------------------------------------
 * Review panel.
 * ---------------------------------------------------------------------- */

.wse-form-wrap .wse-summary {
	margin: var(--wse-space-5) 0 0;
	padding: var(--wse-space-4);
	border: 2px solid var(--wse-border-subtle);
	border-radius: var(--wse-radius);
}

.wse-form-wrap h3.wse-summary-title {
	margin: 0 0 var(--wse-space-2);
	font-size: max(1.125rem, 18px);
	line-height: 1.3;
}

.wse-form-wrap dl.wse-summary-list {
	margin: 0;
	padding: 0;
}

.wse-form-wrap .wse-summary-row {
	padding: var(--wse-space-2) 0;
	border-top: 1px solid var(--wse-border-subtle);
}

.wse-form-wrap .wse-summary-row:first-child {
	border-top: 0;
}

.wse-form-wrap .wse-summary-row > dt {
	margin: 0;
	padding: 0;
	font-weight: 600;
}

.wse-form-wrap .wse-summary-row > dd {
	margin: 0;
	padding: 0;
}

.wse-form-wrap ul.wse-summary-services {
	margin: 0;
	padding: 0;
	padding-inline-start: 1.25rem;
	list-style: disc;
}

.wse-form-wrap .wse-summary p.wse-estimate-note {
	margin-bottom: 0;
}

/* -------------------------------------------------------------------------
 * Buttons and actions.
 * ---------------------------------------------------------------------- */

.wse-form-wrap .wse-form-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wse-space-3);
	align-items: center;
	margin-top: var(--wse-space-4);
}

.wse-form-wrap p.wse-submit-note {
	flex: 1 1 100%;
	order: -1;
	margin: 0;
	font-size: var(--wse-font-size-small);
}

.wse-form-wrap .wse-step-nav {
	display: flex;
	flex: 1 1 100%;
	flex-wrap: wrap;
	gap: var(--wse-space-3);
}

.wse-form-wrap .wse-form button.wse-button {
	display: inline-flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	gap: var(--wse-space-2);
	width: auto;
	min-width: 44px;
	max-width: 100%;
	height: auto;
	min-height: 48px;
	margin: 0;
	padding: 0.625rem 1.5rem;
	color: var(--wse-text);
	font-family: var(--wse-font-heading, inherit);
	font-size: var(--wse-font-size-control);
	font-style: normal;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: normal;
	text-align: center;
	text-decoration: none;
	text-shadow: none;
	text-transform: none;
	white-space: normal;
	background: transparent;
	border: 2px solid var(--wse-border);
	border-radius: var(--wse-radius-pill);
	box-shadow: none;
	opacity: 1;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.wse-form-wrap .wse-form button.wse-button-primary,
.wse-form-wrap .wse-form button.wse-button[data-wse-next] {
	color: var(--wse-accent-text);
	background: var(--wse-accent);
	border-color: var(--wse-accent);
}

.wse-form-wrap .wse-form button.wse-button-primary:hover,
.wse-form-wrap .wse-form button.wse-button[data-wse-next]:hover {
	color: var(--wse-accent-text);
	background: var(--wse-accent-hover);
	border-color: var(--wse-accent-hover);
}

.wse-form-wrap .wse-form button.wse-button-secondary:not([data-wse-next]),
.wse-form-wrap .wse-form button.wse-button-secondary:not([data-wse-next]):hover {
	color: var(--wse-text);
	background: transparent;
	border-color: var(--wse-border);
}

.wse-form-wrap .wse-form button.wse-button-secondary:not([data-wse-next]):hover {
	border-color: var(--wse-text);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.wse-form-wrap .wse-form button.wse-button[aria-disabled="true"],
.wse-form-wrap .wse-form button.wse-button[aria-disabled="true"]:hover {
	cursor: progress;
}

.wse-form-wrap .wse-form button.wse-button-primary[aria-disabled="true"],
.wse-form-wrap .wse-form button.wse-button-primary[aria-disabled="true"]:hover {
	background: var(--wse-accent);
	border-color: var(--wse-accent);
}

/* Busy spinner (static when reduced motion is preferred). */
.wse-form-wrap .wse-form button.wse-button[aria-disabled="true"]::after {
	display: inline-block;
	flex: none;
	width: 1em;
	height: 1em;
	border: 2px solid currentColor;
	border-inline-end-color: transparent;
	border-radius: 50%;
	animation: wse-spin 0.8s linear infinite;
	content: "";
}

@keyframes wse-spin {

	to {
		transform: rotate(360deg);
	}
}

/* -------------------------------------------------------------------------
 * Focus: 3px ring in --wse-focus plus a 2px currentColor halo in the gap, so
 * one of the two tones always contrasts with the page.
 * ---------------------------------------------------------------------- */

.wse-form-wrap a:focus-visible,
.wse-form-wrap [tabindex="-1"]:focus-visible,
.wse-form-wrap .wse-form details.wse-service-details > summary:focus-visible,
.wse-form-wrap .wse-form details.wse-service-prices > summary:focus-visible,
.wse-form-wrap .wse-form button.wse-service-toggle:focus-visible,
.wse-form-wrap .wse-form input.wse-input:focus-visible,
.wse-form-wrap .wse-form textarea.wse-textarea:focus-visible,
.wse-form-wrap .wse-form input[type="checkbox"].wse-checkbox-input:focus-visible,
.wse-form-wrap .wse-form input[type="checkbox"].wse-service-checkbox:focus-visible,
.wse-form-wrap .wse-form button.wse-button:focus-visible {
	outline: var(--wse-focus-width) solid var(--wse-focus);
	outline-offset: 2px;
	box-shadow: 0 0 0 2px currentColor;
}

/* Inner ring keeps focus obvious on the filled accent buttons. */
.wse-form-wrap .wse-form button.wse-button-primary:focus-visible,
.wse-form-wrap .wse-form button.wse-button[data-wse-next]:focus-visible {
	box-shadow: 0 0 0 2px var(--wse-accent-text), inset 0 0 0 2px var(--wse-accent-text);
}

.wse-form-wrap [tabindex="-1"]:focus:not(:focus-visible) {
	outline: none;
}

/* -------------------------------------------------------------------------
 * Success panel.
 * ---------------------------------------------------------------------- */

.wse-form-wrap .wse-success {
	padding: var(--wse-space-4) var(--wse-space-5);
	color: inherit;
	background: var(--wse-success-tint);
	border: 3px solid var(--wse-success);
	border-inline-start-width: 8px;
	border-radius: var(--wse-radius);
}

.wse-form-wrap h2.wse-success-title {
	display: flex;
	gap: var(--wse-space-2);
	align-items: center;
	margin: 0 0 var(--wse-space-3);
	color: var(--wse-success-text);
	font-size: max(1.375rem, 22px);
	line-height: 1.3;
}

.wse-form-wrap .wse-success-title::before {
	flex: none;
	width: 0.45em;
	height: 0.8em;
	margin: 0 0.3em 0.2em;
	border-right: 3px solid var(--wse-success);
	border-bottom: 3px solid var(--wse-success);
	transform: rotate(45deg);
	content: "";
}

.wse-form-wrap .wse-success-message p {
	margin: 0 0 var(--wse-space-3);
}

.wse-form-wrap p.wse-success-reference {
	margin: 0 0 var(--wse-space-3);
}

.wse-form-wrap .wse-success-reference strong {
	font-size: max(1.125rem, 18px);
	font-weight: 700;
	letter-spacing: 0.02em;
	overflow-wrap: anywhere;
}

.wse-form-wrap p.wse-success-note {
	margin: 0;
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Larger screens.
 * ---------------------------------------------------------------------- */

@media (min-width: 480px) {

	.wse-form-wrap ol.wse-progress {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.wse-form-wrap ol.wse-progress > li.wse-progress-step {
		flex-direction: column;
		align-items: flex-start;
	}

	.wse-form-wrap .wse-progress-step:not(.wse-progress-current) .wse-progress-label {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
		clip-path: none;
		white-space: normal;
	}

	.wse-form-wrap .wse-form ul.wse-price-list {
		padding-inline-start: 2.75rem;
	}

	.wse-form-wrap .wse-form details.wse-service-details {
		margin-inline-start: 2.5rem;
	}

	.wse-form-wrap .wse-step-nav {
		flex: 1 1 auto;
	}

	.wse-form-wrap .wse-form button.wse-button {
		flex: 0 0 auto;
	}

	.wse-form-wrap .wse-form .wse-step-nav button.wse-button[data-wse-next],
	.wse-form-wrap .wse-form button.wse-button.wse-submit {
		margin-inline-start: auto;
	}
}

@media (min-width: 640px) {

	/* Short text fields sit side by side when the form itself has room. */
	.wse-form-wrap .wse-step[data-wse-step="1"] .wse-fields,
	.wse-form-wrap .wse-step[data-wse-step="4"] .wse-fields {
		grid-template-columns: repeat(auto-fit, minmax(min(100%, max(15rem, calc((100% - var(--wse-space-5)) / 2))), 1fr));
		column-gap: var(--wse-space-5);
	}

	.wse-form-wrap .wse-step[data-wse-step="1"] .wse-field-type-textarea,
	.wse-form-wrap .wse-step[data-wse-step="4"] .wse-field-type-textarea,
	.wse-form-wrap .wse-step[data-wse-step="1"] .wse-field-type-checkbox,
	.wse-form-wrap .wse-step[data-wse-step="4"] .wse-field-type-checkbox,
	.wse-form-wrap .wse-step[data-wse-step="4"] .wse-field-turnstile {
		grid-column: 1 / -1;
	}

	.wse-form-wrap h2.wse-step-heading {
		font-size: max(1.5rem, 24px);
	}
}

/* -------------------------------------------------------------------------
 * User preferences.
 * ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

	.wse-form-wrap *,
	.wse-form-wrap *::before,
	.wse-form-wrap *::after {
		scroll-behavior: auto !important;
		transition: none !important;
		animation: none !important;
	}
}

@media (forced-colors: active) {

	.wse-form-wrap .wse-form input.wse-input,
	.wse-form-wrap .wse-form textarea.wse-textarea,
	.wse-form-wrap .wse-service,
	.wse-form-wrap .wse-summary,
	.wse-form-wrap p.wse-estimate-note,
	.wse-form-wrap p.wse-notice,
	.wse-form-wrap p.wse-no-services,
	.wse-form-wrap .wse-error-summary,
	.wse-form-wrap .wse-success {
		border-color: CanvasText;
	}

	.wse-form-wrap p.wse-estimate-note,
	.wse-form-wrap p.wse-notice,
	.wse-form-wrap p.wse-no-services {
		border: 2px solid CanvasText;
	}

	.wse-form-wrap .wse-form button.wse-button {
		border-color: ButtonText;
	}

	.wse-form-wrap a:focus-visible,
	.wse-form-wrap [tabindex="-1"]:focus-visible,
	.wse-form-wrap .wse-form details.wse-service-details > summary:focus-visible,
.wse-form-wrap .wse-form details.wse-service-prices > summary:focus-visible,
	.wse-form-wrap .wse-form button.wse-service-toggle:focus-visible,
	.wse-form-wrap .wse-form input.wse-input:focus-visible,
	.wse-form-wrap .wse-form textarea.wse-textarea:focus-visible,
	.wse-form-wrap .wse-form input[type="checkbox"].wse-checkbox-input:focus-visible,
	.wse-form-wrap .wse-form input[type="checkbox"].wse-service-checkbox:focus-visible,
	.wse-form-wrap .wse-form button.wse-button:focus-visible {
		outline-color: Highlight;
	}

	.wse-form-wrap .wse-service-selected,
	.wse-form-wrap .wse-service:has(.wse-service-checkbox:checked) {
		outline: 3px solid Highlight;
		outline-offset: -3px;
	}

	.wse-form-wrap .wse-error-summary-title::before,
	.wse-form-wrap .wse-field-error::before {
		color: CanvasText;
		background: Canvas;
		border: 2px solid CanvasText;
		forced-color-adjust: none;
	}

	.wse-form-wrap .wse-form .wse-has-error input.wse-input,
	.wse-form-wrap .wse-form .wse-has-error textarea.wse-textarea {
		border-inline-start-width: 6px;
	}

	.wse-form-wrap ol.wse-progress > li.wse-progress-step,
	.wse-form-wrap ol.wse-progress > li.wse-progress-complete {
		border-top-color: CanvasText;
	}

	.wse-form-wrap ol.wse-progress > li.wse-progress-current {
		border-top-color: Highlight;
	}

	.wse-form-wrap .wse-progress-current .wse-progress-number {
		color: HighlightText;
		background: Highlight;
		border-color: Highlight;
		forced-color-adjust: none;
	}

	.wse-form-wrap .wse-form button.wse-button[aria-disabled="true"] {
		color: GrayText;
		border-color: GrayText;
	}

	.wse-form-wrap .wse-form details.wse-service-details > summary::before,
.wse-form-wrap .wse-form details.wse-service-prices > summary::before,
	.wse-form-wrap .wse-success-title::before {
		border-color: CanvasText;
	}

	.wse-form-wrap .wse-form input[type="date"].wse-input::-webkit-calendar-picker-indicator {
		background: CanvasText;
		forced-color-adjust: none;
	}
}
