/*
 * /book (page-book.php) on FUSS light, over the page frame (css/frame.css). Figma: FUSS file,
 * page "Book" (4499:2). Set like /contact (css/contact.css): one oversized line of Neue Faktum,
 * sparse caps labels in four columns, a label column then the control, thin ink rules, /contact's
 * outline pills, the green button, the green flood for "Booked!". Content at most 980px wide.
 */

html:has(body.fuss-book),
html.is-v2:has(body.fuss-book),
html.is-v2 body.fuss-v2.fuss-book {
	background: #e7e9e0;
}

.bkPage {
	--red: #ff4f1f;
	--muted: color-mix(in srgb, var(--ink) 62%, var(--light));
	--grid: repeat(4, minmax(0, 1fr));
	--field: clamp(22px, 2.08vw, 30px);
	--field-lh: 38px;
}

.bkPage a,
.bkPage .bkLink {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.bkPage a:focus-visible,
.bkPage button:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
	border-radius: 2px;
}

.bkPage .pageMenuBtn:focus-visible {
	outline-offset: 6px;
}

.bkPage .bkLabel {
	margin: 0;
	padding: 0;
	font-size: 12px;
	line-height: 16.8px;
	font-weight: 500;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.bkOpt {
	margin-left: 6px;
	opacity: .5;
}

.bkPage .bkMuted {
	font-size: 15px;
	line-height: 20px;
	color: var(--muted);
}

.bkPage .bkLink {
	display: inline;
	font-size: 15px;
	line-height: 20px;
	color: var(--ink);
}

.bkMain {
	max-width: calc(980px + 2 * var(--m));
	margin: 0 auto;
}

/* ---------- The line ---------- */

.bkHead {
	padding: 72px var(--m) 0;
}

.bkPage .bkGiant {
	margin: 0 0 0 -.045em;
	padding: 0;
	/* 160px = 15.6vw of 980px + margins, as /contact. */
	font-size: min(15.6vw, 160px);
	line-height: .86;
	font-weight: 400;
	letter-spacing: -.035em;
}

.bkPage .bkIntro {
	margin-top: 36px;
	font-size: 36px;
	line-height: 43.2px;
	letter-spacing: -.01em;
}

/* ---------- Four sparse columns ---------- */

.bkInfo {
	display: grid;
	grid-template-columns: var(--grid);
	gap: 28px var(--m);
	padding: 96px var(--m) 0;
}

.bkPage .bkInfo .bkLabel + p {
	max-width: 300px;
	margin-top: 8px;
	font-size: 15px;
	line-height: 20px;
	color: var(--muted);
}

.bkPage .bkInfo a {
	color: var(--ink);
}

/* ---------- The form: a label column, then the control ---------- */

.bkForm {
	margin-top: 128px;
	padding: 0 var(--m) 168px;
}

.bkRow,
.bkPage .bkField,
.bkSend,
.bkSummary {
	display: grid;
	grid-template-columns: var(--grid);
	column-gap: var(--m);
}

.bkRow[hidden],
.bkSummary[hidden] {
	display: none;
}

.bkSide,
.bkPage .bkField > .bkLabel {
	grid-column: 1;
	padding-top: 14px;
}

.bkSide .bkMuted {
	margin-top: 8px;
}

.bkSide .bkLink {
	display: block;
	text-align: left;
}

.bkControl {
	grid-column: 2 / -1;
	min-width: 0;
}

.bkTime,
.bkFields {
	margin-top: 96px;
}

.bkPage .bkField + .bkField {
	margin-top: 44px;
}

/* ---------- Day: weekday columns, the date set large, the chosen day an ink pill ---------- */

.bkGrid {
	--day: 52px;
	--day-h: 68px;
	--day-pad: 22px;
	display: grid;
	grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
	row-gap: 8px;
	padding-top: 14px;
}

.bkPage .bkDow {
	padding: 0 0 16px var(--day-pad);
	opacity: .5;
}

.bkPage .bkDate {
	justify-self: start;
	height: var(--day-h);
	padding: 0 var(--day-pad);
	border-radius: calc(var(--day-h) / 2);
	font-size: var(--day);
	line-height: var(--day-h);
	letter-spacing: -.03em;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	transition: background-color .2s, color .2s;
}

.bkPage .bkDate:hover:not(:disabled):not([aria-pressed="true"]) {
	background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.bkPage .bkDate:disabled {
	opacity: .25;
	cursor: default;
}

.bkPage .bkDate[aria-pressed="true"] {
	background: var(--ink);
	color: var(--light);
}

.bkPage .bkNote {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-top: 24px;
	padding-left: 22px;
	font-size: 18px;
	line-height: 24px;
}

.bkPage .bkNote[hidden] {
	display: none;
}

.bkNote::before {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ink);
	transform: translateY(-1px);
}

/* ---------- Time: the day, then /contact's outline pills ---------- */

.bkPage .bkDayName {
	padding-top: 4px;
	font-size: var(--field);
	line-height: var(--field-lh);
	letter-spacing: -.01em;
}

.bkZoneLine {
	display: none;
}

.bkZonePick {
	margin-top: 16px;
	max-width: 420px;
}

.bkZonePick[hidden] {
	display: none;
}

.bkPage .bkLoading {
	margin-top: 16px;
	font-size: var(--field);
	line-height: var(--field-lh);
	letter-spacing: -.01em;
	opacity: .4;
}

.bkPage .bkLoading[hidden] {
	display: none;
}

.bkTimes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.bkTimes:empty {
	display: none;
}

.bkBreak {
	flex-basis: 100%;
	height: 0;
}

.bkPage .bkSlot {
	padding: 7px 16px;
	border: 1px solid var(--ink);
	border-radius: 18px;
	font-size: 15px;
	line-height: 20px;
	white-space: nowrap;
	transition: background-color .2s, color .2s;
}

.bkPage .bkSlot:hover:not([aria-pressed="true"]) {
	background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.bkPage .bkSlot[aria-pressed="true"] {
	background: var(--ink);
	color: var(--light);
}

/* ---------- Fields on a thin ink rule (as /contact) ---------- */

.bkPage .bkControl input,
.bkPage .bkControl select,
.bkPage .bkControl textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 4px 0 15px;
	border: 0;
	border-bottom: 1px solid var(--ink);
	border-radius: 0;
	background: transparent;
	color: var(--ink);
	font: inherit;
	font-size: var(--field);
	line-height: var(--field-lh);
	letter-spacing: -.01em;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
}

.bkPage .bkControl textarea {
	min-height: calc(var(--field-lh) + 20px);
	overflow: hidden;
	resize: none;
}

.bkPage .bkControl select {
	padding-right: 36px;
	font-size: 18px;
	line-height: 24px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5 7 7.5l6-6' fill='none' stroke='%23121117' stroke-width='1.5'/%3E%3C/svg%3E") right 4px center / 14px 9px no-repeat;
	cursor: pointer;
}

.bkPage .bkControl select option {
	background: var(--light);
	color: var(--ink);
}

.bkPage .bkZonePick .bkLabel {
	display: block;
	margin-bottom: 4px;
	opacity: .5;
}

.bkPage .bkControl input:focus,
.bkPage .bkControl select:focus,
.bkPage .bkControl textarea:focus {
	outline: none;
	padding-bottom: 13px;
	border-bottom-width: 3px;
}

/* ---------- Book ---------- */

.bkSend {
	align-items: center;
	margin-top: 56px;
}

.bkSendRow {
	grid-column: 2 / -1;
	display: flex;
	align-items: center;
	gap: 24px;
}

.bkPage .bkButton {
	flex: none;
	height: 52px;
	padding: 0 34px;
	border-radius: 26px;
	background: var(--green);
	color: var(--ink);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
}

.bkPage .bkButton[aria-busy="true"] {
	cursor: progress;
}

/* ---------- Errors: red-orange marks the rule and the note; the words stay ink (as /contact) ---------- */

.bkPage .bkField.is-invalid .bkControl input,
.bkPage .bkField.is-invalid .bkControl textarea {
	border-bottom-color: var(--red);
	border-bottom-width: 2px;
	padding-bottom: 14px;
}

.bkPage .bkField.is-invalid .bkControl input:focus,
.bkPage .bkField.is-invalid .bkControl textarea:focus {
	border-bottom-width: 3px;
	padding-bottom: 13px;
}

.bkPage .bkError {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-top: 12px;
	font-size: 15px;
	line-height: 20px;
}

.bkError::before,
.bkSummary .bkLabel::before {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--red);
}

