/* booking-modal.css — task_0019
 * Fullscreen booking modal. Native <dialog> + minimal CSS.
 * iframe is lazy-loaded by JS on first open. Tokens-only.
 */

.booking-modal {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: 100vw;
	max-height: 100vh;
	max-height: 100dvh;
	overflow: hidden;
	color: var(--c-dark);
}

/* Native backdrop */
.booking-modal::backdrop {
	background: rgba(35, 31, 32, .82);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.booking-modal__inner {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	background: var(--c-white);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.booking-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	background: var(--c-dark);
	color: var(--c-white);
	flex-shrink: 0;
	border-bottom: 3px solid var(--c-orange-brand);
}

.booking-modal__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 800;
	letter-spacing: .02em;
	text-transform: uppercase;
}

.booking-modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .1);
	color: var(--c-white);
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
	flex-shrink: 0;
}

.booking-modal__close:hover {
	background: var(--c-orange-brand);
	color: var(--c-dark);
	transform: rotate(90deg);
}

.booking-modal__close:focus-visible {
	outline: 2px solid var(--c-orange-brand);
	outline-offset: 2px;
}

.booking-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	background: var(--c-white);
	position: relative;
}

.booking-modal__body > iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Loading state — shown until iframe load fires */
.booking-modal__loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 1rem;
	color: var(--c-dark);
	font-size: .9375rem;
	pointer-events: none;
	transition: opacity .25s ease;
	opacity: 1;
}

.booking-modal.is-loaded .booking-modal__loading {
	opacity: 0;
}

.booking-modal__spinner {
	width: 32px;
	height: 32px;
	border: 3px solid rgba(35, 31, 32, .12);
	border-top-color: var(--c-orange-brand);
	border-radius: 50%;
	animation: booking-modal-spin 700ms linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.booking-modal__close { transition: none; }
	.booking-modal__close:hover { transform: none; }
	.booking-modal__spinner { animation: none; }
}

/* Tablet+: rounded corners + max-size card */
@media (min-width: 768px) {
	.booking-modal {
		width: min(96vw, 1100px);
		height: min(94vh, 900px);
		height: min(94dvh, 900px);
		max-width: 1100px;
		max-height: 900px;
		margin: auto;
		border-radius: 12px;
	}
	.booking-modal__inner {
		border-radius: 12px;
	}
	.booking-modal__header {
		border-radius: 12px 12px 0 0;
	}
}

/* Body scroll lock when modal open */
html:has(.booking-modal[open]) {
	overflow: hidden;
}
