/*
 * Exceeding Limits Cleaning booking form.
 * Inherits the theme's fonts. Change the accent colour under Bookings > Settings.
 */

.elc {
	--elc-accent: #0f5b66;
	--elc-ink: #1b2b2e;
	--elc-muted: #56676a;
	--elc-line: #cfdbda;
	--elc-tint: #edf5f4;
	--elc-surface: #ffffff;
	--elc-error: #b42318;

	max-width: 1080px;
	margin: 0 auto;
	color: var(--elc-ink);
	line-height: 1.5;
}

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

.elc [hidden] {
	display: none !important;
}

.elc-form {
	display: grid;
	gap: 32px;
}

@media (min-width: 900px) {
	.elc-form {
		grid-template-columns: minmax(0, 1fr) 320px;
		align-items: start;
		gap: 48px;
	}

	.elc-summary {
		position: sticky;
		top: 24px;
	}
}

/* Steps */

.elc-step {
	min-width: 0;
	margin: 0 0 36px;
	padding: 0;
	border: 0;
}

.elc-step legend {
	margin: 0 0 16px;
	padding: 0;
	font-size: 1.35em;
	font-weight: 700;
	line-height: 1.3;
}

.elc-step:focus {
	outline: none;
}

.elc.is-stepper .elc-step:not(.is-active) {
	display: none;
}

/* Progress */

.elc-progress {
	display: flex;
	gap: 8px;
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.elc:not(.is-stepper) .elc-progress {
	display: none;
}

.elc-progress li {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.elc-progress-step {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0 0 2px;
	border: 0;
	background: none;
	color: var(--elc-muted);
	font: inherit;
	font-size: 0.875em;
	text-align: left;
	cursor: pointer;
}

/* Each step is a bar that fills in as the customer moves through. */
.elc-progress-step::before {
	content: "";
	display: block;
	height: 4px;
	margin-bottom: 8px;
	border-radius: 2px;
	background: var(--elc-line);
}

.elc-progress-step.is-done::before,
.elc-progress-step[aria-current="step"]::before {
	background: var(--elc-accent);
}

.elc-progress-step[aria-current="step"] {
	color: var(--elc-ink);
	font-weight: 700;
	cursor: default;
}

.elc-progress-step.is-done {
	color: var(--elc-accent);
}

.elc-progress-step.is-done:hover .elc-progress-label {
	text-decoration: underline;
}

.elc-progress-step:disabled:not([aria-current]) {
	cursor: default;
}

.elc-progress-step:focus-visible {
	outline: 3px solid var(--elc-accent);
	outline-offset: 3px;
	border-radius: 2px;
}

.elc-progress-n::after {
	content: ". ";
}

@media (max-width: 599px) {
	/* On phones show only the current step's name. */
	.elc-progress-step:not([aria-current]) .elc-progress-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.elc-progress-step:not([aria-current]) .elc-progress-n::after {
		content: "";
	}

	.elc-progress li:has([aria-current]) {
		flex-grow: 3;
	}
}

/* Step buttons */

.elc-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--elc-line);
}

.elc-nav .elc-next,
.elc-nav .elc-submit {
	margin-left: auto;
}

.elc-next,
.elc-back {
	min-height: 48px;
	padding: 12px 22px;
	border-radius: 8px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.elc-next {
	border: 0;
	background: var(--elc-accent);
	color: #fff;
}

.elc-next:hover {
	filter: brightness(1.12);
}

.elc-back {
	border: 1.5px solid var(--elc-line);
	background: var(--elc-surface);
	color: var(--elc-ink);
}

.elc-back:hover {
	border-color: var(--elc-ink);
}

.elc-next:focus-visible,
.elc-back:focus-visible {
	outline: 3px solid var(--elc-ink);
	outline-offset: 2px;
}

/* Service cards */

.elc-services {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 12px;
}

.elc-service {
	position: relative;
	display: block;
	cursor: pointer;
}

.elc-service input {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.elc-service-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	height: 100%;
	padding: 14px 16px;
	border: 1.5px solid var(--elc-line);
	border-radius: 10px;
	background: var(--elc-surface);
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.elc-service:hover .elc-service-body {
	border-color: var(--elc-accent);
}

.elc-service input:checked + .elc-service-body {
	border-color: var(--elc-accent);
	background: var(--elc-tint);
	box-shadow: inset 0 0 0 1px var(--elc-accent);
}

.elc-service input:focus-visible + .elc-service-body {
	outline: 3px solid var(--elc-accent);
	outline-offset: 2px;
}

.elc-service input[aria-invalid="true"] + .elc-service-body {
	border-color: var(--elc-error);
}

.elc-service-name {
	font-weight: 700;
}

.elc-service-desc {
	color: var(--elc-muted);
	font-size: 0.9em;
}

.elc-service-from {
	margin-top: auto;
	padding-top: 6px;
	color: var(--elc-accent);
	font-size: 0.9em;
	font-weight: 600;
}

/* Fields */

.elc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0 16px;
}

.elc-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 16px;
}