.bkSummary {
	margin-bottom: 72px;
	padding-top: 16px;
	border-top: 2px solid var(--red);
	font-size: 18px;
	line-height: 24px;
}

.bkSummary:focus {
	outline: none;
}

.bkPage .bkSummary .bkLabel {
	display: flex;
	align-items: center;
	gap: 8px;
	grid-column: 1;
	padding-top: 4px;
}

.bkPage .bkSummary .bkLabel ~ * {
	grid-column: 2 / -1;
}

.bkPage .bkSummary ul {
	margin: 8px 0 0;
	padding-left: 1.1em;
	list-style: disc;
}

.bkPage .bkSummary ul[hidden] {
	display: none;
}

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

/* ---------- Booked: the whole window FUSS green ---------- */

html.bk-is-booked,
html.bk-is-booked body {
	background: #1ae32f;
}

html.bk-is-booked body.fuss-page {
	--page-ground: #1ae32f;
}

.bkBookedPage {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
	container-type: inline-size;
}

.bkBooked {
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: flex-end;
	padding: 48px var(--m) var(--m);
}

/* "Booked!" is 3.42em of ink in Faktum: fitted to the width, unless the window is too short. */
.bkPage .bkBookedWord {
	margin: 0 0 0 -.031em;
	padding: 0;
	font-size: min(calc((100cqw - 2 * var(--m)) / 3.42), calc((100svh - 220px) / .78));
	line-height: .78;
	font-weight: 400;
	letter-spacing: -.035em;
	white-space: nowrap;
}

