/* WeFitRPE booking form */

/* Design round (spec 3.2): the theme's brand values, defined here because
   the admin Add booking screen has no theme variables to read. The My
   account page (wfr-account.css, 0.6.0) reads the same tokens. */
.wfr-form,
.wfr-account {
	--wfr-primary: #006ac1;
	--wfr-primary-dark: #00508f;
	--wfr-primary-light: #e8f2fb;
	--wfr-text: #1e293b;
	--wfr-text-light: #64748b;
	--wfr-border: #e2e8f0;
	--wfr-border-strong: #94a3b8; /* field edges: the light border is under 3:1 on white */
	--wfr-bg-light: #f8fafc;
	--wfr-success: #2e7d4f;
	--wfr-success-bg: #eef9f0;
	--wfr-success-border: #a8d5b0;
	--wfr-radius: 12px;
	--wfr-radius-sm: 8px;
	--wfr-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.wfr-form {
	/* The form card on the left, the rail on the right (spec 3.3) */
	max-width: 1100px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 40px;
	align-items: start;
	font-size: 16px;
	line-height: 1.5;
	color: var(--wfr-text);
}

.wfr-form__main {
	background: #fff;
	border: 1px solid var(--wfr-border);
	border-radius: var(--wfr-radius);
	box-shadow: var(--wfr-shadow);
	padding: 32px;
	min-width: 0;
}

/* Once booked, the ticket is the card */
.wfr-form__main:has(> .wfr-success:not([hidden])) {
	background: none;
	border: none;
	box-shadow: none;
	padding: 0;
}

/* Under the 80px site header, plus 24px (and the admin bar when logged in) */
.wfr-form__aside {
	position: sticky;
	top: 104px;
}

.admin-bar .wfr-form__aside {
	top: 136px;
}

@media (max-width: 960px) {
	.wfr-form {
		grid-template-columns: 1fr;
	}

	/* After the form in source order, so it follows it */
	.wfr-form__aside {
		position: static;
	}
}

@media (max-width: 600px) {
	.wfr-form__main {
		padding: 20px;
	}
}

.wfr-form__heading {
	margin: 0 0 8px;
}

.wfr-form__intro {
	margin: 0 0 24px;
	color: var(--wfr-text-light);
}

.wfr-fieldset {
	border: 1px solid var(--wfr-border);
	border-radius: 8px;
	padding: 20px;
	margin: 0 0 20px;
}

.wfr-fieldset legend {
	font-weight: 700;
	padding: 0 8px;
}

.wfr-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

@media (max-width: 600px) {
	.wfr-grid {
		grid-template-columns: 1fr;
	}
}

.wfr-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wfr-field span {
	font-weight: 600;
	font-size: 14px;
}

/* Required marks: on field labels, block headings and the agree tick alike */
.wfr-field em,
.wfr-form h4 em,
.wfr-form legend em,
.wfr-agree em {
	color: #c0392b;
	font-style: normal;
}

.wfr-field input,
.wfr-field select,
.wfr-field textarea {
	padding: 10px 12px;
	border: 1px solid var(--wfr-border-strong);
	border-radius: 6px;
	font: inherit;
	background: #fff;
}

.wfr-field input:focus,
.wfr-field select:focus,
.wfr-field textarea:focus {
	outline: 2px solid var(--wfr-primary);
	outline-offset: 1px;
}

/* Honeypot (wfr_leave_blank): visually removed, still in the DOM for bots */
.wfr-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wfr-session {
	border: 1px solid var(--wfr-border);
	border-radius: var(--wfr-radius-sm);
	padding: 16px;
	margin-bottom: 14px;
	background: var(--wfr-bg-light);
}

.wfr-session__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.wfr-session__remove {
	background: none;
	border: none;
	color: #c0392b;
	cursor: pointer;
	font-size: 14px;
	text-decoration: underline;
}

/* The session's date: the month calendar, then the picked date line (GDL-1634) */
.wfr-session__when {
	margin-bottom: 14px;
}

.wfr-session__label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 4px;
}

