/*
 * WK Booking — frontend styles for the inline availability calendar.
 *
 * Scoped under .wk-booking so theme styles win where reasonable. Uses CSS
 * custom properties for the accent so the booking module can be re-themed
 * without touching this file.
 */

.wk-booking {
	--wk-accent: #5e7d51;
	--wk-accent-strong: #46603c;
	--wk-text: #232323;
	--wk-muted: #8a8a8a;

	--wk-day-bg: #ffffff;
	--wk-day-border: #e7e4dc;
	--wk-day-hover-bg: rgba(94, 125, 81, 0.12);              /* legacy fallback */
	--wk-day-hover-bg: color-mix(in srgb, var(--wk-accent) 12%, transparent);
	--wk-day-booked-bg: #ededed;
	--wk-day-booked-fg: #b3b3b3;

	--wk-skeleton-bg: #efece6;
	--wk-radius: 10px;
	--wk-radius-pill: 999px;

	color: var(--wk-text);
	font-family: inherit;
	margin: 1.5rem 0;
	max-width: 760px;
}

/* The modal and dropdown are portaled to <body> at runtime to escape
 * Elementor / page-builder stacking contexts. They keep the `wk-booking`
 * class so the existing `.wk-booking .flatpickr-*` rules still match
 * descendants and the CSS variables above resolve. The `--portal`
 * modifier neutralises layout properties from `.wk-booking` that were
 * scoped to the in-flow card (max-width caps the modal off-center,
 * margin pushes the dropdown around). */
.wk-booking.wk-booking--portal {
	margin: 0;
	max-width: none;
}

.wk-booking__header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-bottom: 0.75rem;
}

.wk-booking__name {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.2;
}

.wk-booking__from {
	margin: 0;
	color: var(--wk-muted);
	font-size: 1rem;
	min-height: 1.4em;
}

.wk-booking__from strong {
	color: var(--wk-text);
	font-weight: 700;
}

.wk-booking__from-skel {
	display: inline-block;
	width: 9em;
	height: 1em;
	vertical-align: middle;
	background: var(--wk-skeleton-bg);
	border-radius: var(--wk-radius-pill);
	animation: wk-booking-pulse 1.6s ease-in-out infinite;
}

.wk-booking__calendar {
	position: relative;
	min-height: 320px;
	/* Tiny horizontal breathing room. Day cells use flex-basis: calc(100% / 7);
	 * with the 1px border + sub-pixel rounding the rightmost (Sunday) column
	 * can land 1–2px past the container content edge, and on hover the
	 * cell scales by 4% (~2px each side). Without this padding both end up
	 * visually clipped. 4px is enough to absorb both — auto-width block,
	 * so it doesn't widen the calendar past its parent's max-width. */
	padding: 0 4px;
}

.wk-booking__skeleton {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

@media (min-width: 768px) {
	.wk-booking__skeleton {
		grid-template-columns: 1fr 1fr;
	}
}

.wk-booking__skeleton-month {
	height: 280px;
	border-radius: var(--wk-radius);
	background: var(--wk-skeleton-bg);
	animation: wk-booking-pulse 1.6s ease-in-out infinite;
}

@keyframes wk-booking-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.55; }
}

.wk-booking__status {
	text-align: center;
	margin: 0.75rem 0 0;
	color: var(--wk-muted);
	font-size: 0.95rem;
}

.wk-booking[data-wk-state="ready"] .wk-booking__skeleton,
.wk-booking[data-wk-state="ready"] .wk-booking__status,
.wk-booking[data-wk-state="ready"] .wk-booking__from-skel {
	display: none;
}

.wk-booking[data-wk-state="error"] .wk-booking__skeleton,
.wk-booking[data-wk-state="error"] .wk-booking__from-skel {
	display: none;
}

/* ---------- Defensive form-element reset (Elementor / page builders) ----------
 *
 * Elementor's kit-class rule paints every <input> on the site:
 *
 *   .elementor-kit-NNNN input:not([type="button"]):not([type="submit"]),
 *   .elementor-kit-NNNN textarea,
 *   .elementor-kit-NNNN .elementor-field-textual {
 *     background-color: #EFEFEF;
 *     padding: 16px 25px;
 *     ...
 *   }
 *
 * That rule's specificity is (0,3,1), matching ours. Worse: it hits
 * Flatpickr's INTERNAL inputs — the .cur-year field in the month header
 * (showing as a grey bar with cropped year), and the anchor .flatpickr-input
 * (which becomes visible if a theme forces display on inputs). Identical
 * traps exist in other page builders (Divi, Beaver, GeneratePress kits).
 *
 * Reset every input within our widget back to a neutral state. !important is
 * justified here as a tightly scoped widget-internal defence — site-level
 * accent customisation still flows through the CSS variables above. */
.wk-booking input,
.wk-booking input.cur-year,
.wk-booking input.flatpickr-input,
.wk-booking input.flatpickr-mobile {
	background: transparent !important;
	background-color: transparent !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--wk-text) !important;
	font-family: inherit !important;
	font-size: inherit !important;
	line-height: inherit !important;
	margin: 0 !important;
	height: auto !important;
	min-height: 0 !important;
}

/* Flatpickr's anchor input is created by us as <input type="hidden"> so the
 * UA stylesheet hides it; but a theme that does `input { display: block }`
 * would force it back into the layout. Same for the rare .flatpickr-mobile
 * input (only used for native pickers in popover mode, but defensive). */
.wk-booking input.flatpickr-input,
.wk-booking input.flatpickr-mobile {
	display: none !important;
}

/* ---------- Flatpickr inline calendar overrides ---------- */