.bkPage .bkBookedLine {
	font-size: clamp(22px, 2.5vw, 36px);
	line-height: 1.2;
	font-weight: 400;
	letter-spacing: -.01em;
}

.bkPage .bkBookedWhen {
	margin-top: 32px;
}

.bkPage .bkBookedAdd {
	margin-top: 24px;
}

.bkPage .bkBookedAdd a {
	color: var(--ink);
}

/* The booked screen floods in from the button. */
.bkFlood {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 10000;
	width: 100vw;
	height: 100vh;
	height: 100svh;
	overflow: hidden;
	background: var(--green, #1ae32f);
	clip-path: circle(0 at var(--fx) var(--fy));
	transition: clip-path .5s cubic-bezier(.3, .6, .2, 1);
}

.bkFlood.is-on {
	clip-path: circle(var(--fr) at var(--fx) var(--fy));
}

.bkFlood .bkBookedPage {
	height: 100%;
	min-height: 0;
}

html.bk-flooding {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.bkFlood,
	.bkPage .bkDate,
	.bkPage .bkSlot {
		transition: none;
	}
}

/* ---------- Narrower ---------- */

@media (max-width: 1100px) {
	.bkInfo {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.bkPage {
		--field: 22px;
		--field-lh: 30px;
	}

	.bkHead {
		padding-top: 40px;
	}

	.bkPage .bkGiant {
		font-size: 17vw;
		line-height: .92;
	}

	.bkPage .bkIntro {
		margin-top: 20px;
		font-size: 22px;
		line-height: 26.4px;
	}

	.bkInfo {
		gap: 28px var(--m);
		padding-top: 56px;
	}

	.bkForm {
		margin-top: 80px;
		padding-bottom: 120px;
	}

	.bkRow,
	.bkPage .bkField,
	.bkSend,
	.bkSummary {
		grid-template-columns: minmax(0, 1fr);
	}

	.bkSide,
	.bkPage .bkField > .bkLabel {
		padding: 0 0 6px;
	}

	.bkControl,
	.bkSendRow,
	.bkPage .bkSummary .bkLabel,
	.bkPage .bkSummary .bkLabel ~ * {
		grid-column: 1;
	}

	/* Phone: the range sits beside DAY; the zone moves under the day's name. */
	.bkDay .bkSide {
		display: flex;
		align-items: baseline;
		gap: 12px;
	}

	.bkPage .bkDay .bkSide .bkMuted {
		margin-top: 0;
	}

	.bkTime .bkSide .bkMuted,
	.bkTime .bkSide .bkLink {
		display: none;
	}

	.bkPage .bkZoneLine {
		display: block;
		margin-top: 8px;
	}

	.bkPage .bkZoneLine .bkLink {
		margin-left: 2px;
	}

	.bkGrid {
		--day: 28px;
		--day-h: 44px;
		--day-pad: 12px;
		row-gap: 6px;
		padding-top: 6px;
	}

	.bkPage .bkDow {
		padding-bottom: 10px;
	}

	.bkPage .bkNote {
		margin-top: 16px;
		padding-left: 12px;
		font-size: 16px;
		line-height: 22px;
	}

	.bkTime,
	.bkFields {
		margin-top: 64px;
	}

	.bkTimes {
		margin-top: 14px;
	}

	.bkBreak {
		display: none;
	}

	.bkPage .bkField + .bkField {
		margin-top: 36px;
	}

	.bkSend {
		margin-top: 44px;
	}

	.bkSendRow {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.bkSummary {
		margin-bottom: 48px;
		font-size: 16px;
		line-height: 22px;
	}

	.bkPage .bkSummary .bkLabel {
		padding: 0 0 8px;
	}

	.bkBooked {
		padding-bottom: 32px;
	}

	.bkPage .bkBookedWhen {
		margin-top: 20px;
	}

	.bkPage .bkBookedAdd {
		margin-top: 16px;
	}
}
