/* Booking UI: the compact bar on the homepage hero and the full request form.
   Fields, cards and buttons come from components.css; this file only adds the
   calendar, steppers, the summary and the two layouts. */
.ew-booking [hidden] {
	display: none !important;
}
.ew-booking__error {
	margin: 0;
	color: var(--ew-color-error);
	font-weight: var(--ew-weight-ui);
}
/* ------------------------------------------------------------------ */
/* Date fields and calendar                                            */
/* ------------------------------------------------------------------ */
.ew-booking__date.is-open {
	z-index: var(--ew-z-dropdown);
}
.ew-booking__date,
.ew-booking__date-wrap {
	position: relative;
}
.ew-booking__date-input {
	padding-inline-end: var(--ew-space-6);
	cursor: pointer;
}
.ew-booking__date-icon {
	position: absolute;
	top: 0;
	bottom: 0;
	right: var(--ew-space-2);
	width: var(--ew-space-4);
	height: var(--ew-space-4);
	margin-block: auto;
	color: var(--ew-color-text-muted);
	pointer-events: none;
}
.ew-booking__date.is-filled .ew-booking__date-icon,
.ew-booking__date.is-open .ew-booking__date-icon {
	color: var(--ew-color-brass);
}
.ew-booking__popover {
	position: absolute;
	z-index: var(--ew-z-dropdown);
	top: 100%;
	left: 0;
	display: flex;
	flex-direction: column;
	gap: var(--ew-space-3);
	width: calc(var(--ew-width-content) - var(--ew-space-6));
	max-width: calc(100vw - 2 * var(--ew-gutter)); /* design-lint: popover stays inside the viewport, not its field */
	padding: var(--ew-space-3);
	background: var(--ew-color-surface-raised);
	color: var(--ew-color-text-primary);
	border: var(--ew-border-width) solid var(--ew-color-border);
	border-radius: var(--ew-card-radius);
	box-shadow: var(--ew-shadow-raised);
}
[data-scheme="dark"] .ew-booking__popover {
	--ew-color-surface-raised: var(--ew-color-ink-700);
}
/* Fade: booking.js removes `hidden`, then adds .is-visible on the next
   frame; on close it swaps .is-visible for .is-closing and sets `hidden`
   once the duration has passed. Reduced motion zeroes the tokens. The
   offset uses `translate`, not `transform`, because placePopover() sets an
   inline transform to keep the popover inside the viewport. */