.wk-booking .flatpickr-calendar {
	box-shadow: none;
	background: transparent;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	padding: 0;
}

.wk-booking .flatpickr-calendar.inline {
	display: block;
	position: static;
}

/* ---------- Month-nav row ----------
 *
 * Defensive transparency: a host theme's input/nav/header styling tends to
 * bleed into the Flatpickr month strip and paint the prev/next bar grey.
 * !important here is intentional and tightly scoped — we are explicitly
 * overriding theme rules inside our own widget. Hover/focus colours below
 * deliberately re-apply the accent tint without !important so site-level
 * accent overrides via CSS variables still work.
 *
 * monthSelectorType: 'static' (set in booking.js) replaces the default
 * <select> with plain text. The year stays as <input type="number"> inside
 * .numInputWrapper; we clamp its styling so it visually matches the
 * adjacent .cur-month text. */
.wk-booking .flatpickr-months,
.wk-booking .flatpickr-month,
.wk-booking .flatpickr-current-month,
.wk-booking .flatpickr-current-month .numInputWrapper {
	background: transparent !important;
	background-color: transparent !important;
	border: 0;
	box-shadow: none;
}

.wk-booking .flatpickr-months {
	padding-bottom: 0.25rem;
	margin-bottom: 0.5rem;
}

.wk-booking .flatpickr-month {
	color: var(--wk-text);
	overflow: visible;
}

.wk-booking .flatpickr-current-month {
	font-size: 1rem;
	font-weight: 600;
	color: var(--wk-text);
	padding-top: 0.5rem;
	/* Defensive — if any ancestor adds an overflow: hidden / clip in the
	 * future, the year input must never be clipped. */
	overflow: visible !important;
}

.wk-booking .flatpickr-current-month .cur-month {
	font-family: inherit;
	font-weight: 600;
	font-size: 1rem;
	color: var(--wk-text);
	margin: 0 0.35em 0 0; /* breathing room between e.g. "Kesäkuu" and "2026" */
	/* Flatpickr's fi locale ships month names lowercase ("kesäkuu");
	 * capitalize for a cleaner heading look. fi/en both capitalize fine. */
	text-transform: capitalize;
}

.wk-booking .flatpickr-current-month .numInputWrapper {
	width: auto !important;
	/* 5ch (not 4ch) — `2026` is 4 digits but font kerning + sub-pixel
	 * rounding made the last digit clip on some viewports. The 0.5em
	 * inline padding gives a little extra breathing room. */
	min-width: 5ch;
	padding: 0 0.5em;
	display: inline-block;
	vertical-align: baseline;
}

.wk-booking .flatpickr-current-month .numInputWrapper span.arrowUp,
.wk-booking .flatpickr-current-month .numInputWrapper span.arrowDown {
	display: none; /* Hide the year-input spinner arrows; clean static look. */
}

/* Year-input element. The defaults pull a different font-family/size from
 * <input> theme styling and a fixed width that clips the 4th digit. Clamp
 * everything so it reads as plain text matching .cur-month. */
.wk-booking .flatpickr-current-month input.cur-year,
.wk-booking .flatpickr-current-month input.cur-year[disabled],
.wk-booking .flatpickr-current-month input.cur-year:focus {
	background: transparent !important;
	background-color: transparent !important;
	border: 0;
	color: var(--wk-text);
	font-family: inherit;
	font-weight: 600;
	font-size: 1rem;
	line-height: inherit;
	padding: 0;
	margin: 0;
	height: auto;
	width: auto !important;       /* themes often force width: 100% on inputs */
	min-width: 4ch !important;    /* keep room for all four digits of the year */
	box-shadow: none;
	-webkit-appearance: textfield;
	   -moz-appearance: textfield;
	        appearance: textfield;
	pointer-events: none; /* Year is informational; nav is via prev/next. */
}

.wk-booking .flatpickr-prev-month,
.wk-booking .flatpickr-next-month {
	background: transparent;
	background-color: transparent;
	border: 0;
	box-shadow: none;
	color: var(--wk-text);
	fill: currentColor;
	border-radius: var(--wk-radius);
	transition: background 120ms ease, color 120ms ease;
}

.wk-booking .flatpickr-prev-month svg,
.wk-booking .flatpickr-next-month svg {
	fill: currentColor;
}

.wk-booking .flatpickr-prev-month:hover,
.wk-booking .flatpickr-next-month:hover,
.wk-booking .flatpickr-prev-month:focus-visible,
.wk-booking .flatpickr-next-month:focus-visible {
	background: var(--wk-day-hover-bg);
	color: var(--wk-accent-strong);
	outline: none;
}

.wk-booking .flatpickr-weekdays {
	color: var(--wk-muted);
	background: transparent;
}

.wk-booking .flatpickr-weekday {
	color: var(--wk-muted);
	font-weight: 500;
	text-transform: lowercase;
	font-size: 0.8rem;
	background: transparent;
}

.wk-booking .flatpickr-days {
	width: 100%;
	/* Defeat Flatpickr's default `overflow: hidden`, which would clip
	 * the rightmost cell's border + its hover scale(1.04). */
	overflow: visible;
}

.wk-booking .flatpickr-innerContainer {
	overflow: visible;
}

.wk-booking .dayContainer {
	width: 100%;
	min-width: 0;
	max-width: none;
}

/* ---------- Day cells ---------- */

