/*
 * Aspit booking modal. Loaded only with a booking button on the page
 * (inc/booking-modal.php). Theme tokens with neutral fallbacks so the
 * modal works under any theme.
 */

.lbhelse-booking-modal {
	box-sizing: border-box;
	width: 100vw;
	max-width: 100vw;
	height: 100dvh;
	max-height: 100dvh;
	margin: 0;
	padding: 3.5rem 1rem 1rem;
	border: 0;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--contrast, #1a1a1a);
}

.lbhelse-booking-modal::backdrop {
	background: rgb(0 0 0 / 0.5);
}

.lbhelse-booking-modal__frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	opacity: 0;
}

.lbhelse-booking-modal.is-loaded .lbhelse-booking-modal__frame {
	opacity: 1;
}

.lbhelse-booking-modal__close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.lbhelse-booking-modal__close:hover {
	background: color-mix(in srgb, currentColor 8%, transparent);
}

.lbhelse-booking-modal__close:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary, currentColor);
	outline-offset: 2px;
}

.lbhelse-booking-modal__spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 3rem;
	height: 3rem;
	margin: -1.5rem 0 0 -1.5rem;
	border: 4px solid color-mix(in srgb, currentColor 20%, transparent);
	border-top-color: var(--wp--preset--color--primary, currentColor);
	border-radius: 50%;
	animation: lbhelse-booking-spin 1s linear infinite;
}

.lbhelse-booking-modal.is-loaded .lbhelse-booking-modal__spinner {
	display: none;
}

@keyframes lbhelse-booking-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.lbhelse-booking-modal__spinner {
		animation-duration: 3s;
	}
}