.elc-field > label,
.elc-label {
	font-weight: 600;
}

.elc-hint,
.elc-note {
	margin: 0;
	color: var(--elc-muted);
	font-size: 0.875em;
}

.elc-note {
	margin-bottom: 16px;
	font-size: 0.95em;
}

.elc input[type="text"],
.elc input[type="email"],
.elc input[type="tel"],
.elc input[type="number"],
.elc input[type="date"],
.elc select,
.elc textarea {
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 10px 12px;
	border: 1.5px solid var(--elc-line);
	border-radius: 8px;
	background: var(--elc-surface);
	color: var(--elc-ink);
	font: inherit;
	box-shadow: none;
}

.elc input[type="number"] {
	max-width: 160px;
}

.elc textarea {
	resize: vertical;
}

.elc input:focus,
.elc select:focus,
.elc textarea:focus {
	border-color: var(--elc-accent);
	outline: 2px solid var(--elc-accent);
	outline-offset: 0;
}

.elc [aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) {
	border-color: var(--elc-error);
}

.elc input[type="checkbox"],
.elc input[type="radio"] {
	accent-color: var(--elc-accent);
}

.elc-error {
	margin: 0;
	color: var(--elc-error);
	font-size: 0.875em;
	font-weight: 600;
}

.elc-error:empty {
	display: none;
}

/* How we see the job */

.elc-review {
	margin-top: 8px;
	padding-top: 20px;
	border-top: 1px solid var(--elc-line);
}

.elc-options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 10px;
	margin-top: 6px;
}

.elc-option {
	position: relative;
	display: block;
	cursor: pointer;
}

.elc-option input {
	position: absolute;
	top: 16px;
	left: 14px;
	margin: 0;
	accent-color: var(--elc-accent);
}

.elc-option-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	height: 100%;
	padding: 12px 14px 12px 40px;
	border: 1.5px solid var(--elc-line);
	border-radius: 10px;
	background: var(--elc-surface);
}

.elc-option:hover .elc-option-body,
.elc-option input:checked + .elc-option-body {
	border-color: var(--elc-accent);
}

.elc-option input:checked + .elc-option-body {
	background: var(--elc-tint);
	box-shadow: inset 0 0 0 1px var(--elc-accent);
}

.elc-option input:focus-visible + .elc-option-body {
	outline: 3px solid var(--elc-accent);
	outline-offset: 2px;
}

.elc-option input[aria-invalid="true"] + .elc-option-body {
	border-color: var(--elc-error);
}

.elc-option-name {
	font-weight: 700;
}

.elc-option-desc {
	color: var(--elc-muted);
	font-size: 0.875em;
}

.elc input[type="file"] {
	padding: 10px;
	border: 1.5px dashed var(--elc-line);
	border-radius: 8px;
	background: var(--elc-surface);
	font: inherit;
}

.elc input[type="file"]:focus-visible {
	outline: 2px solid var(--elc-accent);
}

.elc-photo-list {
	margin: 0;
	padding: 0 0 0 18px;
	color: var(--elc-muted);
	font-size: 0.875em;
}

.elc-photo-list:empty {
	display: none;
}

/* Extras and frequency chips */

.elc-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.elc-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1.5px solid var(--elc-line);
	border-radius: 999px;
	background: var(--elc-surface);
	cursor: pointer;
	line-height: 1.3;
}

.elc-chip input {
	margin: 0;
}

.elc-chip:has(input:checked) {
	border-color: var(--elc-accent);
	background: var(--elc-tint);
}

.elc-chip:has(input:focus-visible) {
	outline: 3px solid var(--elc-accent);
	outline-offset: 2px;
}

.elc-chip-price {
	color: var(--elc-muted);
	font-size: 0.85em;
}

.elc-field > .elc-check,
.elc-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400;
	cursor: pointer;
}

.elc-check input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 3px 0 0;
}

.elc-hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Quote summary, styled as a till slip */

.elc-summary {
	position: relative;
	margin-bottom: 12px;
	padding: 24px 24px 20px;
	border-radius: 14px 14px 0 0;
	background: var(--elc-tint);
}

.elc-summary::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: -10px;
	left: 0;
	height: 10px;
	background: radial-gradient(circle at 10px 0, var(--elc-tint) 9.5px, transparent 10px) 0 0 / 20px 10px repeat-x;
}

.elc-summary-title {
	margin: 0 0 2px;
	font-size: 1.1em;
	line-height: 1.3;
}

.elc-summary-service {
	margin: 0 0 14px;
	color: var(--elc-muted);
	font-size: 0.9em;
}

.elc-lines {
	margin: 0;
	padding: 0;
	list-style: none;
}

.elc-lines li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 5px 0;
	font-size: 0.92em;
}