.wk-booking .flatpickr-day {
	height: 56px;
	max-width: none;
	flex-basis: calc(100% / 7);
	border-radius: var(--wk-radius);
	color: var(--wk-text);
	background: var(--wk-day-bg);
	margin: 1px 0;
	font-size: 1rem;
	font-weight: 500;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	border: 1px solid var(--wk-day-border);
	line-height: 1;
	transition:
		background 120ms ease,
		border-color 120ms ease,
		transform 120ms ease,
		box-shadow 120ms ease;
}

.wk-booking .flatpickr-day:hover,
.wk-booking .flatpickr-day:focus-visible {
	background: var(--wk-day-hover-bg);
	border-color: var(--wk-accent);
	transform: scale(1.04);
	z-index: 1;
	outline: none;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Hover/focus tints the price label dark-accent on a soft tint background.
 * Exclude .selected here — selected days have a solid green fill where dark
 * text is unreadable; the dedicated rule below handles them. */
.wk-booking .flatpickr-day:not(.flatpickr-disabled):not(.wk-booking__day--booked):not(.selected):hover .wk-booking__day-price,
.wk-booking .flatpickr-day:not(.flatpickr-disabled):not(.wk-booking__day--booked):not(.selected):focus-visible .wk-booking__day-price {
	color: var(--wk-accent-strong);
}

.wk-booking .flatpickr-day.selected,
.wk-booking .flatpickr-day.selected:hover,
.wk-booking .flatpickr-day.selected:focus-visible,
.wk-booking .flatpickr-day.startRange,
.wk-booking .flatpickr-day.startRange:hover,
.wk-booking .flatpickr-day.startRange:focus-visible,
.wk-booking .flatpickr-day.endRange,
.wk-booking .flatpickr-day.endRange:hover,
.wk-booking .flatpickr-day.endRange:focus-visible {
	background: var(--wk-accent);
	border-color: var(--wk-accent-strong);
	color: #fff;
	transform: none;
	box-shadow: none;
}

.wk-booking .flatpickr-day.selected .wk-booking__day-price,
.wk-booking .flatpickr-day.selected:hover .wk-booking__day-price,
.wk-booking .flatpickr-day.selected:focus-visible .wk-booking__day-price,
.wk-booking .flatpickr-day.startRange .wk-booking__day-price,
.wk-booking .flatpickr-day.endRange .wk-booking__day-price {
	color: #fff;
	font-weight: 500;
}

/* Days strictly inside a selected range get a softer accent fill so the
 * start/end caps still stand out as anchors. */
.wk-booking .flatpickr-day.inRange,
.wk-booking .flatpickr-day.inRange:hover,
.wk-booking .flatpickr-day.inRange:focus-visible {
	background: rgba(94, 125, 81, 0.18); /* legacy fallback */
	background: color-mix(in srgb, var(--wk-accent) 20%, transparent);
	border-color: transparent;
	color: var(--wk-text);
	transform: none;
	box-shadow: none;
}

.wk-booking .flatpickr-day.inRange .wk-booking__day-price {
	color: var(--wk-accent-strong);
}

.wk-booking .flatpickr-day.flatpickr-disabled,
.wk-booking .flatpickr-day.wk-booking__day--booked {
	background: var(--wk-day-booked-bg);
	color: var(--wk-day-booked-fg);
	cursor: not-allowed;
	text-decoration: line-through;
	border-color: transparent;
	box-shadow: none;
	transform: none;
}

.wk-booking .flatpickr-day.flatpickr-disabled:hover,
.wk-booking .flatpickr-day.flatpickr-disabled:focus-visible,
.wk-booking .flatpickr-day.wk-booking__day--booked:hover,
.wk-booking .flatpickr-day.wk-booking__day--booked:focus-visible {
	background: var(--wk-day-booked-bg);
	color: var(--wk-day-booked-fg);
	border-color: transparent;
	transform: none;
	box-shadow: none;
}

.wk-booking .flatpickr-day.wk-booking__day--booked .wk-booking__day-price {
	visibility: hidden;
}

.wk-booking .flatpickr-day.prevMonthDay,
.wk-booking .flatpickr-day.nextMonthDay {
	background: transparent;
	color: var(--wk-muted);
	text-decoration: none;
	border-color: transparent;
	box-shadow: none;
}

.wk-booking .flatpickr-day.prevMonthDay:hover,
.wk-booking .flatpickr-day.nextMonthDay:hover {
	background: transparent;
	transform: none;
	box-shadow: none;
	border-color: transparent;
}

.wk-booking__day-price {
	display: block;
	font-size: 0.7rem;
	line-height: 1;
	color: var(--wk-muted);
	font-weight: 400;
	white-space: nowrap;
	text-decoration: none;
}

@media (min-width: 768px) {
	.wk-booking .flatpickr-calendar {
		max-width: 100%;
	}
	.wk-booking .flatpickr-rContainer {
		width: 100%;
	}
}

/* ---------- Guest count selector ---------- */

.wk-booking__guests {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin: 1rem 0 0.5rem;
}

.wk-booking__guests[hidden] {
	display: none;
}

.wk-booking__guests-label {
	font-size: 1rem;
	font-weight: 600;
	color: var(--wk-text);
}

.wk-booking__guests-control {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

/* The .wk-booking ancestor + !important together defeat Elementor's
 * `.elementor-kit-NNNN button { background-color: ...; color: ...; }` rule
 * (and the same trap from Astra/Divi kits). Without these the buttons
 * render as bright orange/red Elementor primary buttons. */
.wk-booking .wk-booking__guests-btn {
	width: 2.25rem;
	height: 2.25rem;
	border-radius: var(--wk-radius-pill) !important;
	border: 1px solid var(--wk-day-border) !important;
	background: var(--wk-day-bg) !important;
	background-color: var(--wk-day-bg) !important;
	color: var(--wk-text) !important;
	font-family: inherit !important;
	font-size: 1.2rem;
	font-weight: 600 !important;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	transition:
		background 120ms ease,
		border-color 120ms ease,
		color 120ms ease,
		transform 120ms ease;
}

.wk-booking .wk-booking__guests-btn:hover:not(:disabled),
.wk-booking .wk-booking__guests-btn:focus-visible:not(:disabled) {
	background: var(--wk-day-hover-bg) !important;
	background-color: var(--wk-day-hover-bg) !important;
	border-color: var(--wk-accent) !important;
	color: var(--wk-accent-strong) !important;
	transform: scale(1.05);
	outline: none;
}

.wk-booking .wk-booking__guests-btn:disabled {
	opacity: 0.4 !important;
	cursor: not-allowed !important;
	transform: none !important;
}

.wk-booking .wk-booking__guests-btn:disabled:hover,
.wk-booking .wk-booking__guests-btn:disabled:focus-visible {
	background: var(--wk-day-bg) !important;
	background-color: var(--wk-day-bg) !important;
	border-color: var(--wk-day-border) !important;
	color: var(--wk-text) !important;
	transform: none !important;
}

.wk-booking__guests-value {
	min-width: 1.6em;
	text-align: center;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--wk-text);
	font-variant-numeric: tabular-nums;
}

/* ---------- Status messages around the calendar ---------- */

.wk-booking__pick-prompt,
.wk-booking__range-error {
	margin: 0.5rem 0 0;
	font-size: 0.95rem;
}

.wk-booking__pick-prompt {
	color: var(--wk-muted);
}

.wk-booking__range-error {
	color: #b32d2e;
	font-weight: 500;
}

.wk-booking__pick-prompt[hidden],
.wk-booking__range-error[hidden] {
	display: none;
}

/* ---------- Quote / price breakdown panel ---------- */

.wk-booking__quote {
	margin-top: 1.25rem;
	padding: 1rem 1.1rem;
	border: 1px solid var(--wk-day-border);
	border-radius: var(--wk-radius);
	background: var(--wk-day-bg);
}

.wk-booking__quote[hidden] {
	display: none;
}

.wk-booking__quote-status {
	margin: 0;
	color: var(--wk-muted);
	font-size: 0.95rem;
	font-style: italic;
}

.wk-booking__quote-status[hidden] {
	display: none;
}

.wk-booking__breakdown {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wk-booking__breakdown-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: 0.35rem 0;
	color: var(--wk-text);
	font-size: 0.95rem;
}

.wk-booking__breakdown-row + .wk-booking__breakdown-row {
	border-top: 1px dashed var(--wk-day-border);
}

.wk-booking__breakdown-label {
	color: var(--wk-text);
}

.wk-booking__breakdown-value {
	font-variant-numeric: tabular-nums;
	color: var(--wk-text);
	font-weight: 500;
	white-space: nowrap;
}

.wk-booking__total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	margin: 0.75rem 0 0;
	padding-top: 0.6rem;
	border-top: 2px solid var(--wk-accent-strong);
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--wk-text);
}