.ew-booking__popover {
	opacity: 0;
	translate: 0 0.375rem;
	transition:
		opacity var(--ew-motion-duration-normal) var(--ew-motion-ease),
		translate var(--ew-motion-duration-normal) var(--ew-motion-ease-out);
}
.ew-booking__popover.is-visible {
	opacity: 1;
	translate: 0 0;
}
.ew-booking__popover.is-closing {
	pointer-events: none;
}
/* The head always says which date is being chosen. */
.ew-booking__popover-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--ew-space-3);
	padding-bottom: var(--ew-space-2);
	border-bottom: var(--ew-border-width) solid var(--ew-color-border);
}
.ew-booking__popover-heading {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	column-gap: var(--ew-space-2);
	align-items: center;
}
.ew-booking__popover-mark {
	grid-row: 1 / span 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: color-mix(in srgb, var(--ew-color-brass) 14%, transparent);
	color: var(--ew-color-brass);
}
.ew-booking__popover-mark svg {
	width: 1.25rem;
	height: 1.25rem;
}
.ew-booking__popover-title {
	margin: 0;
	font-family: var(--ew-font-heading);
	font-size: var(--ew-text-heading-3);
	font-weight: var(--ew-weight-medium);
	line-height: 1.15;
}
.ew-booking__popover-calendar {
	display: grid;
	gap: var(--ew-space-4);
}
.ew-booking__popover-lead,
.ew-booking__popover-note {
	margin: 0;
	color: var(--ew-color-text-muted);
	font-size: var(--ew-text-meta);
}
.ew-booking__popover-close {
	display: none;
	align-self: flex-end;
}
.ew-booking__month-bar {
	display: grid;
	grid-template-columns: var(--ew-tap) minmax(0, 1fr) var(--ew-tap);
	align-items: center;
	gap: var(--ew-space-1);
}
.ew-booking__month-bar h3 {
	font-family: var(--ew-font-body);
	font-size: var(--ew-text-label);
	font-weight: var(--ew-weight-ui);
	letter-spacing: var(--ew-tracking-ui);
	line-height: var(--ew-leading-ui);
	text-align: center;
	text-wrap: nowrap;
	white-space: nowrap;
}
.ew-booking__nav,
.ew-booking__day {
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}
.ew-booking__nav {
	width: var(--ew-tap);
	height: var(--ew-tap);
	border-radius: 50%;
	font-size: var(--ew-text-heading-3);
	line-height: 1;
}
.ew-booking__nav:hover:not(:disabled) {
	background: color-mix(in srgb, var(--ew-color-text-primary) 8%, transparent);
}
.ew-booking__nav:disabled {
	opacity: 0.3;
	cursor: default;
}
.ew-booking__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: var(--ew-gap-hair);
}
.ew-booking__week {
	display: contents;
}
.ew-booking__weekday,
.ew-booking__day,
.ew-booking__empty {
	min-height: var(--ew-tap);
}
.ew-booking__weekday {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ew-color-text-muted);
	font-size: var(--ew-text-meta);
	font-weight: var(--ew-weight-ui);
}
.ew-booking__day {
	border-radius: var(--ew-radius-sm);
	font-family: var(--ew-font-numeric);
	font-variant-numeric: var(--ew-numeric);
	font-weight: var(--ew-weight-medium);
}
.ew-booking__day:not(:disabled):hover {
	background: color-mix(in srgb, var(--ew-color-brass) 18%, transparent);
}
.ew-booking__day:disabled,
.ew-booking__day.is-closed {
	color: var(--ew-color-text-muted);
	font-weight: var(--ew-weight-regular);
	cursor: default;
	opacity: 0.6;
}
.ew-booking__day.is-unavailable {
	text-decoration: line-through;
	opacity: 0.5;
}
/* Flexible months: Monday and Friday are the preferred days, every day stays selectable. */
.ew-booking__day.is-preferred:not(.is-arrival):not(.is-departure):not(.is-in-range):not(:disabled) {
	background: color-mix(in srgb, var(--ew-color-brass) 10%, transparent);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ew-color-brass) 45%, transparent);
}
.ew-booking__day.is-today:not(.is-arrival):not(.is-departure) {
	box-shadow: inset 0 0 0 1px var(--ew-color-border);
}
.ew-booking__day.is-in-range {
	background: color-mix(in srgb, var(--ew-color-brass) 18%, transparent);
	border-radius: 0;
}
.ew-booking__day.is-arrival,
.ew-booking__day.is-departure {
	background: var(--ew-button-primary-bg);
	color: var(--ew-button-primary-fg);
	opacity: 1;
}
.ew-booking__day.is-arrival:not(:disabled):hover,
.ew-booking__day.is-departure:not(:disabled):hover {
	background: var(--ew-button-primary-bg-hover);
}
.ew-booking__legend {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ew-space-1) var(--ew-space-3);
	color: var(--ew-color-text-muted);
	font-size: var(--ew-text-meta);
	list-style: none;
}
.ew-booking__legend li {
	display: inline-flex;
	align-items: center;
	gap: var(--ew-space-1);
}
.ew-booking__swatch {
	width: var(--ew-space-2);
	height: var(--ew-space-2);
	border-radius: 50%;
	background: transparent;
	box-shadow: inset 0 0 0 1px var(--ew-color-border);
}
.ew-booking__swatch.is-unavailable {
	background: color-mix(in srgb, var(--ew-color-text-primary) 20%, transparent);
	box-shadow: none;
}
.ew-booking__swatch.is-arrival {
	background: var(--ew-button-primary-bg);
	box-shadow: none;
}
.ew-booking__swatch.is-preferred {
	background: color-mix(in srgb, var(--ew-color-brass) 10%, transparent);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ew-color-brass) 45%, transparent);
}
/* Phone: the calendar opens as a bottom sheet on the full width. */
@media (max-width: 47.99rem) {
	.ew-booking__popover {
		position: fixed;
		top: auto;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: var(--ew-z-dialog);
		width: auto;
		max-width: none;
		max-height: calc(100dvh - var(--ew-header-h));
		overflow-y: auto;
		padding-bottom: calc(var(--ew-space-3) + env(safe-area-inset-bottom, 0px));
		border-radius: var(--ew-radius-lg) var(--ew-radius-lg) 0 0;
	}

	.ew-booking__popover-close {
		display: inline-flex;
	}

	/* The sheet slides up a little further than the desktop popover. */
	.ew-booking__popover {
		translate: 0 1rem;
	}

	.ew-booking__popover.is-visible {
		translate: 0 0;
	}
}
@media (min-width: 48rem) {
	/* booking.js flips the popover above its field when it does not fit
	   below (hero bar at the bottom of the viewport) and shifts it inside
	   the viewport sideways. */
	.ew-booking__popover.is-above {
		top: auto;
		bottom: 100%;
		translate: 0 -0.375rem;
	}

	.ew-booking__popover.is-above.is-visible {
		translate: 0 0;
	}

	.ew-booking__popover--wide {
		width: calc(var(--ew-width-content) + var(--ew-space-6));
	}

	.ew-booking__popover-calendar--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ew-booking__date--end .ew-booking__popover {
		left: auto;
		right: 0;
	}
}
/* ------------------------------------------------------------------ */
/* Stepper                                                             */
/* ------------------------------------------------------------------ */
.ew-stepper {
	display: grid;
	grid-template-columns: var(--ew-tap) minmax(0, 1fr) var(--ew-tap);
	align-items: stretch;
	min-height: var(--ew-field-height);
	border-bottom: var(--ew-border-width) solid var(--ew-color-border);
	border-radius: var(--ew-field-radius) var(--ew-field-radius) 0 0;
	background: color-mix(in srgb, var(--ew-color-text-primary) 4%, transparent);
	transition:
		background-color var(--ew-motion-duration-fast) var(--ew-motion-ease),
		border-color var(--ew-motion-duration-fast) var(--ew-motion-ease);
}
.ew-stepper:hover,
.ew-stepper:focus-within {
	background: color-mix(in srgb, var(--ew-color-text-primary) 8%, transparent);
	border-bottom-color: var(--ew-color-brass);
}
.ew-stepper__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--ew-tap);
	min-height: var(--ew-tap);
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ew-color-text-primary);
	font-size: var(--ew-text-heading-3);
	line-height: 1;
}
.ew-stepper__button:focus-visible {
	outline-offset: calc(-1.5 * var(--ew-line));
}
.ew-stepper__button:disabled {
	opacity: 0.4;
	cursor: default;
}
.ew-form .ew-stepper__input,
.ew-stepper__input {
	min-height: var(--ew-tap);
	border: 0;
	border-radius: 0;
	background: transparent;
	font-family: var(--ew-font-numeric);
	font-weight: var(--ew-weight-medium);
	font-variant-numeric: var(--ew-numeric);
	text-align: center;
	appearance: textfield;
}
.ew-form .ew-stepper__input:hover,
.ew-form .ew-stepper__input:focus-visible {
	background: transparent;
	outline-offset: calc(-1.5 * var(--ew-line));
}
.ew-stepper__input::-webkit-outer-spin-button,
.ew-stepper__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
/* ------------------------------------------------------------------ */
/* Full request form                                                   */
/* ------------------------------------------------------------------ */
.ew-booking--full,
.ew-booking__main {
	display: flex;
	flex-direction: column;
	gap: var(--ew-space-3);
}
.ew-booking__card {
	gap: var(--ew-space-6);
	padding: var(--ew-space-5);
	background: var(--ew-color-surface);
}
.ew-booking__step-title {
	display: flex;
	align-items: center;
	gap: var(--ew-space-2);
}
.ew-booking__step-title .ew-index--circle {
	font-size: var(--ew-text-label);
}
.ew-booking__step-copy {
	max-width: var(--ew-width-measure);
	color: var(--ew-color-text-secondary);
}
.ew-booking__fieldset {
	display: flex;
	flex-direction: column;
	gap: var(--ew-space-1);
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}
.ew-booking__fieldset legend {
	padding: 0;
	margin-bottom: var(--ew-space-1);
}
.ew-booking__fieldset .ew-grid,
.ew-booking__fields {
	gap: var(--ew-space-4) var(--ew-gap-tight);
}
/* Summary card */
.ew-booking__summary {
	gap: var(--ew-space-4);
}
.ew-booking__summary-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ew-space-3);
}
.ew-booking__step,
.ew-booking__summary-body {
	display: flex;
	flex-direction: column;
	gap: var(--ew-space-4);
}
.ew-booking__hint,
.ew-booking__note,
.ew-booking__privacy {
	margin: 0;
	color: var(--ew-color-text-muted);
	font-size: var(--ew-text-meta);
	font-weight: var(--ew-weight-medium);
}
.ew-booking__privacy a {
	color: var(--ew-color-text-primary);
	text-decoration-color: var(--ew-color-brass);
	text-underline-offset: 0.2em;
}
.ew-booking__call {
	display: flex;
	flex-direction: column;
	gap: var(--ew-space-1);
	padding-top: var(--ew-space-3);
	border-top: var(--ew-border-width) solid var(--ew-color-border);
}
.ew-booking__costs > div.is-total {
	padding-top: var(--ew-space-2);
	border-top: var(--ew-border-width) solid var(--ew-color-border);
}
.ew-booking__costs > div.is-total dt {
	color: var(--ew-color-text-primary);
}
.ew-booking__costs dd small {
	display: block;
	color: var(--ew-color-text-muted);
	font-family: var(--ew-font-body);
	font-size: var(--ew-text-meta);
	font-weight: var(--ew-weight-medium);
}
.ew-booking__hint:empty,
.ew-booking__summary-toggle,
.ew-booking__status:empty,
.ew-booking__error:empty,
.ew-booking__sticky {
	display: none;
}
.ew-booking__done {
	gap: var(--ew-space-3);
}
.ew-booking__done:focus {
	outline: none;
}
/* Desktop: form 7/12, summary 4/12 with a column between, sticky summary. */
@media (min-width: 64rem) {
	.ew-booking__layout > .ew-booking__main {
		grid-column: 1 / 8;
	}

	.ew-booking__layout > .ew-booking__aside {
		grid-column: 9 / 13;
		position: sticky;
		top: calc(var(--ew-header-h) + var(--ew-admin-bar-h) + var(--ew-space-4));
	}
}
/* Below desktop: summary as a compact fold above the form, send bar sticky at the bottom once dates exist. */
@media (max-width: 63.99rem) {
	.ew-booking__layout {
		display: flex;
		flex-direction: column;
	}
	.ew-booking__layout > .ew-booking__aside {
		order: -1;
		width: 100%;
	}
	.ew-booking__summary-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: var(--ew-tap);
		height: var(--ew-tap);
		padding: 0;
		border: var(--ew-border-width) solid var(--ew-color-border);
		border-radius: 50%;
		background: transparent;
		color: inherit;
	}
	.ew-booking__summary-toggle::before {
		content: "";
		width: var(--ew-space-1);
		height: var(--ew-space-1);
		border-right: var(--ew-line) solid currentColor;
		border-bottom: var(--ew-line) solid currentColor;
		transform: translateY(calc(-1 * var(--ew-line))) rotate(45deg);
		transition: transform var(--ew-motion-duration-fast) var(--ew-motion-ease);
	}
	.ew-booking__summary-toggle[aria-expanded="true"]::before {
		transform: translateY(var(--ew-line)) rotate(225deg);
	}
	.ew-booking__summary.is-collapsed .ew-booking__summary-body,
	.ew-booking__summary .ew-booking__submit {
		display: none;
	}
	.ew-booking__sticky {
		position: sticky;
		bottom: 0;
		z-index: var(--ew-z-header);
		display: flex;
		align-items: center;
		gap: var(--ew-space-3);
		padding: var(--ew-space-2) 0 calc(var(--ew-space-2) + env(safe-area-inset-bottom, 0px));
		background: var(--ew-color-bg);
		border-top: var(--ew-border-width) solid var(--ew-color-border);
	}
	.ew-booking__sticky-digest {
		margin: 0;
		min-width: 0;
		color: var(--ew-color-text-secondary);
		font-size: var(--ew-text-meta);
		font-weight: var(--ew-weight-medium);
		line-height: var(--ew-leading-ui);
	}
	.ew-booking__sticky .ew-button {
		flex: none;
	}
}
/* ------------------------------------------------------------------ */
/* Compact bar on the homepage hero (the bar carries data-scheme="light")  */
/* ------------------------------------------------------------------ */
.ew-booking--compact {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: var(--ew-space-2);
}
.ew-booking__trap,
.ew-booking--compact .ew-booking__status {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
}
.ew-booking__bar {
	display: flex;
	flex-direction: column;
	gap: var(--ew-space-3);
	padding: var(--ew-space-3);
	background: var(--ew-color-surface);
	color: var(--ew-color-text-primary);
	border-radius: var(--ew-card-radius);
	box-shadow: var(--ew-shadow-raised);
}
.ew-booking__bar-fields {
	display: grid;
	gap: var(--ew-space-3);
}
.ew-booking__status,
.ew-booking__bar-hint {
	margin: 0;
	color: var(--ew-color-text-muted);
	font-size: var(--ew-text-meta);
	font-weight: var(--ew-weight-medium);
}
.ew-hero .ew-booking--compact .ew-booking__error {
	color: var(--ew-color-on-photo);
}
@media (min-width: 56rem) {
	.ew-booking__bar {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: end;
		gap: var(--ew-space-3) var(--ew-space-4);
	}

	.ew-booking__bar-fields {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 0.8fr);
		gap: var(--ew-space-3);
	}

	/* With the dog field (Regels tab: dogs welcome) the bar holds four fields. */
	.ew-booking__bar-fields--dogs {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 0.75fr) minmax(0, 0.75fr);
	}

	.ew-booking__bar-hint {
		grid-column: 1 / -1;
	}

	.ew-booking__bar .ew-button {
		white-space: nowrap;
	}

	/* Liquid glass over the hero photo: a light paper tint lets the blurred,
	   saturated slide colour the pane; the white edge and top highlight read
	   as its lit rim, the sheen as a reflection. The sheen sits on a pseudo
	   element behind the fields (isolate + z-index -1), so no overflow clip is
	   needed and the date popovers still open outside the bar. Fields are
	   near-white wells on the pane, so values and placeholders keep contrast
	   whatever slide is behind the bar. */
	.ew-hero--home .ew-booking__bar {
		/* Muted copy (hint, placeholders) darkens a step: over a dark slide the
		   tinted glass is greyer than paper, and ink-500 would drop under 4.5:1. */
		--ew-color-text-muted: var(--ew-color-ink-700);
		position: relative;
		isolation: isolate;
		background: var(--ew-glass-tint);
		-webkit-backdrop-filter: blur(var(--ew-glass-blur)) saturate(var(--ew-glass-saturate));
		backdrop-filter: blur(var(--ew-glass-blur)) saturate(var(--ew-glass-saturate));
		border: var(--ew-border-width) solid var(--ew-glass-edge);
		box-shadow:
			inset 0 1px 0 var(--ew-glass-highlight),
			0 0 0 1px color-mix(in srgb, var(--ew-color-ink-900) 8%, transparent),
			var(--ew-shadow-raised);
	}

	.ew-hero--home .ew-booking__bar::before {
		content: "";
		position: absolute;
		inset: 0;
		z-index: -1;
		border-radius: inherit;
		background:
			radial-gradient(120% 90% at 0% 0%, var(--ew-glass-sheen), transparent 55%),
			linear-gradient(180deg, color-mix(in srgb, var(--ew-color-white) 16%, transparent), transparent 45%);
		pointer-events: none;
	}

	.ew-hero--home .ew-booking__bar .ew-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not(.ew-stepper__input),
	.ew-hero--home .ew-booking__bar .ew-stepper {
		background: var(--ew-glass-well);
		border-bottom-color: color-mix(in srgb, var(--ew-color-ink-900) 24%, transparent);
	}

	.ew-hero--home .ew-booking__bar .ew-form input:not(.ew-stepper__input):hover,
	.ew-hero--home .ew-booking__bar .ew-form input:not(.ew-stepper__input):focus-visible,
	.ew-hero--home .ew-booking__bar .ew-stepper:hover,
	.ew-hero--home .ew-booking__bar .ew-stepper:focus-within {
		background: var(--ew-glass-well-active);
		border-bottom-color: var(--ew-color-brass);
	}

	.ew-hero--home .ew-booking__bar .ew-form .ew-stepper__input,
	.ew-hero--home .ew-booking__bar .ew-form .ew-stepper__input:hover,
	.ew-hero--home .ew-booking__bar .ew-form .ew-stepper__input:focus-visible {
		background: transparent;
	}

	@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
		.ew-hero--home .ew-booking__bar {
			background: var(--ew-glass-tint-fallback);
		}
	}
}
@media (prefers-reduced-motion: reduce) {
	.ew-booking__day,
	.ew-booking__nav,
	.ew-stepper,
	.ew-booking__summary-toggle::before {
		transition: none;
	}
}
