/**
 * Booking button, floating placement and modal dialog.
 *
 * Loaded on top of booking.css, which already owns the form itself and the
 * --rsv-accent custom property.
 */

/* ------------------------------------------------------------------ */
/* Button                                                              */
/* ------------------------------------------------------------------ */

.rsv-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border: 0;
	border-radius: 999px;
	background: var(--rsv-accent, #2f6f4f);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s ease, transform .15s ease;
}

.rsv-cta:hover,
.rsv-cta:focus-visible {
	filter: brightness(1.08);
	color: #fff;
}

.rsv-cta:focus-visible {
	outline: 3px solid var(--rsv-accent, #2f6f4f);
	outline-offset: 3px;
}

.rsv-cta:active {
	transform: translateY(1px);
}

/* ------------------------------------------------------------------ */
/* Floating placement                                                  */
/* ------------------------------------------------------------------ */

.rsv-float {
	position: fixed;
	z-index: 99990;
}

.rsv-float--bottom-right { right: 20px; bottom: 20px; }
.rsv-float--bottom-left  { left: 20px;  bottom: 20px; }
.rsv-float--top-right    { right: 20px; top: 20px; }
.rsv-float--top-left     { left: 20px;  top: 20px; }

.rsv-cta--float {
	box-shadow: 0 6px 20px rgba(15, 23, 42, .28);
}

/* ------------------------------------------------------------------ */
/* Modal                                                               */
/* ------------------------------------------------------------------ */

.rsv-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 16px;
	overflow-y: auto;
}

/* Beats the bare .rsv-modal display:flex on specificity, so no !important. */
.rsv-modal[hidden] {
	display: none;
}

.rsv-modal-veil {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .55);
}

.rsv-modal-panel {
	position: relative;
	width: 100%;
	max-width: 560px;
	margin: auto;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(15, 23, 42, .35);
	animation: rsv-modal-in .18s ease-out;
}

.rsv-modal-x {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 1;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(15, 23, 42, .06);
	color: #334155;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.rsv-modal-x:hover {
	background: rgba(15, 23, 42, .12);
}

.rsv-modal-x:focus-visible {
	outline: 3px solid var(--rsv-accent, #2f6f4f);
	outline-offset: 2px;
}

/* The card already has its own frame; inside the dialog it would be doubled. */
.rsv-modal-panel .rsv-widget {
	margin: 0;
}

.rsv-modal-panel .rsv-card {
	border: 0;
	box-shadow: none;
}

/* Stops the page behind the dialog from scrolling with it. */
.rsv-modal-open {
	overflow: hidden;
}

@keyframes rsv-modal-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.rsv-cta,
	.rsv-modal-panel {
		transition: none;
		animation: none;
	}
}