.wk-booking__total-label {
	font-weight: 700;
}

.wk-booking__total-value {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	white-space: nowrap;
}

/* ---------- Booking form (Session 5) ---------- */

.wk-booking__form {
	margin-top: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.wk-booking__form[hidden] {
	display: none;
}

.wk-booking__test-banner {
	margin: 0;
	padding: 0.6rem 0.85rem;
	border: 1px solid #f0c36d;
	background: #fff7e0;
	border-radius: var(--wk-radius);
	color: #6d4c00;
	font-size: 0.9rem;
}

.wk-booking__form-section {
	margin: 0;
	padding: 0.75rem 0 0;
	border: 0;
	border-top: 1px solid var(--wk-day-border);
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.wk-booking__form-section:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.wk-booking__form-section legend {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--wk-text);
	padding: 0;
	margin-bottom: 0.25rem;
}

.wk-booking__form-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
}

@media (min-width: 600px) {
	.wk-booking__form-row {
		grid-template-columns: 1fr 1fr;
	}
	.wk-booking__form-section .wk-booking__form-row:has(input[name="adults"]) {
		grid-template-columns: 1fr 1fr 1fr;
	}
}

.wk-booking__field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.wk-booking__field-label {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--wk-text);
}

.wk-booking__field-req {
	color: var(--wk-accent-strong);
	margin-left: 0.1em;
}

.wk-booking__field-hint {
	color: var(--wk-muted);
	font-weight: 400;
	margin-left: 0.4em;
	font-size: 0.85rem;
}

.wk-booking__field-error {
	color: #b32d2e;
	font-size: 0.85rem;
	min-height: 1em;
}

.wk-booking__field-error[hidden] {
	display: none;
}

/* The input/textarea reset uses !important to defeat Elementor's
 * `.elementor-kit-NNNN input { background-color: #EFEFEF; ... }` rule and
 * similar globals from other page-builder kits. Same pattern as the guest
 * +/- buttons, scoped to our widget. */
.wk-booking input[type="text"],
.wk-booking input[type="email"],
.wk-booking input[type="tel"],
.wk-booking input[type="number"],
.wk-booking textarea {
	background: #fff !important;
	background-color: #fff !important;
	color: var(--wk-text) !important;
	border: 1px solid var(--wk-day-border) !important;
	border-radius: var(--wk-radius) !important;
	padding: 0.6em 0.8em !important;
	font-family: inherit !important;
	font-size: 1rem !important;
	line-height: 1.4 !important;
	box-shadow: none !important;
	width: 100%;
	box-sizing: border-box;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}

