/* ==========================================================================
   modal.css — Booking request modal (native <dialog>)
   Glassmorphism dark card with booking form.
   ========================================================================== */

/* ── Backdrop ─────────────────────────────────────────────────────────── */
.booking-modal::backdrop {
	background: rgba(15, 18, 22, 0.75);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

/* ── Dialog reset & card ──────────────────────────────────────────────── */
.booking-modal {
	position: fixed;
	max-width: 620px;
	width: calc(100% - 2rem);
	max-height: 92vh;
	margin: auto;
	padding: 0;
	border: 1px solid var(--border-dark-top);
	border-radius: var(--radius-card);
	background: var(--wp--preset--color--dark-surface, #151A20);
	color: var(--wp--preset--color--surface, #fff);
	box-shadow:
		0 25px 60px rgba(0, 0, 0, 0.5),
		0 0 40px var(--accent-05);
	overflow: hidden;
	opacity: 0;
	transform: scale(0.96) translateY(8px);
	transition:
		opacity 0.25s ease-out,
		transform 0.25s ease-out;
}

.booking-modal[open] {
	opacity: 1;
	transform: scale(1) translateY(0);
}

/* Grain overlay */
.booking-modal::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--grain-svg);
	opacity: 0.03;
	pointer-events: none;
	z-index: 0;
	border-radius: inherit;
}

/* ── Inner wrapper ────────────────────────────────────────────────────── */
.booking-modal__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	max-height: 90vh;
	overflow-y: auto;
}

