/* BookingShake request form. All rules are scoped to .bookingshake-form. */

.bookingshake-form {
	--bsf-accent: #f2b233;
	--bsf-text: #16181a;
	--bsf-muted: #6b6f73;
	--bsf-field-bg: #f5f5f5;
	--bsf-field-border: #e5e5e5;
	--bsf-placeholder: #9a9ea2;
	--bsf-error: #c0392b;
	--bsf-radius: 4px;
	--bsf-gap-x: 22px;
	--bsf-gap-y: 18px;
	--bsf-body-font: inherit;

	background: #fff;
	color: var(--bsf-text);
	font-family: var(--bsf-body-font);
	padding: clamp(20px, 5%, 40px);

	/* Columns respond to the space the form is given, not the viewport,
	   so it behaves the same in a sidebar as in a full-width section. */
	container-type: inline-size;
}

.bookingshake-form *,
.bookingshake-form *::before,
.bookingshake-form *::after {
	box-sizing: border-box;
}

/* Themes often set display on form elements, which would defeat the hidden attribute. */
.bookingshake-form [hidden] {
	display: none !important;
}

/* Heading */

.bookingshake-form .bsf-title {
	/* Scales with the width of the form, not the screen. The first declaration
	   is the fallback for browsers without container query units. */
	font-size: clamp(28px, 6vw, 64px);
	font-size: clamp(28px, 9cqw, 64px);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	color: var(--bsf-text);
	margin: 0 0 8px;
	padding: 0;
}

.bookingshake-form .bsf-intro {
	font-size: 13px;
	line-height: 1.5;
	color: var(--bsf-muted);
	margin: 0 0 26px;
	padding: 0;
}

/* Layout */

.bookingshake-form .bsf-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	column-gap: var(--bsf-gap-x);
	row-gap: var(--bsf-gap-y);
}

.bookingshake-form .bsf-field {
	min-width: 0;
}

.bookingshake-form .bsf-field--full {
	grid-column: 1 / -1;
}

/* Two columns once the form itself is wide enough to carry them. */
@container (min-width: 30rem) {
	.bookingshake-form .bsf-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Browsers without container queries fall back to the viewport. */
@supports not (container-type: inline-size) {
	@media (min-width: 700px) {
		.bookingshake-form .bsf-grid {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}
	}
}

/* Labels and fields */

.bookingshake-form .bsf-label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--bsf-text);
	margin: 0 0 7px;
}

.bookingshake-form .bsf-req {
	margin-left: 1px;
}

.bookingshake-form .bsf-form .bsf-input {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 12px 14px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	color: var(--bsf-text);
	background-color: var(--bsf-field-bg);
	background-image: none;
	border: 1px solid var(--bsf-field-border);
	border-radius: var(--bsf-radius);
	box-shadow: none;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.bookingshake-form .bsf-form .bsf-input::placeholder {
	color: var(--bsf-placeholder);
	opacity: 1;
}

.bookingshake-form .bsf-form .bsf-input:hover {
	border-color: #d8d8d8;
}

.bookingshake-form .bsf-form .bsf-input:focus,
.bookingshake-form .bsf-form .bsf-input:focus-visible {
	border-color: var(--bsf-accent);
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
	background-color: #fff;
}

.bookingshake-form .bsf-form .bsf-input[aria-invalid="true"] {
	border-color: var(--bsf-error);
}

.bookingshake-form .bsf-textarea {
	min-height: 118px;
	resize: vertical;
}

/* Select caret */

.bookingshake-form .bsf-select-wrap {
	position: relative;
}

.bookingshake-form .bsf-form .bsf-select {
	padding-right: 40px;
	cursor: pointer;
}

.bookingshake-form .bsf-select-wrap::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 16px;
	width: 0;
	height: 0;
	margin-top: -2px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid var(--bsf-text);
	pointer-events: none;
}

.bookingshake-form .bsf-form .bsf-select::-ms-expand {
	display: none;
}

/* Date and time inputs keep the same height as their neighbours across browsers */

.bookingshake-form .bsf-form .bsf-input--date,
.bookingshake-form .bsf-form .bsf-input--time {
	min-height: 45px;
}