.wk-booking input[type="text"]:focus,
.wk-booking input[type="email"]:focus,
.wk-booking input[type="tel"]:focus,
.wk-booking input[type="number"]:focus,
.wk-booking textarea:focus {
	border-color: var(--wk-accent) !important;
	outline: none !important;
	box-shadow: 0 0 0 3px var(--wk-day-hover-bg) !important;
}

.wk-booking textarea {
	resize: vertical;
	min-height: 4.5em;
}

.wk-booking__checkbox {
	display: flex;
	gap: 0.6em;
	align-items: flex-start;
	font-size: 0.95rem;
	line-height: 1.4;
	cursor: pointer;
}

.wk-booking__checkbox input[type="checkbox"] {
	width: 1.05em;
	height: 1.05em;
	margin-top: 0.2em;
	accent-color: var(--wk-accent);
	flex-shrink: 0;
}

.wk-booking__checkbox a {
	color: var(--wk-accent-strong);
	text-decoration: underline;
}

/* Honeypot — visually hidden but accessible to bots that fill any input. */
.wk-booking__hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.wk-booking__form-error {
	margin: 0;
	padding: 0.6rem 0.85rem;
	background: rgba(179, 45, 46, 0.08);
	color: #b32d2e;
	border: 1px solid rgba(179, 45, 46, 0.35);
	border-radius: var(--wk-radius);
	font-size: 0.95rem;
}

.wk-booking__form-error[hidden] {
	display: none;
}

/* Submit button: solid accent pill, defeats Elementor's primary-button
 * orange/red fill via the same !important scoping used on guest +/- buttons. */
.wk-booking .wk-booking__submit {
	align-self: flex-start;
	background: var(--wk-accent) !important;
	background-color: var(--wk-accent) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: var(--wk-radius-pill) !important;
	padding: 0.85em 2em !important;
	font-family: inherit !important;
	font-size: 1.05rem !important;
	font-weight: 600 !important;
	line-height: 1;
	cursor: pointer;
	box-shadow: none !important;
	text-shadow: none !important;
	transition: background 120ms ease, transform 120ms ease;
}

.wk-booking .wk-booking__submit:hover:not(:disabled),
.wk-booking .wk-booking__submit:focus-visible:not(:disabled) {
	background: var(--wk-accent-strong) !important;
	background-color: var(--wk-accent-strong) !important;
	transform: translateY(-1px) scale(1.01);
	outline: none;
}

.wk-booking .wk-booking__submit:disabled {
	opacity: 0.45 !important;
	cursor: not-allowed !important;
	transform: none !important;
}

/* ---------- Thank-you confirmation block ---------- */

.wk-booking-thanks {
	max-width: 540px;
	margin: 1.5rem 0;
	padding: 1.25rem 1.4rem;
	border: 1px solid var(--wk-day-border, #e7e4dc);
	border-radius: 10px;
	background: #fff;
	color: #232323;
	font-family: inherit;
}

.wk-booking-thanks--empty {
	border-style: dashed;
	color: #8a8a8a;
}

.wk-booking-thanks__title {
	margin: 0 0 0.4rem;
	font-size: 1.4rem;
	font-weight: 700;
}

.wk-booking-thanks__intro {
	margin: 0 0 0.85rem;
	color: #666;
}

.wk-booking-thanks__details {
	display: grid;
	grid-template-columns: max-content 1fr;
	column-gap: 1rem;
	row-gap: 0.35rem;
	margin: 0;
}

.wk-booking-thanks__details dt {
	font-weight: 600;
	color: #232323;
}

.wk-booking-thanks__details dd {
	margin: 0;
	font-variant-numeric: tabular-nums;
}

.wk-booking-thanks__test-notice {
	margin: 0 0 1rem;
	padding: 0.6rem 0.85rem;
	border: 1px solid #f0c36d;
	background: #fff7e0;
	border-radius: 8px;
	color: #6d4c00;
	font-size: 0.95rem;
	font-weight: 600;
}

.wk-booking-thanks--unavailable {
	border-color: #f0c36d;
	background: #fffbe6;
}

/* =============================================================
 * Session 7 — compact card + modal calendar + guests dropdown
 * (Airbnb-pattern UI). The legacy inline-calendar / from-line /
 * guest-pill rules above are now dead (no markup uses them) but
 * left in place to avoid edit churn; they don't render anything.
 * ============================================================= */

/* ---------- Body scroll lock when the modal is open ---------- */

html.wk-booking--no-scroll {
	overflow: hidden !important;
}

/* iOS Safari ignores `overflow: hidden` on <body> for touch scrolling.
 * Pinning the body to position: fixed and offsetting it by the saved
 * scroll-Y is the standard workaround. The JS reads window.scrollY at
 * modal open, sets --wk-scroll-y on <html>, then on close removes the
 * class and calls window.scrollTo() to put the page back where it was. */
body.wk-booking--no-scroll {
	position: fixed;
	top: calc(-1 * var(--wk-scroll-y, 0px));
	left: 0;
	right: 0;
	width: 100%;
	overflow: hidden !important;
}

/* ---------- Compact card ---------- */

.wk-booking__card {
	max-width: 420px;
	margin: 1rem 0;
	padding: 1.25rem 1.4rem;
	border: 1px solid var(--wk-day-border);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
	box-sizing: border-box;
}

/* Small heading at the top of the card. Inherits font-family from the
 * page so it picks up Wanha Koulu's typeface naturally — no Elementor
 * defenders needed because no page-builder theme styles plain <h3>
 * elements as buttons. */
.wk-booking__card-heading {
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0 0 0.5rem 0;
	color: var(--wk-text);
	line-height: 1.3;
}

.wk-booking__price-headline {
	margin: 0 0 1rem;
	font-size: 1rem;
	color: var(--wk-text);
	line-height: 1.3;
}

.wk-booking__price-headline strong {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--wk-text);
}

