/**
 * Maison Lune Reservation (ml-reservation): the /reservations/ page under the hero.
 * Figma "Reservation" Reserve/Default, Reserve/Unavailable, Details/Default, Filled, Error and
 * Success at 1440 / 834 / 390. The hero itself is styled with the page hero (hero.css).
 */

.ml-reservation {
	--ml-res-chip: var(--ml-accent, var(--ml-c-wine));
	--ml-res-on-chip: var(--ml-on-accent, var(--ml-c-paper));
	--ml-res-field: var(--ml-bg, var(--ml-c-paper));
	--ml-res-border: #77676a;
	--ml-res-error: #b3342c;
	--ml-res-radius: 0px;
}

/* Body: form column (620) and visit details (532), 48 apart. */
.ml-reservation__body {
	padding-top: var(--ml-pad-t, 80px);
	padding-bottom: var(--ml-pad-b, 80px);
}

.ml-reservation__layout {
	display: grid;
	grid-template-columns: minmax(0, 620fr) minmax(0, 532fr);
	gap: 48px;
	align-items: stretch;
}

.ml-reservation__main {
	min-width: 0;
}

.ml-reservation__form,
.ml-reservation__full,
.ml-reservation__done {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 24px;
	min-width: 0;
}

/* Step heading: "01 / Choose your visit" (Cormorant 24/110%). */
.ml .ml-reservation__step {
	color: var(--ml-heading);
	font-family: var(--ml-serif);
	font-size: 24px;
	line-height: 26px;
	font-weight: 400;
}

/* Focused by script after a post: not interactive, so no ring. */
.ml .ml-reservation__step:focus {
	outline: 0;
}

/* "Your table request" (36/110%). */
.ml .ml-reservation__step--large {
	font-size: 36px;
	line-height: 40px;
}

/* ------------------------------------------------------------------ */
/* Step 1: option buttons                                             */
/* ------------------------------------------------------------------ */