.bookingshake-form .bsf-input--date::-webkit-date-and-time-value,
.bookingshake-form .bsf-input--time::-webkit-date-and-time-value {
	text-align: left;
	margin: 0;
}

.bookingshake-form .bsf-input--date::-webkit-calendar-picker-indicator,
.bookingshake-form .bsf-input--time::-webkit-calendar-picker-indicator {
	opacity: 0.5;
	cursor: pointer;
}

/* Once the script takes over opening the picker, the whole field is the
   control: it reads as clickable and shows no text caret. */
.bookingshake-form .bsf-form .bsf-input--picker {
	cursor: pointer;
	caret-color: transparent;
}

.bookingshake-form .bsf-form .bsf-input[type="number"] {
	-moz-appearance: textfield;
}

.bookingshake-form .bsf-input[type="number"]::-webkit-outer-spin-button,
.bookingshake-form .bsf-input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Consent */

.bookingshake-form .bsf-field--consent {
	margin-top: 6px;
}

.bookingshake-form .bsf-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	margin: 0;
}

.bookingshake-form .bsf-form .bsf-checkbox {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	padding: 0;
	background-color: #fff;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 12px;
	border: 1px solid #c7c7c7;
	border-radius: 3px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

/* The tick is an inline SVG centred as a background, so it sits in the
   middle of the box whatever the theme does to inputs. */
.bookingshake-form .bsf-form .bsf-checkbox:checked {
	background-color: var(--bsf-accent);
	border-color: var(--bsf-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2316181a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.4 3.4L13 5'/%3E%3C/svg%3E");
}

.bookingshake-form .bsf-form .bsf-checkbox:focus-visible {
	outline: 2px solid var(--bsf-text);
	outline-offset: 2px;
}

.bookingshake-form .bsf-form .bsf-checkbox[aria-invalid="true"] {
	border-color: var(--bsf-error);
}

.bookingshake-form .bsf-consent-text {
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--bsf-muted);
}

.bookingshake-form .bsf-consent-text a {
	color: inherit;
	text-decoration: underline;
}

/* Submit */

.bookingshake-form .bsf-submit {
	display: block;
	width: 100%;
	margin: 24px 0 0;
	padding: 16px 24px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--bsf-text);
	background: var(--bsf-accent);
	border: none;
	border-radius: 999px;
	cursor: pointer;
	text-align: center;
	transition: filter 0.15s ease, opacity 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.bookingshake-form .bsf-submit:hover {
	filter: brightness(0.94);
}

.bookingshake-form .bsf-submit:focus-visible {
	outline: 2px solid var(--bsf-text);
	outline-offset: 3px;
}

.bookingshake-form .bsf-submit[disabled] {
	cursor: default;
	opacity: 0.65;
	filter: none;
}

/* Messages */

.bookingshake-form .bsf-error {
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--bsf-error);
	margin: 6px 0 0;
	padding: 0;
}

.bookingshake-form .bsf-alert {
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--bsf-error);
	background: #fdf1ef;
	border: 1px solid #f3d3cd;
	border-radius: var(--bsf-radius);
	margin: 0 0 20px;
	padding: 12px 14px;
}

.bookingshake-form .bsf-status {
	font-size: 13px;
	line-height: 1.5;
	color: var(--bsf-muted);
	margin: 12px 0 0;
	padding: 0;
	min-height: 1em;
}

.bookingshake-form .bsf-status:empty {
	display: none;
}

.bookingshake-form .bsf-success {
	font-size: 15px;
	line-height: 1.6;
	color: var(--bsf-text);
	border-left: 3px solid var(--bsf-accent);
	padding: 4px 0 4px 16px;
}

.bookingshake-form .bsf-success:focus {
	outline: none;
}

.bookingshake-form .bsf-success p {
	margin: 0;
}

/* Off-screen bot trap */

.bookingshake-form .bsf-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
	.bookingshake-form .bsf-form .bsf-input,
	.bookingshake-form .bsf-submit,
	.bookingshake-form .bsf-form .bsf-checkbox {
		transition: none;
	}
}