.wk-booking__price-headline-skel {
	display: inline-block;
	width: 9em;
	height: 1.2em;
	background: var(--wk-skeleton-bg);
	border-radius: var(--wk-radius-pill);
	animation: wk-booking-pulse 1.6s ease-in-out infinite;
	vertical-align: middle;
}

.wk-booking__card[data-wk-state="ready"] .wk-booking__price-headline-skel,
.wk-booking__card[data-wk-state="error"] .wk-booking__price-headline-skel {
	display: none;
}

/* ---------- 2x2 fields grid (CHECK-IN | CHECK-OUT / GUESTS) ---------- */

.wk-booking__fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	border: 1px solid var(--wk-day-border);
	border-radius: 12px;
	margin: 0 0 1rem;
	/* Note: overflow: visible (default) — required so the GUESTS dropdown
	 * (positioned absolute below the wrapper) is not clipped. The corner
	 * rounding still reads cleanly because each outer button gets matching
	 * border-radius below. */
}

.wk-booking__fields > .wk-booking__field-trigger:first-child {
	border-top-left-radius: 12px !important;
}

.wk-booking__fields > .wk-booking__field-trigger:nth-of-type(2) {
	border-top-right-radius: 12px !important;
}

.wk-booking .wk-booking__field-trigger-wrapper > .wk-booking__field-trigger {
	border-bottom-left-radius: 12px !important;
	border-bottom-right-radius: 12px !important;
}

.wk-booking .wk-booking__field-trigger {
	background: #fff !important;
	background-color: #fff !important;
	color: var(--wk-text) !important;
	border: 0 !important;
	border-radius: 0 !important;
	padding: 0.7rem 0.95rem !important;
	font-family: inherit !important;
	font-size: 0.95rem !important;
	font-weight: 500 !important;
	text-align: left !important;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.15rem;
	line-height: 1.2;
	box-shadow: none !important;
	text-shadow: none !important;
	width: 100%;
	box-sizing: border-box;
	min-height: 56px;
	transition: background 120ms ease;
}

/* Vertical seam between CHECK-IN and CHECK-OUT */
.wk-booking__fields > .wk-booking__field-trigger:nth-of-type(2) {
	border-left: 1px solid var(--wk-day-border) !important;
}

.wk-booking .wk-booking__field-trigger:hover,
.wk-booking .wk-booking__field-trigger:focus-visible {
	background: var(--wk-day-hover-bg) !important;
	background-color: var(--wk-day-hover-bg) !important;
	outline: none;
}

.wk-booking__field-eyebrow {
	font-size: 0.7rem;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wk-text);
}

.wk-booking__field-value {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--wk-muted);
}

.wk-booking__field-trigger-wrapper {
	grid-column: 1 / -1;
	border-top: 1px solid var(--wk-day-border);
	position: relative;
}

.wk-booking .wk-booking__field-trigger--full {
	flex-direction: row !important;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.wk-booking .wk-booking__field-trigger--full .wk-booking__field-eyebrow {
	flex-shrink: 0;
}

.wk-booking .wk-booking__field-trigger--full .wk-booking__field-value {
	flex: 1;
	text-align: left;
}

.wk-booking__field-caret {
	color: var(--wk-muted);
	font-size: 0.85rem;
}

/* ---------- Reserve button + disclaimer ---------- */

.wk-booking .wk-booking__reserve {
	display: block;
	width: 100%;
	padding: 0.95em 1.5em !important;
	background: var(--wk-accent) !important;
	background-color: var(--wk-accent) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: var(--wk-radius-pill) !important;
	font-family: inherit !important;
	font-size: 1.05rem !important;
	font-weight: 700 !important;
	line-height: 1;
	text-align: center;
	cursor: pointer;
	box-shadow: none !important;
	text-shadow: none !important;
	transition: background 120ms ease, transform 120ms ease;
}

.wk-booking .wk-booking__reserve:hover:not(:disabled),
.wk-booking .wk-booking__reserve:focus-visible:not(:disabled) {
	background: var(--wk-accent-strong) !important;
	background-color: var(--wk-accent-strong) !important;
	transform: translateY(-1px);
	outline: none;
}

.wk-booking .wk-booking__reserve:disabled {
	opacity: 0.45 !important;
	cursor: not-allowed !important;
	transform: none !important;
}

.wk-booking__no-charge {
	margin: 0.7rem 0 0;
	text-align: center;
	color: var(--wk-muted);
	font-size: 0.85rem;
	font-style: italic;
}

/* ---------- Calendar modal ---------- */

.wk-booking__modal {
	position: fixed;
	inset: 0;
	/* Maximum 32-bit integer, plus !important — beats Elementor's stacking
	 * contexts and any theme that pushes a sticky header / overlay above us. */
	z-index: 2147483647 !important;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Keep the modal in the layout flow even when "hidden". Flatpickr is
 * mounted inside the modal during initial AJAX (long before the user
 * clicks CHECK-IN). With the UA's `[hidden] { display: none }` rule,
 * Flatpickr's `build()` measured a 0-width container and cached that —
 * the result was day cells at flex-basis: calc(100% / 7) = 0px wrapping
 * one-per-row, and both .flatpickr-current-month panes overlapping at
 * left: 0 in the header. visibility: hidden + opacity: 0 keep the modal
 * visually invisible AND remove it from the accessibility tree, while
 * pointer-events: none stops it from intercepting clicks beneath it.
 * Author specificity (`.wk-booking__modal[hidden]` = 0,2,0) beats the
 * UA's `[hidden]` (0,1,0), so no !important is required. */
.wk-booking__modal[hidden] {
	display: flex;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

.wk-booking__modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	cursor: pointer;
}

.wk-booking__modal-dialog {
	position: relative;
	background: #fff;
	border-radius: 14px;
	width: 100%;
	max-width: 870px;
	/* Dynamic viewport unit handles iOS Safari's toolbar resizing. The vh
	 * declaration is the fallback for older browsers; modern ones parse the
	 * dvh rule that follows and use it instead. Order matters: feature with
	 * fallback FIRST, modern unit SECOND, so unsupporting browsers discard
	 * the unknown declaration and keep the vh value. */
	max-height: 100vh;
	max-height: 100dvh;
	/* No overflow on the dialog itself — only the .wk-booking__modal-body
	 * scrolls, so the header (chips) and footer (Clear / Close) stay
	 * pinned and reachable on tall content. */
	padding: 1.4rem 1.6rem;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
	margin: 1rem;
	box-sizing: border-box;
}

.wk-booking__modal-header {
	flex: 0 0 auto;
	margin-bottom: 1rem;
}

.wk-booking__modal-title {
	margin: 0 0 0.25rem;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--wk-text);
	line-height: 1.2;
}

.wk-booking__modal-subtitle {
	margin: 0 0 0.85rem;
	color: var(--wk-muted);
	font-size: 0.95rem;
}

.wk-booking__modal-subtitle:empty {
	display: none;
}

.wk-booking__chips {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	border: 1px solid var(--wk-day-border);
	border-radius: 10px;
	overflow: hidden;
}

.wk-booking__chip {
	position: relative;
	padding: 0.6rem 2rem 0.6rem 0.85rem;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	background: #fff;
	min-height: 54px;
}

.wk-booking__chip + .wk-booking__chip {
	border-left: 1px solid var(--wk-day-border);
}

.wk-booking__chip-eyebrow {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wk-text);
}