/* ── Close button ─────────────────────────────────────────────────────── */
.booking-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--border-dark);
	border-radius: 50%;
	background: var(--glass-dark);
	color: var(--wp--preset--color--dark-muted, #8A9A9A);
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.booking-modal__close:hover,
.booking-modal__close:focus-visible {
	color: var(--wp--preset--color--accent, #1AFFA3);
	border-color: var(--accent-25);
	background: var(--accent-08);
}

.booking-modal__close:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent, #1AFFA3);
	outline-offset: 2px;
}

/* ── Header ───────────────────────────────────────────────────────────── */
.booking-modal__header {
	padding: 2rem 2rem 1.25rem;
	text-align: center;
	position: relative;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Subtle accent glow at the top of the header */
.booking-modal__header::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 60%;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent,
		var(--wp--preset--color--accent, #1AFFA3) 40%,
		var(--wp--preset--color--accent, #1AFFA3) 60%,
		transparent
	);
	opacity: 0.6;
}

/* Badge above the title */
.booking-modal__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.25rem 0.75rem;
	border: 1px solid rgba(26, 255, 163, 0.25);
	border-radius: 999px;
	background: rgba(26, 255, 163, 0.06);
	color: var(--wp--preset--color--accent, #1AFFA3);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 0.75rem;
}

.booking-modal__title {
	margin: 0 0 0.35rem;
	font-family: var(--wp--preset--font-family--heading, 'Space Grotesk', sans-serif);
	font-size: clamp(1.3rem, 2.5vw, 1.6rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--surface, #fff);
}

.booking-modal__subtitle {
	margin: 0;
	font-size: 0.875rem;
	color: var(--wp--preset--color--dark-muted, #8A9A9A);
	line-height: 1.5;
}

/* ── Form wrap ────────────────────────────────────────────────────────── */
.booking-modal__form-wrap {
	padding: 1.25rem 2rem 1.75rem;
}

/* ── Form grid ────────────────────────────────────────────────────────── */
.booking-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.booking-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

/* ── Labels ───────────────────────────────────────────────────────────── */
.booking-form__field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.booking-form__label {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--wp--preset--color--dark-muted, #8A9A9A);
	letter-spacing: 0.02em;
}

.booking-form__label--required::after {
	content: " *";
	color: var(--wp--preset--color--accent, #1AFFA3);
}

/* ── Inputs ───────────────────────────────────────────────────────────── */
.booking-form__input,
.booking-form__select,
.booking-form__textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.85rem;
	border: 1px solid var(--border-dark);
	border-radius: var(--radius-sm);
	background: rgba(255, 255, 255, 0.04);
	color: var(--wp--preset--color--surface, #fff);
	font-family: inherit;
	font-size: 0.9rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.booking-form__input::placeholder,
.booking-form__textarea::placeholder {
	color: rgba(138, 154, 154, 0.5);
}

.booking-form__input:focus,
.booking-form__select:focus,
.booking-form__textarea:focus {
	outline: none;
	border-color: var(--accent-30);
	box-shadow: 0 0 0 3px var(--accent-08);
}

.booking-form__select {
	padding-right: 2rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%238A9A9A' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	cursor: pointer;
}

.booking-form__select option {
	background: #151A20;
	color: #fff;
}

.booking-form__textarea {
	resize: vertical;
	min-height: 60px;
}

/* ── Slots section ────────────────────────────────────────────────────── */
.booking-form__slots-title {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--wp--preset--color--dark-muted, #8A9A9A);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0.25rem 0 0;
}

.booking-form__slot-pair {
	display: flex;
	gap: 0.5rem;
	align-items: stretch;
}

.booking-form__input--date {
	flex: 1.4;
	min-width: 0;
	width: auto;
}

.booking-form__input--time {
	flex: 0.6;
	min-width: 0;
	width: auto;
}

/* Date/time picker icon colour fix for dark bg */
.booking-form__input[type="date"]::-webkit-calendar-picker-indicator,
.booking-form__input[type="time"]::-webkit-calendar-picker-indicator {
	filter: invert(0.7);
	cursor: pointer;
}

/* ── Submit ────────────────────────────────────────────────────────────── */
.booking-form__submit {
	width: 100%;
	padding: 0.85rem 1.5rem;
	margin-top: 0.25rem;
	border: none;
	border-radius: var(--radius-sm);
	background: var(--wp--preset--color--accent, #1AFFA3);
	color: var(--wp--preset--color--dark, #0F1216);
	font-family: var(--wp--preset--font-family--heading, 'Space Grotesk', sans-serif);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
}

.booking-form__submit:hover {
	background: var(--wp--preset--color--accent-hover, #15DB8A);
	transform: translateY(-1px);
}

.booking-form__submit:active {
	transform: translateY(0);
}

.booking-form__submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.booking-form__submit:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent, #1AFFA3);
	outline-offset: 2px;
}
/* ── Submit — loading state (spinner) ────────────────────────────────── */
@keyframes rr-spin {
	to { transform: rotate(360deg); }
}

.booking-form__submit--loading {
	pointer-events: none;
	position: relative;
	color: transparent !important;
}

.booking-form__submit--loading::after {
	content: '';
	position: absolute;
	inset: 0;
	margin: auto;
	width: 20px;
	height: 20px;
	border: 2px solid rgba(15, 18, 22, 0.25);
	border-top-color: var(--wp--preset--color--dark, #0F1216);
	border-radius: 50%;
	animation: rr-spin 0.7s linear infinite;
}
/* ── Field error state ────────────────────────────────────────────────── */
.booking-form__input--error {
	border-color: #ff6b6b !important;
	box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15) !important;
}

/* ── Per-field error message ─────────────────────────────────────────── */
.booking-form__field-error {
	display: none;
	margin-top: 0.25rem;
	font-size: 0.78rem;
	color: #ff6b6b;
	line-height: 1.3;
}

/* ── Global error message ─────────────────────────────────────────────── */
.booking-form__error {
	display: none;
	padding: 0.65rem 0.85rem;
	border-radius: var(--radius-sm);
	background: rgba(255, 80, 80, 0.1);
	border: 1px solid rgba(255, 80, 80, 0.25);
	color: #ff6b6b;
	font-size: 0.85rem;
	text-align: center;
}

/* ── Success view ─────────────────────────────────────────────────────── */
.booking-modal__success {
	display: none;
	flex-direction: column;
	align-items: center;
	padding: 3rem 2rem;
	text-align: center;
}

/* Animated SVG checkmark */
.booking-modal__success-circle {
	width: 72px;
	height: 72px;
	margin-bottom: 1.5rem;
	color: var(--wp--preset--color--accent, #1AFFA3);
}

.booking-modal__success-check {
	width: 100%;
	height: 100%;
}

.booking-modal__success-check-ring {
	stroke-dasharray: 160;
	stroke-dashoffset: 160;
	animation: rr-ring-draw 0.5s ease-out 0.1s forwards;
}

.booking-modal__success-check-tick {
	stroke-dasharray: 40;
	stroke-dashoffset: 40;
	animation: rr-tick-draw 0.35s ease-out 0.55s forwards;
}

@keyframes rr-ring-draw {
	to { stroke-dashoffset: 0; }
}

@keyframes rr-tick-draw {
	to { stroke-dashoffset: 0; }
}

.booking-modal__success-title {
	margin: 0 0 0.5rem;
	font-family: var(--wp--preset--font-family--heading, 'Space Grotesk', sans-serif);
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--wp--preset--color--accent, #1AFFA3);
	letter-spacing: -0.02em;
}

.booking-modal__success-text {
	margin: 0 0 1rem;
	font-size: 0.9rem;
	color: var(--wp--preset--color--dark-muted, #8A9A9A);
	line-height: 1.5;
}

/* Confirmation email notice */
.booking-modal__success-email-notice {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 1.75rem;
	padding: 0.55rem 1rem;
	border-radius: var(--radius-sm);
	background: rgba(26, 255, 163, 0.06);
	border: 1px solid rgba(26, 255, 163, 0.15);
	color: var(--wp--preset--color--dark-muted, #8A9A9A);
	font-size: 0.82rem;
	line-height: 1.4;
}

.booking-modal__success-email-notice svg {
	flex-shrink: 0;
	color: var(--wp--preset--color--accent, #1AFFA3);
}

.booking-modal__success-email-notice strong {
	color: var(--wp--preset--color--surface, #fff);
}

.booking-modal__success-close {
	padding: 0.65rem 1.75rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--wp--preset--color--surface, #fff);
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.booking-modal__success-close:hover {
	border-color: var(--accent-25);
	color: var(--wp--preset--color--accent, #1AFFA3);
	background: var(--accent-08);
}

/* ==========================================================================
   Configurator — quote builder (duration pills, player slider, price)
   ========================================================================== */

/* ── Container ────────────────────────────────────────────────────────── */
.booking-configurator {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 0.25rem;
}

/* ── Duration pills (Bien-être classique) ─────────────────────────────── */
.booking-configurator__duration {
	border: none;
	margin: 0;
	padding: 0;
}

.booking-configurator__duration legend {
	margin-bottom: 0.4rem;
}

.booking-configurator__pills {
	display: flex;
	gap: 0.5rem;
}

.booking-configurator__pill {
	flex: 1;
	position: relative;
	cursor: pointer;
}

.booking-configurator__pill input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.booking-configurator__pill-label {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15rem;
	padding: 0.6rem 0.5rem;
	border: 1px solid var(--border-dark);
	border-radius: var(--radius-sm);
	background: rgba(255, 255, 255, 0.04);
	color: var(--wp--preset--color--dark-muted, #8A9A9A);
	font-size: 0.85rem;
	font-weight: 600;
	text-align: center;
	transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.booking-configurator__pill-price {
	display: block;
	font-size: 0.75rem;
	font-weight: 400;
	opacity: 0.7;
}

/* Hover */
.booking-configurator__pill:hover .booking-configurator__pill-label {
	border-color: var(--accent-25);
	color: var(--wp--preset--color--surface, #fff);
}

/* Checked */
.booking-configurator__pill input[type="radio"]:checked + .booking-configurator__pill-label {
	border-color: var(--wp--preset--color--accent, #1AFFA3);
	background: var(--accent-08);
	color: var(--wp--preset--color--accent, #1AFFA3);
}

.booking-configurator__pill input[type="radio"]:checked + .booking-configurator__pill-label .booking-configurator__pill-price {
	opacity: 1;
}

/* Focus-visible */
.booking-configurator__pill input[type="radio"]:focus-visible + .booking-configurator__pill-label {
	outline: 2px solid var(--wp--preset--color--accent, #1AFFA3);
	outline-offset: 2px;
}

/* ── Player slider (Équipe) ───────────────────────────────────────────── */
.booking-configurator__players {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.booking-configurator__slider-wrap {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.booking-configurator__slider {
	-webkit-appearance: none;
	appearance: none;
	flex: 1;
	height: 6px;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.08);
	outline: none;
	cursor: pointer;
}

.booking-configurator__slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent, #1AFFA3);
	border: 2px solid var(--wp--preset--color--dark-surface, #151A20);
	box-shadow: 0 0 8px rgba(26, 255, 163, 0.3);
	cursor: pointer;
	transition: box-shadow 0.2s ease;
}

.booking-configurator__slider::-moz-range-thumb {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent, #1AFFA3);
	border: 2px solid var(--wp--preset--color--dark-surface, #151A20);
	box-shadow: 0 0 8px rgba(26, 255, 163, 0.3);
	cursor: pointer;
	transition: box-shadow 0.2s ease;
}

.booking-configurator__slider::-webkit-slider-thumb:hover {
	box-shadow: 0 0 14px rgba(26, 255, 163, 0.5);
}

.booking-configurator__slider::-moz-range-thumb:hover {
	box-shadow: 0 0 14px rgba(26, 255, 163, 0.5);
}

.booking-configurator__slider:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent, #1AFFA3);
	outline-offset: 2px;
}

.booking-configurator__slider-value {
	min-width: 5.5rem;
	padding: 0.35rem 0.65rem;
	border-radius: var(--radius-sm);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--border-dark);
	color: var(--wp--preset--color--surface, #fff);
	font-size: 0.85rem;
	font-weight: 600;
	text-align: center;
	white-space: nowrap;
}

/* ── Price display ────────────────────────────────────────────────────── */
.booking-configurator__price {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1rem;
	border-radius: var(--radius-sm);
	background: var(--accent-08);
	border: 1px solid var(--accent-15);
}

.booking-configurator__price-amount {
	font-family: var(--wp--preset--font-family--heading, 'Space Grotesk', sans-serif);
	font-size: clamp(1.1rem, 2.5vw, 1.5rem);
	font-weight: 700;
	color: var(--wp--preset--color--accent, #1AFFA3);
	letter-spacing: -0.02em;
}

/* ── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.booking-modal,
	.booking-form__submit,
	.booking-modal__close,
	.booking-form__input,
	.booking-form__select,
	.booking-form__textarea,
	.booking-configurator__pill-label,
	.booking-configurator__slider::-webkit-slider-thumb,
	.booking-configurator__slider::-moz-range-thumb {
		transition: none;
	}
	.booking-modal__success-check-ring,
	.booking-modal__success-check-tick {
		animation: none;
		stroke-dashoffset: 0;
	}
	.booking-form__submit--loading::after {
		animation: none;
	}
}

/* ── Mobile: full-screen modal ────────────────────────────────────────── */
@media (max-width: 600px) {
	.booking-modal {
		max-width: 100%;
		max-height: 100dvh;
		width: 100%;
		height: 100dvh;
		border-radius: 0;
		border: none;
	}

	.booking-modal__inner {
		max-height: 100dvh;
	}

	.booking-modal__header {
		padding: 1.5rem 1.25rem 0;
	}

	.booking-modal__form-wrap {
		padding: 1rem 1.25rem 1.5rem;
	}

	.booking-form__row {
		grid-template-columns: 1fr;
	}

	.booking-modal__success {
		padding: 2rem 1.25rem;
	}

	.booking-modal__form-wrap {
		padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
	}

	.booking-configurator__pills {
		flex-direction: column;
	}
}