.wfr-session__picked {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin: 0;
}

.wfr-session__time {
	max-width: 320px;
}

.wfr-session__note {
	font-size: 14px;
	color: var(--wfr-text-light);
	margin: 8px 0;
	min-height: 1em;
}

.wfr-candidate {
	display: grid;
	grid-template-columns: 1fr 1fr 36px;
	gap: 10px;
	margin-bottom: 10px;
}

.wfr-candidate input {
	padding: 9px 11px;
	border: 1px solid var(--wfr-border-strong);
	border-radius: 6px;
	font: inherit;
}

.wfr-candidate__remove {
	background: none;
	border: 1px solid var(--wfr-border);
	border-radius: 6px;
	color: var(--wfr-text-light);
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
}

/* G14c: after the base candidate rules, so it wins on phones */
@media (max-width: 600px) {
	/* name and mask stack; remove stays on the name's row */
	.wfr-candidate {
		grid-template-columns: 1fr 36px;
	}

	.wfr-candidate__name {
		grid-column: 1;
		grid-row: 1;
	}

	.wfr-candidate__remove {
		grid-column: 2;
		grid-row: 1;
	}

	.wfr-candidate__mask {
		grid-column: 1;
		grid-row: 2;
	}
}

.wfr-btn {
	font: inherit;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	padding: 12px 22px;
	border: none;
}

.wfr-btn:focus-visible {
	outline: 2px solid var(--wfr-primary);
	outline-offset: 2px;
}

/* Design round (spec 3.4): sized to its label, no longer full width */
.wfr-btn--primary {
	background: var(--wfr-primary);
	color: #fff;
	width: auto;
	min-width: 200px;
	font-size: 16px;
	padding: 14px 28px;
	border-radius: 8px;
}

.wfr-btn--primary:hover {
	background: var(--wfr-primary-dark);
}

.wfr-btn--primary:disabled {
	background: #9bbfe0;
	cursor: wait;
}

/* Dashed: "+ Add another date" and the other in-step actions */
.wfr-btn--ghost {
	background: none;
	border: 1px dashed var(--wfr-primary);
	color: var(--wfr-primary);
	padding: 8px 16px;
	font-size: 14px;
}

.wfr-btn--ghost:disabled {
	opacity: 0.6;
	cursor: wait;
}

.wfr-policy {
	background: #fff8e6;
	border: 1px solid #f0d789;
	border-radius: 8px;
	padding: 4px 16px;
	font-size: 14px;
	margin-bottom: 20px;
}

.wfr-error {
	background: #fdecea;
	border: 1px solid #e6a49d;
	border-radius: 8px;
	padding: 12px 16px;
	color: #8c2f24;
	margin-bottom: 16px;
}

/* The confirmation ticket (spec 3.6) */
.wfr-success {
	background: #fff;
	border: 1px solid var(--wfr-border);
	border-top: 6px solid var(--wfr-success);
	border-radius: var(--wfr-radius);
	box-shadow: var(--wfr-shadow);
	padding: 32px;
	text-align: left;
}

@media (max-width: 600px) {
	.wfr-success {
		padding: 20px;
	}
}

.wfr-success__head {
	text-align: center;
}

.wfr-success__head h3 {
	margin: 0 0 8px;
}

.wfr-success__head p {
	margin: 0;
}

.wfr-success__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--wfr-success-bg);
	color: var(--wfr-success);
	margin-bottom: 12px;
}

.wfr-success__icon svg {
	display: block;
}

.wfr-success__ref {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	background: var(--wfr-bg-light);
	border-radius: var(--wfr-radius-sm);
	padding: 14px 20px;
	margin: 20px 0;
}

.wfr-success__ref span {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wfr-text-light);
}

.wfr-success__ref strong {
	font-size: 24px;
	letter-spacing: 0.02em;
	line-height: 1.2;
}