.wk-booking__chip-value {
	font-size: 0.95rem;
	color: var(--wk-text);
}

.wk-booking .wk-booking__chip-clear {
	position: absolute !important;
	top: 50%;
	right: 0.5rem;
	transform: translateY(-50%);
	width: 1.6rem;
	height: 1.6rem;
	background: transparent !important;
	background-color: transparent !important;
	border: 0 !important;
	border-radius: 50% !important;
	color: var(--wk-muted) !important;
	font-family: inherit !important;
	font-size: 1.2rem !important;
	font-weight: 600 !important;
	line-height: 1;
	cursor: pointer;
	padding: 0 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wk-booking .wk-booking__chip-clear[hidden] {
	display: none;
}

.wk-booking .wk-booking__chip-clear:hover,
.wk-booking .wk-booking__chip-clear:focus-visible {
	background: var(--wk-day-hover-bg) !important;
	background-color: var(--wk-day-hover-bg) !important;
	color: var(--wk-accent-strong) !important;
	outline: none;
}

.wk-booking__modal-body {
	flex: 1 1 auto;
	margin: 1rem 0;
	min-height: 0;            /* required so this flex child can shrink below its content */
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.wk-booking__modal-footer {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wk-day-border);
}

.wk-booking .wk-booking__modal-clear {
	background: transparent !important;
	background-color: transparent !important;
	color: var(--wk-text) !important;
	border: 0 !important;
	padding: 0.5rem 0 !important;
	font-family: inherit !important;
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	text-decoration: underline;
	cursor: pointer;
	box-shadow: none !important;
	text-shadow: none !important;
}

.wk-booking .wk-booking__modal-clear:hover,
.wk-booking .wk-booking__modal-clear:focus-visible {
	color: var(--wk-accent-strong) !important;
	outline: none;
}

.wk-booking .wk-booking__modal-close {
	background: #232323 !important;
	background-color: #232323 !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 8px !important;
	padding: 0.7rem 1.4rem !important;
	font-family: inherit !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	cursor: pointer;
	box-shadow: none !important;
	text-shadow: none !important;
	transition: background 120ms ease;
}

.wk-booking .wk-booking__modal-close:hover,
.wk-booking .wk-booking__modal-close:focus-visible {
	background: #000 !important;
	background-color: #000 !important;
	outline: none;
}

/* Mobile: full-screen modal, no backdrop tint, simpler corners */
@media (max-width: 767px) {
	.wk-booking__modal-dialog {
		max-width: 100%;
		/* Same dvh-with-vh-fallback cascade as the base rule; on iOS Safari
		 * 100vh leaves a gap below when the toolbar is showing, dvh tracks
		 * the actual visible viewport. */
		max-height: 100vh;
		max-height: 100dvh;
		height: 100vh;
		height: 100dvh;
		border-radius: 0;
		margin: 0;
		padding: 1rem;
	}
	.wk-booking__modal-backdrop {
		background: #fff;
	}
	.wk-booking__modal-title {
		font-size: 1.25rem;
	}
}

/* ---------- Guests dropdown ---------- */

.wk-booking__dropdown {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	/* Lower than the modal but high enough to clear theme/Elementor
	 * stacking contexts that the page may inject around the booking card. */
	z-index: 1000000 !important;
	background: #fff;
	border: 1px solid var(--wk-day-border);
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
	padding: 0.85rem 1.1rem 1rem;
	box-sizing: border-box;
}

.wk-booking__dropdown[hidden] {
	display: none;
}

.wk-booking__dropdown-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 0.7rem 0;
	border-bottom: 1px solid var(--wk-day-border);
}