.ml-reservation__group {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.ml-reservation__label {
	display: block;
	float: none;
	width: 100%;
	margin: 0 0 8px;
	padding: 0;
	color: var(--ml-text);
	font-size: 13px;
	line-height: 20px;
	font-weight: 400;
}

.ml-reservation__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ml-reservation__option {
	position: relative;
	display: inline-flex;
	cursor: pointer;
}

/* The real radio sits under the chip: keyboard and screen readers use it. */
.ml-reservation__radio {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.ml-reservation__chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	min-height: 48px;
	padding: 0 16px;
	border: 1px solid var(--ml-text);
	border-radius: var(--ml-radius-control, 8px);
	background: transparent;
	color: var(--ml-text);
	font-size: 15px;
	line-height: 23px;
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ml-reservation__option:hover .ml-reservation__chip {
	background: rgba(76, 39, 50, 0.06);
}

/* A fully booked date: muted, still selectable (it leads to "No tables at this time"). */
.ml-reservation__option.is-full .ml-reservation__chip {
	border-color: var(--ml-muted);
	color: var(--ml-muted);
}

.ml-reservation__radio:checked + .ml-reservation__chip,
.ml-reservation__option:hover .ml-reservation__radio:checked + .ml-reservation__chip {
	border-color: var(--ml-res-chip);
	background: var(--ml-res-chip);
	color: var(--ml-res-on-chip);
}

.ml-reservation__radio:focus-visible + .ml-reservation__chip {
	outline: 2px solid var(--ml-c-wine);
	outline-offset: 2px;
}

.ml .ml-reservation__help {
	margin-top: 8px;
	color: var(--ml-muted);
	font-size: 13px;
	line-height: 20px;
}

.ml-reservation__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

/* ------------------------------------------------------------------ */
/* Step 2: fields and errors                                          */
/* ------------------------------------------------------------------ */

.ml-reservation__alert {
	padding: 16px 20px;
	border: 1px solid var(--ml-res-error);
	border-radius: var(--ml-radius-control, 8px);
}

.ml-reservation__alert[hidden] {
	display: none;
}

/* Focused by script; its own red rule already marks it. */
.ml-reservation__alert:focus {
	outline: 0;
}

.ml .ml-reservation__alert-title {
	color: var(--ml-res-error);
	font-size: 15px;
	line-height: 23px;
	font-weight: 500;
}

.ml .ml-reservation__alert-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 4px;
}

.ml .ml-reservation__alert-link {
	display: inline-flex;
	align-items: flex-start;
	min-height: 44px;
	padding-top: 4px;
	color: var(--ml-heading);
	font-size: 14px;
	line-height: 21px;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.ml .ml-reservation__alert-link:hover {
	text-decoration-thickness: 2px;
}

.ml .ml-reservation__summary {
	color: var(--ml-muted);
	font-size: 16px;
	line-height: 28px;
}

.ml-reservation__field {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ml-reservation__input {
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--ml-res-border);
	border-radius: var(--ml-radius-control, 8px);
	background: var(--ml-res-field);
	color: var(--ml-c-ink);
	font-family: var(--ml-sans);
	font-size: 15px;
	line-height: 23px;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
}

.ml-reservation__input--area {
	height: 112px;
	min-height: 112px;
	padding: 12px 16px;
	resize: vertical;
}

.ml-reservation__input::placeholder {
	color: var(--ml-c-muted);
	opacity: 1;
}

.ml-reservation__input:focus {
	border-color: var(--ml-c-ink);
	outline: 2px solid var(--ml-c-wine);
	outline-offset: 1px;
}

.ml-reservation__field.is-invalid .ml-reservation__input {
	border-color: var(--ml-res-error);
}

.ml .ml-reservation__error {
	margin-top: 8px;
	color: var(--ml-res-error);
	font-size: 12px;
	line-height: 18px;
}

.ml-reservation__error[hidden] {
	display: none;
}

/* "Back to available times": a submit button drawn as a link. */
.ml-reservation__back {
	align-self: flex-start;
	min-height: 45px;
	margin: 0;
	padding: 12px 0;
	border: 0;
	background: none;
	color: var(--ml-heading);
	font-family: var(--ml-sans);
	font-size: 14px;
	line-height: 21px;
	text-align: left;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	cursor: pointer;
}

.ml-reservation__back:hover {
	text-decoration-thickness: 2px;
}

[data-ml-res-example][hidden] {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Fully booked and request received                                  */
/* ------------------------------------------------------------------ */

.ml .ml-reservation__message {
	color: var(--ml-muted);
	font-size: 16px;
	line-height: 24px;
}

.ml .ml-reservation__lines {
	color: var(--ml-text);
	font-size: 17px;
	line-height: 30px;
}

.ml-reservation__retry {
	margin: 0;
}

.ml .ml-reservation__cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ml-reservation__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.ml-reservation__card-media {
	width: 100%;
	aspect-ratio: 294 / 368;
	overflow: hidden;
	border-radius: var(--ml-res-radius);
	background: var(--ml-c-sand);
}

.ml .ml-reservation__card-media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.ml .ml-reservation__card-title {
	margin-top: 12px;
	color: var(--ml-heading);
	font-family: var(--ml-serif);
	font-size: 28px;
	line-height: 34px;
	font-weight: 400;
}

.ml .ml-reservation__card-link,
.ml .ml-reservation__directions {
	align-items: flex-start;
	min-height: 44px;
	font-size: 14px;
	line-height: 16px;
}

.ml .ml-reservation__card-link {
	margin-top: 12px;
}

/* ------------------------------------------------------------------ */
/* Visit details                                                      */
/* ------------------------------------------------------------------ */

.ml-reservation__aside {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/* The photo fills the height the form leaves (320 at least). */
.ml-reservation__photo {
	position: relative;
	flex: 1 0 auto;
	min-height: 320px;
	overflow: hidden;
	border-radius: var(--ml-res-radius);
	background: var(--ml-c-sand);
}

.ml-reservation__photo picture {
	display: contents;
}

.ml .ml-reservation__photo img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.ml .ml-reservation__name {
	margin-top: 24px;
	color: var(--ml-heading);
	font-family: var(--ml-serif);
	font-size: 28px;
	line-height: 31px;
	font-weight: 400;
}

.ml-reservation__info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	margin-top: 24px;
	color: var(--ml-muted);
	font-size: 15px;
	line-height: 23px;
}

.ml .ml-reservation__note {
	margin-top: 24px;
	color: var(--ml-muted);
	font-size: 13px;
	line-height: 20px;
}

/* ------------------------------------------------------------------ */
/* Hero fallback (only while inc/elementor/page-hero.php is missing)  */
/* ------------------------------------------------------------------ */

.ml-reservation__fallback {
	display: flex;
	align-items: flex-end;
	min-height: 480px;
	padding: 80px 0;
	background: var(--ml-c-dark);
	color: var(--ml-c-paper);
}

.ml-reservation__fallback-inner {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ml .ml-reservation__fallback-eyebrow {
	color: var(--ml-c-paper);
	font-weight: 400;
}

.ml .ml-reservation__fallback-title {
	color: var(--ml-c-paper);
}

.ml .ml-reservation__fallback-text {
	margin-top: 4px;
	font-size: 15px;
	line-height: 23px;
}

/* ------------------------------------------------------------------ */
/* Tablet (834)                                                       */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	.ml-reservation__body {
		padding-top: var(--ml-pad-t, 56px);
		padding-bottom: var(--ml-pad-b, 56px);
	}

	.ml-reservation__layout {
		grid-template-columns: minmax(0, 1fr) 260px;
	}

	.ml .ml-reservation__cards {
		gap: 24px;
	}

	.ml-reservation__fallback {
		min-height: 400px;
		padding: 56px 0;
	}
}

/* ------------------------------------------------------------------ */
/* Phone (390)                                                        */
/* ------------------------------------------------------------------ */

@media (max-width: 767px) {
	.ml-reservation__body {
		padding-top: var(--ml-pad-t, 32px);
		padding-bottom: var(--ml-pad-b, 32px);
	}

	.ml-reservation__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.ml .ml-reservation__step--large {
		font-size: 32px;
		line-height: 35px;
	}

	.ml-reservation__actions {
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
	}

	.ml-reservation__actions .ml-btn,
	.ml-reservation__retry .ml-btn {
		width: 100%;
	}

	/* Fully booked: "Try another date" comes before the cards. */
	.ml-reservation__retry {
		order: 2;
	}

	.ml-reservation__full .ml-reservation__cards {
		order: 3;
	}

	.ml .ml-reservation__cards {
		gap: 16px;
	}

	.ml-reservation__card-media {
		aspect-ratio: 167 / 209;
	}

	.ml .ml-reservation__card-title {
		font-size: 22px;
		line-height: 26px;
	}

	.ml-reservation__photo {
		flex: none;
		height: 240px;
		min-height: 0;
	}

	.ml-reservation__fallback {
		min-height: 360px;
		padding: 32px 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ml-reservation__chip {
		transition: none;
	}
}