.wfr-success__facts {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.wfr-success__facts li {
	padding: 10px 0;
	border-bottom: 1px solid var(--wfr-border);
	font-size: 15px;
}

.wfr-success__calendar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 16px 0;
}

/* Two or more sessions: each pair under its date */
.wfr-success__calendar-date {
	flex-basis: 100%;
	font-size: 14px;
	font-weight: 600;
}

.wfr-success__calendar .wfr-btn--ghost {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--wfr-border);
	border-radius: 8px;
	background: #fff;
	color: var(--wfr-text);
	padding: 10px 16px;
	text-decoration: none;
}

.wfr-success__calendar .wfr-btn--ghost:hover {
	border-color: var(--wfr-primary);
}

/* "Where to come" and "Your booking details" under the success message */
.wfr-success__section {
	text-align: left;
	margin-top: 20px;
}

.wfr-success__section h4 {
	margin: 0 0 8px;
	font-size: 15px;
}

.wfr-success__section ul {
	margin: 0;
	padding-left: 20px;
}

.wfr-success__section .wfr-review__table {
	background: #fff;
	margin-bottom: 0;
}

/* Headings, the error box and the success panel take focus from script
   only (G14b); the move itself is what a screen reader announces. */
.wfr-form [tabindex="-1"]:focus {
	outline: none;
}

/* Face fit criteria on the Dates step (G12) */
.wfr-criteria p {
	margin: 0 0 4px;
}

.wfr-criteria ol {
	margin: 0;
	padding-left: 22px;
}

/* The Add booking screen (G30): left-aligned in the admin page, no rail,
   and no card of its own (the admin page provides the box) */
.wfr-form--admin {
	display: block;
	max-width: 880px; /* the field grid gets too wide on a wide admin screen */
	margin: 0;
}

.wfr-form--admin .wfr-form__main {
	background: none;
	border: none;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
}

/* The rail (spec 3.5): the booking so far, before the day, prefer to talk */
.wfr-aside__card {
	background: #fff;
	border: 1px solid var(--wfr-border);
	border-radius: var(--wfr-radius);
	padding: 20px;
	margin-bottom: 16px;
	font-size: 14px;
}

.wfr-aside__card h4 {
	margin: 0 0 12px;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wfr-text-light);
}

.wfr-aside__card p {
	margin: 0;
}

.wfr-aside__card a {
	color: var(--wfr-primary);
}

.wfr-summary {
	margin: 0;
}

.wfr-summary dt {
	margin-top: 10px;
	font-size: 13px;
	color: var(--wfr-text-light);
}

.wfr-summary dt:first-child {
	margin-top: 0;
}

.wfr-summary dd {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.wfr-summary__empty {
	color: var(--wfr-text-light);
}

.wfr-aside__card .wfr-summary__note {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--wfr-border);
	font-size: 13px;
	color: var(--wfr-text-light);
}

.wfr-aside__rules {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wfr-aside__rules li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.wfr-aside__rules svg {
	flex-shrink: 0;
	color: var(--wfr-success);
}

.wfr-aside__more {
	font-weight: 600;
}

/* Multi-step additions */

/* "Step 2 of 6: Your details" above the bar (spec 3.4) */
.wfr-progress__count {
	margin: 0 0 14px;
	font-size: 14px;
	font-weight: 600;
	color: var(--wfr-text-light);
}

/* One row of steps: the circle above the label, a track line between */
.wfr-progress {
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
	counter-reset: wfr-step;
}

.wfr-progress li {
	counter-increment: wfr-step;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
	position: relative;
	min-width: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--wfr-text-light);
}

/* The circle sits over the line; its white border keeps the line off it */
.wfr-progress li::before {
	content: counter(wfr-step);
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--wfr-border);
	color: var(--wfr-text-light);
	font-size: 13px;
}

/* The track to the next step, from this circle's centre */
.wfr-progress li::after {
	content: "";
	position: absolute;
	top: 14px;
	left: 50%;
	width: 100%;
	height: 2px;
	transform: translateY(-50%);
	background: var(--wfr-border);
	z-index: 0;
}