.elc-lines li span:last-child {
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.elc-total-row {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 12px;
	padding-top: 14px;
	border-top: 2px dashed rgba(27, 43, 46, 0.25);
}

.elc-total-label {
	color: var(--elc-muted);
	font-size: 0.9em;
}

.elc-total {
	font-size: 2.1em;
	line-height: 1.1;
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
}

.elc-total.is-text {
	font-size: 1.15em;
	line-height: 1.35;
}

.elc-summary-note {
	margin: 12px 0 0;
	color: var(--elc-muted);
	font-size: 0.85em;
}

.elc-submit {
	min-height: 48px;
	padding: 12px 20px;
	border: 0;
	border-radius: 8px;
	background: var(--elc-accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.elc-submit:hover {
	filter: brightness(1.12);
}

.elc-submit:focus-visible {
	outline: 3px solid var(--elc-ink);
	outline-offset: 2px;
}

.elc-submit:disabled {
	opacity: 0.65;
	cursor: wait;
}

.elc-form-msg {
	margin: 12px 0 0;
	color: var(--elc-error);
	font-size: 0.9em;
	font-weight: 600;
}

.elc-form-msg:empty {
	display: none;
}

/* Breakdown folds away on phones; always open beside the form on wide screens. */

.elc-breakdown > summary {
	margin-bottom: 4px;
	color: var(--elc-accent);
	font-size: 0.9em;
	font-weight: 600;
	cursor: pointer;
}

.elc-breakdown > summary:focus-visible {
	outline: 3px solid var(--elc-accent);
	outline-offset: 2px;
}

@media (min-width: 900px) {
	.elc-breakdown > summary {
		display: none;
	}
}

/* Success */

.elc-success {
	max-width: 640px;
	padding: 32px;
	border-left: 6px solid var(--elc-accent);
	border-radius: 0 14px 14px 0;
	background: var(--elc-tint);
}

.elc-success:focus {
	outline: none;
}

.elc-success-title {
	margin: 0 0 8px;
	font-size: 1.4em;
}

.elc-success p {
	margin: 0;
}

@media (prefers-reduced-motion: reduce) {
	.elc * {
		transition: none !important;
	}
}

@media (min-width: 900px) {
	.elc-progress {
		max-width: calc(100% - 368px);
	}
}

/* How your quote works */

.elc-how {
	margin: 4px 0 0;
	padding: 0 0 0 20px;
}

.elc-how li {
	margin: 0 0 10px;
	padding-left: 4px;
	line-height: 1.45;
}

.elc-how li::marker {
	color: var(--elc-accent);
	font-weight: 700;
}

/*
 * Theme guard. Many themes style every <button> with borders, colours,
 * shadows and uppercase text. These rules keep the form's own look.
 */
.elc .elc-progress .elc-progress-step,
.elc .elc-progress .elc-progress-step:hover,
.elc .elc-progress .elc-progress-step:focus,
.elc .elc-progress .elc-progress-step:disabled {
	min-height: 0;
	margin: 0;
	padding: 0 0 2px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--elc-muted);
	font-family: inherit;
	font-size: 0.875em;
	letter-spacing: normal;
	line-height: 1.4;
	text-align: left;
	text-transform: none;
	opacity: 1;
}

.elc .elc-progress .elc-progress-step.is-done {
	color: var(--elc-accent);
}

.elc .elc-progress .elc-progress-step[aria-current="step"] {
	color: var(--elc-ink);
	font-weight: 700;
}

.elc .elc-form .elc-next,
.elc .elc-form .elc-submit,
.elc .elc-form .elc-next:hover,
.elc .elc-form .elc-submit:hover,
.elc .elc-form .elc-next:focus,
.elc .elc-form .elc-submit:focus {
	border: 0;
	border-radius: 8px;
	background: var(--elc-accent);
	box-shadow: none;
	color: #fff;
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

.elc .elc-form .elc-back,
.elc .elc-form .elc-back:hover,
.elc .elc-form .elc-back:focus {
	border: 1.5px solid var(--elc-line);
	border-radius: 8px;
	background: var(--elc-surface);
	box-shadow: none;
	color: var(--elc-ink);
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

.elc .elc-form .elc-back:hover {
	border-color: var(--elc-ink);
}

.elc .elc-form .elc-next:hover,
.elc .elc-form .elc-submit:hover {
	filter: brightness(1.12);
}

/* Send-later and inspection details */

.elc-callout {
	margin: 4px 0 16px;
	padding: 16px 18px;
	border-left: 4px solid var(--elc-accent);
	border-radius: 0 10px 10px 0;
	background: var(--elc-tint);
}

.elc-callout > p {
	margin: 0 0 12px;
}

.elc-callout .elc-field:last-child,
.elc-callout .elc-grid:last-child .elc-field {
	margin-bottom: 0;
}

.elc-contact {
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}

.elc-contact li {
	margin: 0 0 4px;
}

.elc-contact a {
	color: var(--elc-accent);
}

.elc-success-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}

.elc .elc-success-actions a {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.elc-included {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: 8px;
	background: var(--elc-tint);
	color: var(--elc-ink);
	font-size: 0.95em;
}

.elc-from-note {
	margin: 12px 0 0;
}