.wk-booking__dropdown-row:last-of-type {
	border-bottom: 0;
	padding-bottom: 0.5rem;
}

.wk-booking__dropdown-label {
	font-size: 1rem;
	font-weight: 500;
	color: var(--wk-text);
}

.wk-booking__count-control {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

/* The +/- buttons inside the dropdown — defeat Elementor primary-button
 * styling with the same !important pattern used elsewhere on the widget. */
.wk-booking .wk-booking__count-btn {
	width: 2.1rem;
	height: 2.1rem;
	border-radius: var(--wk-radius-pill) !important;
	border: 1px solid var(--wk-day-border) !important;
	background: #fff !important;
	background-color: #fff !important;
	color: var(--wk-text) !important;
	font-family: inherit !important;
	font-size: 1.1rem !important;
	font-weight: 700 !important;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.wk-booking .wk-booking__count-btn:hover:not(:disabled),
.wk-booking .wk-booking__count-btn:focus-visible:not(:disabled) {
	background: var(--wk-day-hover-bg) !important;
	background-color: var(--wk-day-hover-bg) !important;
	border-color: var(--wk-accent) !important;
	color: var(--wk-accent-strong) !important;
	transform: scale(1.05);
	outline: none;
}

.wk-booking .wk-booking__count-btn:disabled {
	opacity: 0.4 !important;
	cursor: not-allowed !important;
	transform: none !important;
}

.wk-booking__count-value {
	min-width: 1.6em;
	text-align: center;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--wk-text);
	font-variant-numeric: tabular-nums;
}

.wk-booking .wk-booking__dropdown-close {
	margin-top: 0.5rem;
	background: transparent !important;
	background-color: transparent !important;
	color: var(--wk-text) !important;
	border: 0 !important;
	padding: 0.4rem 0 !important;
	font-family: inherit !important;
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	text-decoration: underline;
	cursor: pointer;
	box-shadow: none !important;
	text-shadow: none !important;
}

.wk-booking .wk-booking__dropdown-close:hover,
.wk-booking .wk-booking__dropdown-close:focus-visible {
	color: var(--wk-accent-strong) !important;
	outline: none;
}

/* ---------- Session 7 polish: month gap + always-visible nav chevrons ---------- */

/* Desktop only — give the two months breathing room. Flatpickr renders
 * multi-month as three paired-sibling rows: the month-name bar
 * (.flatpickr-month × 2), the weekday strip (.flatpickr-weekdaycontainer
 * × 2), and the days grid (.dayContainer × 2). All three need the same
 * gap so the layout stays vertically aligned. Mobile keeps showMonths: 1
 * so the gap rules don't fire there. */
@media (min-width: 768px) {
	.wk-booking .flatpickr-months .flatpickr-month + .flatpickr-month,
	.wk-booking .flatpickr-weekdays .flatpickr-weekdaycontainer + .flatpickr-weekdaycontainer,
	.wk-booking .flatpickr-days .dayContainer + .dayContainer {
		margin-left: 4rem;
	}
}

/* Keep both prev and next chevrons visible at all times. Flatpickr's
 * default CSS hides them with `.flatpickr-disabled { display: none }`
 * (and the older `.disabled` class) when the current view is at the
 * minDate / maxDate boundary. We open the calendar with minDate=today so
 * the prev arrow is "disabled" at first paint and disappears entirely.
 * Override to render it muted-but-visible — matches Airbnb's pattern
 * where both chevrons are always at the corners of the calendar. */
.wk-booking .flatpickr-prev-month.flatpickr-disabled,
.wk-booking .flatpickr-prev-month.disabled,
.wk-booking .flatpickr-next-month.flatpickr-disabled,
.wk-booking .flatpickr-next-month.disabled {
	display: block !important;
	visibility: visible !important;
	opacity: 0.3;
	cursor: not-allowed;
	pointer-events: none;
}

/* ---------- Read-only guest summary row in the booking form ---------- */

/* Replaces the old editable adults/children/infants triplet. The card's
 * GUESTS dropdown is the single source of truth for these counts; the
 * form just shows what was selected and offers a "Muokkaa" / "Change"
 * link that scrolls back to the card and re-opens the dropdown. */
.wk-booking__form-row--guests {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 1rem;
	background: var(--wk-day-bg);
	border: 1px solid var(--wk-day-border);
	border-radius: 0.5rem;
	gap: 1rem;
	box-sizing: border-box;
}

.wk-booking__guests-summary {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

.wk-booking__guests-summary-label {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--wk-text);
}

.wk-booking__guests-summary-value {
	font-size: 1rem;
	color: var(--wk-text);
}

/* Plain text-link button. Elementor-defying !important on the
 * properties Elementor's primary-button kit sets (background / border /
 * padding / shadow); font-family inherits naturally. */
.wk-booking .wk-booking__guests-change {
	background: transparent !important;
	background-color: transparent !important;
	color: var(--wk-accent) !important;
	border: 0 !important;
	padding: 0.5rem !important;
	font-weight: 600 !important;
	text-decoration: underline;
	cursor: pointer;
	font-family: inherit !important;
	font-size: 0.95rem;
	box-shadow: none !important;
	text-shadow: none !important;
	flex-shrink: 0;
}

.wk-booking .wk-booking__guests-change:hover,
.wk-booking .wk-booking__guests-change:focus-visible {
	color: var(--wk-accent-strong) !important;
	text-decoration: none;
	outline: none;
}