.wfr-progress li:last-child::after {
	content: none;
}

.wfr-progress li.is-current {
	color: var(--wfr-primary);
}

.wfr-progress li.is-current::before {
	background: var(--wfr-primary);
	color: #fff;
}

.wfr-progress li.is-done {
	color: var(--wfr-success);
}

.wfr-progress li.is-done::before {
	content: "\2713";
	background: var(--wfr-success);
	color: #fff;
}

.wfr-progress li.is-done::after {
	background: var(--wfr-success);
}

/* Phones: only the current label; the count line names the step */
@media (max-width: 600px) {
	.wfr-progress li:not(.is-current) span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}

.wfr-block {
	margin: 18px 0;
}

.wfr-block h4 {
	margin: 0 0 10px;
	font-size: 15px;
}

.wfr-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wfr-options--row {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px 18px;
}

.wfr-option {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	border: 1px solid var(--wfr-border);
	border-radius: 8px;
	padding: 12px 14px;
	cursor: pointer;
	background: #fff;
}

.wfr-option:has(input:checked) {
	border-color: var(--wfr-primary);
	background: var(--wfr-primary-light);
}

.wfr-option input {
	margin-top: 3px;
	flex-shrink: 0;
}

.wfr-option span strong {
	display: block;
	color: var(--wfr-primary);
}

.wfr-option span small {
	display: block;
	color: var(--wfr-text-light);
}

.wfr-option--inline {
	border: none;
	padding: 4px 0;
	background: none;
}

/* Step 1 cards (spec 3.4): five service cards in two columns, and the
   book-or-quote pair in a row */
.wfr-options--cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

@media (max-width: 600px) {
	.wfr-options--cards {
		grid-template-columns: 1fr;
	}
}

.wfr-options--row > .wfr-option--card {
	flex: 1 1 240px;
}

.wfr-option--card {
	position: relative;
	align-items: flex-start;
	gap: 14px;
	padding: 16px;
	border-radius: var(--wfr-radius-sm);
}

.wfr-option--card:hover {
	border-color: var(--wfr-primary);
}

/* The radio is hidden from sight only: it still takes Tab, arrows and Space */
.wfr-option--card input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* 2px when checked: the inset shadow on the 1px border, so nothing shifts */
.wfr-option--card:has(input:checked) {
	border-color: var(--wfr-primary);
	box-shadow: inset 0 0 0 1px var(--wfr-primary);
	background: var(--wfr-primary-light);
}

.wfr-option--card:has(input:focus-visible) {
	outline: 2px solid var(--wfr-primary);
	outline-offset: 2px;
}

.wfr-option__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	background: var(--wfr-primary-light);
	color: var(--wfr-primary);
}

.wfr-option__icon svg {
	display: block;
}

.wfr-option--card:has(input:checked) .wfr-option__icon {
	background: var(--wfr-primary);
	color: #fff;
}

.wfr-option__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.wfr-option--card .wfr-option__body strong {
	font-size: 16px;
	color: var(--wfr-text);
}

.wfr-option--card .wfr-option__body small {
	font-size: 14px;
	line-height: 1.4;
	color: var(--wfr-text-light);
}

.wfr-option--card .wfr-option__body em {
	margin-top: 4px;
	font-size: 13px;
	font-style: normal;
	font-weight: 600;
	color: var(--wfr-primary);
}

.wfr-note {
	font-size: 14px;
	color: var(--wfr-text-light);
	margin: 8px 0;
}

.wfr-field--narrow {
	max-width: 220px;
}

/* Single-column fields with the grid's spacing (the enquiry step) */
.wfr-stack {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 18px 0;
}

.wfr-stack .wfr-note {
	margin-bottom: 0;
}

/* Back on the left, Continue on the right; with Back hidden, Continue
   still sits right (spec 3.4) */
.wfr-nav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--wfr-border);
}

