/*
 * Vandamme Web Réservation – Restaurant: booking button and window.
 *
 * Colours, radius and fonts come from the same CSS variables as the form (--vwrr-primary,
 * --vwrr-on-primary, --vwrr-bg, --vwrr-text, --vwrr-border, --vwrr-radius, --vwrr-font,
 * --vwrr-font-heading), set inline on the button and on the window by PHP. The only literal colour
 * is the dimmed page behind the window: ::backdrop does not reliably inherit custom properties.
 * Selectors double their class so a theme's `a` or `button` rules do not leak in, without !important.
 */

@font-face {
	font-family: "Nunito";
	font-style: normal;
	font-weight: 600 800;
	font-display: swap;
	src: url("../fonts/nunito-normal-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Nunito";
	font-style: normal;
	font-weight: 600 800;
	font-display: swap;
	src: url("../fonts/nunito-normal-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Source Sans 3";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/source-sans-3-italic-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Source Sans 3";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/source-sans-3-italic-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Source Sans 3";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/source-sans-3-normal-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Source Sans 3";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/source-sans-3-normal-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.vwrr-open.vwrr-widget {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 48px;
	padding: 0 24px;
	border: 0;
	border-radius: var(--vwrr-radius);
	background: var(--vwrr-primary);
	color: var(--vwrr-on-primary);
	font-family: var(--vwrr-font);
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.vwrr-open.vwrr-widget:hover {
	color: var(--vwrr-on-primary);
	text-decoration: none;
	filter: brightness(0.93);
}

.vwrr-open.vwrr-widget:focus-visible {
	outline: 3px solid var(--vwrr-text);
	outline-offset: 3px;
	color: var(--vwrr-on-primary);
}

.vwrr-open.vwrr-widget.vwrr-open--floating {
	position: fixed;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 9990;
	box-shadow: 0 6px 20px color-mix(in srgb, var(--vwrr-text) 28%, transparent);
}

.vwrr-open.vwrr-widget.vwrr-open--right {
	right: calc(16px + env(safe-area-inset-right, 0px));
}

.vwrr-open.vwrr-widget.vwrr-open--left {
	left: calc(16px + env(safe-area-inset-left, 0px));
}

/* The window. */

.vwrr-modal {
	box-sizing: border-box;
	width: min(760px, calc(100vw - 24px));
	max-width: none;
	max-height: min(92vh, 900px);
	max-height: min(92dvh, 900px);
	margin: auto;
	padding: 0;
	border: 1px solid var(--vwrr-border);
	border-radius: 16px;
	background: var(--vwrr-bg);
	color: var(--vwrr-text);
	font-family: var(--vwrr-font);
	overflow: hidden;
}

.vwrr-modal[open] {
	display: flex;
	flex-direction: column;
}

.vwrr-modal::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

.vwrr-modal *,
.vwrr-modal *::before,
.vwrr-modal *::after {
	box-sizing: border-box;
}

.vwrr-modal__bar {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 8px 8px 20px;
	border-bottom: 1px solid var(--vwrr-border);
}

.vwrr-modal .vwrr-modal__title {
	margin: 0;
	padding: 0;
	color: var(--vwrr-text);
	font-family: var(--vwrr-font-heading, var(--vwrr-font));
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
}

.vwrr-modal .vwrr-modal__close {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--vwrr-radius);
	background: transparent;
	color: var(--vwrr-text);
	font-family: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.vwrr-modal .vwrr-modal__close:hover {
	background: color-mix(in srgb, var(--vwrr-muted) 12%, transparent);
}

.vwrr-modal .vwrr-modal__close:focus-visible {
	outline: 3px solid var(--vwrr-primary);
	outline-offset: -3px;
}

.vwrr-modal__body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.vwrr-modal .vwrr-form.vwrr-form.vwrr-form .vwrr-card {
	border: 0;
	border-radius: 0;
}

.vwrr-modal__wait {
	margin: 0;
	padding: 32px 20px;
	color: var(--vwrr-muted);
	text-align: center;
}

body.vwrr-modal-open {
	overflow: hidden;
}

@media (max-width: 640px) {
	.vwrr-modal {
		width: 100vw;
		height: 100vh;
		height: 100dvh;
		max-height: none;
		border: 0;
		border-radius: 0;
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.vwrr-modal[open] {
		animation: vwrr-modal-in 0.18s ease-out;
	}

	@keyframes vwrr-modal-in {
		from {
			opacity: 0;
			transform: translateY(8px);
		}

		to {
			opacity: 1;
			transform: none;
		}
	}
}

@media print {
	.vwrr-open.vwrr-widget.vwrr-open--floating {
		display: none;
	}
}
