/**
 * Booking block styles: the appointment card and its calendar.
 *
 * The appointment card (the calling card's back, printed on the ink's tint)
 * sits on the left and fills in as the visitor chooses; the calendar and the
 * times are pressed card tiles on the right; then the questions on the same
 * page, and "Or write first" below. Colours and type come from the theme's
 * variables in style.css (--vc-*), so the owner's ink and fonts carry
 * through; the fallbacks are Card's consultant pack.
 */

.varnify-card-booking {
	--bk-black: var(--vc-black, #1b1b19);
	--bk-grey: var(--vc-grey, #55534d);
	--bk-card: var(--vc-card, #fbf9f4);
	--bk-page: var(--vc-page, #e5e4df);
	--bk-ink: var(--vc-ink, #7a5a0e);
	--bk-pressed: var(--vc-pressed, #a9a79f);
	--bk-error: #a3201a;
	--bk-tile:
		0 0 0 1px rgb(60 50 30 / 0.1),
		0 2px 0 var(--vc-face-edge, #dcd6c9),
		0 3px 0 color-mix(in oklab, var(--vc-face-edge, #dcd6c9) 80%, #6f6656);

	font-size: 17px;
	line-height: 1.55;
	color: var(--bk-black);
}

.varnify-card-booking *,
.varnify-card-booking *::before,
.varnify-card-booking *::after {
	box-sizing: border-box;
}

.varnify-card-booking :where(p, h2, h3, h4, dl, dd, ol, fieldset) {
	margin: 0;
}

.varnify-card-booking__heading {
	margin-bottom: 0.75rem;
}

.varnify-card-booking__layout {
	display: grid;
	gap: 64px;
}

.varnify-card-sr,
.varnify-card-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.varnify-card-hp {
	left: -9999px;
}

/* ---------------------------------------------------------------------------
   The appointment card and the picker beside it
   --------------------------------------------------------------------------- */

.varnify-card-bk {
	display: grid;
	gap: 48px;
}

@media (min-width: 960px) {
	.varnify-card-bk {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: 64px;
		align-items: start;
	}

	.varnify-card-bk > .varnify-card-bk__summary {
		position: sticky;
		top: 96px;
		--vc-e: 7px;
	}
}

.varnify-card-bk__summary {
	margin-top: 26px;
}

/* What the call is, set as one line of type in the card's face. */
.varnify-card-bk__terms {
	margin-top: 16px !important;
	font-family: var(--vc-face, sans-serif);
	font-size: 16px;
	font-weight: 560;
	line-height: 1.45;
	color: var(--bk-black);
}

.varnify-card-bk__dot {
	color: var(--bk-ink);
}

.varnify-card-bk__zone {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin-top: 10px !important;
	font-size: 15px;
	color: var(--bk-grey);
}

.varnify-card-bk__tz {
	/* The rest of the line from the first paint: sized by its options, the
	   empty select sat beside the label and the filled one wrapped under
	   it, moving everything below (CLS). */
	flex: 1 1 12em;
	min-width: 0;
	max-width: 100%;
	min-height: 44px;
	padding: 6px 28px 6px 2px;
	border: 0;
	border-bottom: 1.5px solid var(--bk-black);
	border-radius: 0;
	background: transparent;
	color: var(--bk-black);
	font-family: var(--vc-face, sans-serif);
	font-size: 15px;
	font-weight: 600;
}

.varnify-card-bk__steps {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin-top: 18px !important;
	padding: 14px 0 0;
	border-top: 1.5px solid var(--bk-black);
	list-style: none;
	font-family: var(--vc-face, sans-serif);
	font-size: 13px;
	color: var(--bk-grey);
}

.varnify-card-bk__steps li {
	display: flex;
	align-items: center;
	gap: 6px;
}

.varnify-card-bk__mark {
	display: inline-grid;
	place-items: center;
	width: 20px;
	height: 20px;
	border: 1.5px solid currentColor;
	border-radius: 50%;
	font-size: 11px;
	font-weight: 700;
}

.varnify-card-bk__steps [aria-current="step"] {
	font-weight: 650;
	color: var(--bk-black);
}

.varnify-card-bk__steps .is-done {
	color: var(--bk-black);
}

.varnify-card-bk__steps .is-done .varnify-card-bk__mark,
.varnify-card-bk__steps [aria-current="step"] .varnify-card-bk__mark {
	border-color: var(--bk-black);
	background: var(--bk-black);
	color: var(--bk-card);
}

.varnify-card-bk__main {
	min-width: 0;
}

.varnify-card-bk__status {
	font-size: 17px;
	color: var(--bk-grey);
}

.varnify-card-bk__status:empty {
	display: none;
}

.varnify-card-bk__moving {
	margin-bottom: 24px !important;
	padding: 14px 16px;
	background: var(--bk-card);
	box-shadow: var(--bk-tile);
	font-size: 16px;
}

.varnify-card-bk__panes {
	display: grid;
	gap: 40px;
}

@media (min-width: 600px) and (max-width: 959px), (min-width: 1240px) {
	.varnify-card-bk__panes {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 40px;
	}
}

/* ---------------------------------------------------------------------------
   The month, as a card index: each day with free times is a small date
   card filed upright, its ink tab standing above it; a full or closed
   day has no card, only its number pressed into the stone. The chosen
   day is the card pulled up out of the file.
   --------------------------------------------------------------------------- */

.varnify-card-cal__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.varnify-card-cal__month {
	font-family: var(--vc-face, sans-serif);
	font-size: 13px;
	font-stretch: 150%;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.varnify-card-cal__month span {
	margin-left: 6px;
	font-stretch: 100%;
	font-weight: 500;
	letter-spacing: 0;
	color: var(--bk-grey);
}

.varnify-card-cal__steps {
	display: flex;
	gap: 8px;
}

.varnify-card-cal__step {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: var(--bk-card);
	box-shadow: var(--bk-tile);
	color: var(--bk-black);
	cursor: pointer;
}

.varnify-card-cal__step:disabled {
	background: transparent;
	box-shadow: inset 0 0 0 1.5px var(--bk-pressed);
	color: var(--bk-grey);
	cursor: default;
}

.varnify-card-cal__head,
.varnify-card-cal__week {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 6px;
}

.varnify-card-cal__head {
	margin-bottom: 6px;
	font-family: var(--vc-face, sans-serif);
	font-size: 11px;
	font-stretch: 130%;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
	color: var(--bk-grey);
}

.varnify-card-cal__grid {
	display: grid;
	gap: 15px;
	padding-top: 6px;
}

.varnify-card-cal__day {
	position: relative;
	display: grid;
	place-items: center;
	width: 100%;
	/* The ratio would turn the 44px minimum height into a 51px minimum
	   width, wider than a column on a phone or beside the booking card,
	   and each day would run into the next. The column sets the width. */
	min-width: 0;
	min-height: 44px;
	aspect-ratio: 1 / 0.86;
	padding: 0;
	border: 0;
	border-radius: 0 0 2px 2px;
	background: var(--bk-card);
	box-shadow:
		0 0 0 1px rgb(60 50 30 / 0.13),
		0 2px 0 0 color-mix(in oklab, var(--bk-card) 88%, #8a7f6a);
	color: var(--bk-black);
	font-family: var(--vc-face, sans-serif);
	font-size: 17px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
}

/* The card's tab: cut into its top edge on the left, in the ink when the
   day has times free (the key below says so). */
.varnify-card-cal__dot {
	position: absolute;
	top: -6px;
	left: 6px;
	width: 42%;
	max-width: 26px;
	height: 6px;
	background: transparent;
	clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 100%, 0 100%);
}

.varnify-card-cal__day.has-free .varnify-card-cal__dot {
	background: var(--bk-ink);
}

.varnify-card-cal__day:hover:not(.is-empty):not(.is-selected):not(.is-full) {
	translate: 0 -2px;
}

.varnify-card-cal__day.is-empty,
.varnify-card-cal__day.is-full {
	background: transparent;
	box-shadow: none;
	color: var(--bk-grey);
	text-decoration: line-through;
	text-decoration-thickness: 1.5px;
	text-shadow: 0 1px 0 rgb(255 255 255 / 0.7);
	cursor: default;
}

.varnify-card-cal__day.is-full {
	cursor: pointer;
}

.varnify-card-cal__day.is-full:hover {
	box-shadow: inset 0 0 0 1.5px var(--bk-pressed);
}

/* Pulled up out of the file: the card in the ink, raised by its own tab's
   height, its shadow on the cards behind. */
.varnify-card-cal__day.is-selected {
	z-index: 1;
	background: var(--bk-ink);
	box-shadow: 0 6px 10px -6px rgb(20 16 10 / 0.55);
	color: var(--bk-card);
	text-decoration: none;
	text-shadow: none;
	translate: 0 -5px;
}

.varnify-card-cal__day.is-selected .varnify-card-cal__dot {
	background: var(--bk-ink);
}

.varnify-card-cal__blank {
	min-height: 44px;
}

.varnify-card-cal__key {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin-top: 12px !important;
	font-size: 14px;
	color: var(--bk-grey);
}

.varnify-card-cal__key > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.varnify-card-cal__key .varnify-card-cal__dot {
	position: static;
	width: 16px;
	height: 6px;
	margin: 0;
	background: var(--bk-ink);
}

/* ---------------------------------------------------------------------------
   The times
   --------------------------------------------------------------------------- */

.varnify-card-times__day {
	font-family: var(--vc-face, sans-serif);
	font-size: 16px;
	font-stretch: 110%;
	font-weight: 650;
	line-height: 44px;
}

.varnify-card-times__count {
	margin: -4px 0 14px !important;
	font-size: 14px;
	color: var(--bk-grey);
}

.varnify-card-times__group + .varnify-card-times__group {
	margin-top: 16px;
}

.varnify-card-times__label {
	margin-bottom: 8px !important;
	font-family: var(--vc-face, sans-serif);
	font-size: 13px;
	font-weight: 600;
	color: var(--bk-grey);
}

.varnify-card-times__note {
	font-size: 16px;
	color: var(--bk-grey);
}

.varnify-card-times__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.varnify-card-slot {
	min-height: 46px;
	padding: 6px 4px;
	border: 0;
	background: var(--bk-card);
	box-shadow: var(--bk-tile);
	color: var(--bk-black);
	font-family: var(--vc-face, sans-serif);
	font-size: 16px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
}

.varnify-card-slot:hover:not(:disabled):not(.is-selected) {
	box-shadow: var(--bk-tile), inset 0 -3px 0 var(--bk-ink);
}

.varnify-card-slot.is-selected {
	background: var(--bk-ink);
	box-shadow: none;
	color: var(--bk-card);
}

.varnify-card-slot.is-taken,
.varnify-card-slot.is-current {
	background: transparent;
	box-shadow: inset 0 0 0 1.5px var(--bk-pressed);
	color: var(--bk-grey);
	text-decoration: line-through;
	cursor: default;
}

.varnify-card-slot.is-current {
	text-decoration: none;
}

@media (prefers-reduced-motion: no-preference) {
	.varnify-card-slot,
	.varnify-card-cal__day {
		transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, translate 0.18s ease-out;
	}

	/* Picking a day: the date card is pressed down under the finger, then
	   comes up out of the file. Scale only, so nothing around it moves. */
	.varnify-card-cal__day.is-selected {
		animation: varnify-card-press 0.24s cubic-bezier(0.3, 0.7, 0.4, 1);
	}

	@keyframes varnify-card-press {
		0% {
			scale: 0.9;
		}
		45% {
			scale: 0.96;
		}
		100% {
			scale: 1;
		}
	}
}

/* ---------------------------------------------------------------------------
   Next, buttons, the questions
   --------------------------------------------------------------------------- */

.varnify-card-bk__next {
	display: grid;
	gap: 12px;
	margin-top: 36px;
}

.varnify-card-bk__next p {
	font-size: 15px;
	color: var(--bk-grey);
}

.varnify-card-bk__button,
.varnify-card-write__send {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 56px;
	padding: 0 22px;
	border: 0;
	background: var(--bk-black);
	color: var(--bk-card);
	font-family: var(--vc-face, sans-serif);
	font-size: 17px;
	font-stretch: 108%;
	font-weight: 620;
	cursor: pointer;
}

.varnify-card-bk__next .varnify-card-bk__button {
	width: 100%;
}

.varnify-card-bk__button:hover:not(:disabled),
.varnify-card-write__send:hover {
	box-shadow: inset 0 -3px 0 var(--bk-ink);
}

.varnify-card-bk__button:disabled {
	background: transparent;
	box-shadow: inset 0 0 0 1.5px var(--bk-pressed);
	color: var(--bk-grey);
	cursor: not-allowed;
}

.varnify-card-bk__link {
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--bk-black);
	font-family: var(--vc-face, sans-serif);
	font-size: 15px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.varnify-card-bk__details,
.varnify-card-bk__form {
	display: grid;
	gap: 22px;
}

.varnify-card-bk__details[hidden],
.varnify-card-bk__form[hidden],
.varnify-card-bk__done[hidden],
.varnify-card-bk__pick[hidden],
.varnify-card-write__form[hidden],
.varnify-card-write__sent[hidden],
.varnify-card-field[hidden] {
	display: none;
}

.varnify-card-bk__details-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
}

.varnify-card-bk__details-title,
.varnify-card-write__title {
	font-family: var(--vc-text, serif);
	font-size: clamp(26px, 1.4vw + 16px, 34px);
	font-weight: 420;
	line-height: 1.12;
	letter-spacing: -0.015em;
}

.varnify-card-bk__pair {
	display: grid;
	gap: 22px;
}

@media (min-width: 600px) {
	.varnify-card-bk__pair {
		grid-template-columns: 1fr 1fr;
	}
}

/* Fields are printed blanks: a label, then a ruled line to write on. */
.varnify-card-field {
	display: grid;
	gap: 4px;
}

.varnify-card-field label,
.varnify-card-write__ways legend {
	font-family: var(--vc-face, sans-serif);
	font-size: 14px;
	font-weight: 600;
}

.varnify-card-field :is(input, textarea) {
	width: 100%;
	min-height: 46px;
	padding: 8px 2px;
	border: 0;
	border-bottom: 2px solid var(--bk-black);
	border-radius: 0;
	background: transparent;
	color: var(--bk-black);
	font-size: 18px;
}

.varnify-card-field textarea {
	min-height: 0;
	line-height: 1.5;
	resize: vertical;
}

.varnify-card-field :is(input, textarea):focus-visible {
	outline: 2px solid var(--bk-black);
	outline-offset: 2px;
	border-bottom-color: var(--bk-ink);
}

.varnify-card-field [aria-invalid="true"] {
	border-bottom-color: var(--bk-error);
}

.varnify-card-field__error,
.varnify-card-bk__error {
	font-size: 15px;
	font-weight: 600;
	color: var(--bk-error);
}

.varnify-card-field__hint {
	font-size: 14px;
	color: var(--bk-grey);
}

.varnify-card-bk__questions {
	display: grid;
	gap: 22px;
	padding-top: 8px;
}

.varnify-card-bk__hint {
	font-size: 15px;
	color: var(--bk-grey);
}

/* ---------------------------------------------------------------------------
   Booked
   --------------------------------------------------------------------------- */

.varnify-card-bk__done {
	display: grid;
	gap: 14px;
	justify-items: start;
}

.varnify-card-bk__tick {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	background: var(--bk-ink);
	color: var(--bk-card);
}

.varnify-card-bk__done-title {
	font-family: var(--vc-text, serif);
	font-size: clamp(32px, 2vw + 20px, 46px);
	font-weight: 420;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.varnify-card-bk__done-when {
	font-family: var(--vc-face, sans-serif);
	font-size: 19px;
	font-weight: 600;
	color: var(--bk-ink);
}

.varnify-card-bk__cal-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 8px;
}

.varnify-card-bk__cal-links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	background: var(--bk-card);
	box-shadow: var(--bk-tile);
	color: var(--bk-black);
	font-family: var(--vc-face, sans-serif);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

.varnify-card-bk__cal-links a:hover {
	box-shadow: var(--bk-tile), inset 0 -3px 0 var(--bk-ink);
}

/* 3.3 How to pay: a ruled section under the booking, the bank details on
   their own tile like the calendar links, the link as the black button. */
.varnify-card-bk__pay-slot {
	width: 100%;
}

.varnify-card-bk__pay {
	display: grid;
	gap: 10px;
	width: 100%;
	padding-top: 16px;
	border-top: 2px solid var(--bk-ink);
}

.varnify-card-bk__pay p {
	margin: 0;
}

.varnify-card-bk__pay-title {
	margin: 0;
	font-family: var(--vc-face, sans-serif);
	font-size: 19px;
	font-weight: 650;
	line-height: 1.25;
	color: var(--bk-black);
	text-wrap: balance;
}

.varnify-card-bk__bank {
	padding: 14px 16px;
	background: var(--bk-card);
	box-shadow: var(--bk-tile);
}

.varnify-card-bk__bank h4 {
	margin: 0 0 4px;
	font-family: var(--vc-face, sans-serif);
	font-size: 15px;
	font-weight: 650;
}

.varnify-card-bk__bank-details {
	white-space: pre-line;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

.varnify-card-bk__pay-link {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 16px;
}

.varnify-card-bk__pay-link .varnify-card-bk__button {
	text-decoration: none;
}

.varnify-card-bk__pay-note {
	font-size: 15px;
	font-weight: 600;
	color: var(--bk-black);
}

.varnify-card-bk__details > .varnify-card-bk__pay {
	margin-bottom: 18px;
}

.varnify-card-bk__details-title:focus,
.varnify-card-bk__done-title:focus,
.varnify-card-write__thanks:focus {
	outline: none;
}

/* ---------------------------------------------------------------------------
   Or write first
   --------------------------------------------------------------------------- */

.varnify-card-write {
	display: grid;
	gap: 18px;
	/* No rule over it: the space and the heading say a second way in. */
	margin-top: 40px;
}

.varnify-card-write[hidden] {
	display: none;
}

.varnify-card-write__head,
.varnify-card-write__body {
	display: grid;
	gap: 18px;
}

.varnify-card-write__head > *,
.varnify-card-write__body > * {
	margin: 0;
}

/* From a laptop up the note is laid across the booking's full width, like
   a reply slip: the heading and the reply line, then name, email and the
   best way to reach you on one line, the message beside the button. Short,
   with no column standing empty beside a tall form. */
@media (min-width: 960px) {
	.varnify-card-write {
		margin-top: 72px;
	}

	.varnify-card-write__head {
		grid-template-columns: auto 1fr;
		align-items: baseline;
		column-gap: 24px;
	}

	.varnify-card-write__form {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		grid-template-areas:
			"name email ways"
			"msg msg phone"
			"msg msg send"
			"error error error";
		column-gap: 40px;
		align-items: start;
	}

	.varnify-card-write__name {
		grid-area: name;
	}

	.varnify-card-write__email {
		grid-area: email;
	}

	.varnify-card-write__ways {
		grid-area: ways;
	}

	.varnify-card-write__phone {
		grid-area: phone;
	}

	.varnify-card-write__msg {
		grid-area: msg;
	}

	.varnify-card-write__error {
		grid-area: error;
	}

	.varnify-card-write__form .varnify-card-write__send {
		grid-area: send;
		align-self: end;
	}

	.varnify-card-write__msg textarea {
		min-height: 112px;
	}
}

.varnify-card-write__reply {
	font-size: 16px;
	color: var(--bk-grey);
}

/* Once the message is sent, the thanks says when the reply comes: the
   line under the heading would say it twice. */
.varnify-card-write:has(.varnify-card-write__sent:not([hidden])) .varnify-card-write__reply {
	display: none;
}

.varnify-card-write__form {
	display: grid;
	gap: 22px;
}

.varnify-card-write__ways {
	padding: 0;
	border: 0;
}

.varnify-card-write__ways legend {
	margin-bottom: 8px;
	padding: 0;
}

.varnify-card-seg {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.varnify-card-seg label {
	position: relative;
	display: inline-flex;
}

.varnify-card-seg input {
	position: absolute;
	opacity: 0;
	inset: 0;
	margin: 0;
	cursor: pointer;
}

.varnify-card-seg span {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 18px;
	background: var(--bk-card);
	box-shadow: var(--bk-tile);
	font-family: var(--vc-face, sans-serif);
	font-size: 15px;
	font-weight: 600;
}

.varnify-card-seg input:checked + span {
	background: var(--bk-ink);
	box-shadow: none;
	color: var(--bk-card);
}

.varnify-card-seg input:focus-visible + span {
	outline: 2px solid var(--bk-black);
	outline-offset: 3px;
}

.varnify-card-write__send {
	justify-self: start;
}

.varnify-card-write__sent {
	display: grid;
	gap: 8px;
}

.varnify-card-write__thanks {
	font-family: var(--vc-face, sans-serif);
	font-size: 19px;
	font-weight: 600;
}

.varnify-card-write__crisis {
	font-size: 15px;
	font-weight: 600;
}