.wfr-nav .wfr-btn--ghost {
	padding: 14px 28px;
	font-size: 16px;
	border: 1px solid var(--wfr-border);
	border-radius: 8px;
	background: #fff;
	color: var(--wfr-text);
}

.wfr-nav .wfr-btn--ghost:hover {
	border-color: var(--wfr-primary);
}

.wfr-nav .wfr-btn--primary {
	margin-left: auto;
}

@media (max-width: 600px) {
	.wfr-nav {
		flex-direction: column-reverse;
	}

	.wfr-nav .wfr-btn {
		width: 100%;
		margin-left: 0;
	}
}

.wfr-account-box {
	background: var(--wfr-bg-light);
	border: 1px solid var(--wfr-border);
	border-radius: 8px;
	padding: 12px 16px;
}

.wfr-account-box__who {
	margin: 0 0 4px;
	font-weight: 600;
}

.wfr-account-box__who a,
.wfr-account-box__who .wfr-link {
	margin-left: 10px;
	font-weight: 400;
}

.wfr-account-box__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin: 12px 0 0;
}

/* The re-confirm notice (accounts spec 8.1): bordered, above the fields */
.wfr-account-box__confirm {
	background: #fff8e6;
	border: 1px solid #f0d789;
	border-radius: 8px;
	padding: 4px 16px;
	margin: 12px 0;
}

/* A button that reads as a link: Log out, Forgot your password? and the like */
.wfr-link {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	font-size: 14px;
	color: var(--wfr-primary);
	text-decoration: underline;
	cursor: pointer;
}

.wfr-link:disabled {
	opacity: 0.6;
	cursor: wait;
}

.wfr-link:focus-visible {
	outline: 2px solid var(--wfr-primary);
	outline-offset: 2px;
}

/* A line under one field: "An account already exists", with Log in instead */
.wfr-field .wfr-field__note {
	font-size: 14px;
	color: #8c2f24;
}

.wfr-review__table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}

.wfr-review__table th,
.wfr-review__table td {
	border: 1px solid var(--wfr-border);
	padding: 10px 12px;
	text-align: left;
	font-size: 14px;
	vertical-align: top;
}

.wfr-review__table td {
	white-space: pre-line;
}

.wfr-review__table th {
	width: 160px;
	background: var(--wfr-bg-light);
}

.wfr-agree {
	margin: 16px 0;
	font-weight: 600;
}

/* Contractor booking (GDL-1636): who covers the site, their calendar, a start */
.wfr-tester__status:empty {
	display: none;
}

.wfr-tester__status .wfr-btn {
	margin-left: 4px;
}

div.wfr-tester {
	cursor: default;
}

.wfr-tester .wfr-tester__body {
	display: flex;
	flex-direction: column;
	gap: 1px;
	font-size: 14px;
	min-width: 0;
	color: var(--wfr-text-light);
}

.wfr-tester .wfr-tester__body strong {
	font-size: 16px;
	color: var(--wfr-text);
}

.wfr-tester__badge {
	align-self: flex-start;
	background: var(--wfr-success-bg);
	color: var(--wfr-success);
	border: 1px solid var(--wfr-success-border);
	border-radius: 999px;
	padding: 0 8px;
	font-size: 12px;
	font-weight: 600;
	margin: 2px 0;
}

.wfr-tester__travel-band {
	font-weight: 600;
	color: var(--wfr-primary);
}

.wfr-tester__travel {
	margin-top: 12px;
	font-size: 14px;
	color: var(--wfr-text-light);
}

.wfr-tester__travel h5 {
	margin: 0 0 4px;
	font-size: 14px;
	color: var(--wfr-text);
}

.wfr-tester__travel ul {
	margin: 0;
	padding-left: 20px;
}

.wfr-tester__start {
	max-width: 320px;
	margin-top: 14px;
}

/* The hidden attribute must always win, even over display:flex/grid rules */
.wfr-form [hidden] {
	display: none !important;
}
