/* ==========================================================================
   Horizon Menu — Reservation styles
   Reuses the --hm-* tokens defined in frontend.css.
   ========================================================================== */

/*
 * Two-column layout: menu (3/4) + booking sidebar (1/4), desktop only.
 * Declares its own copy of the --hm-* tokens (see frontend.css's .hm-menu
 * block) because .hm-reservation sits as a SIBLING of .hm-menu here, not a
 * descendant of it — custom properties only cascade downward, so without
 * this the sidebar would silently fall back to unstyled defaults. Keep the
 * values in sync with frontend.css if the palette ever changes.
 */
.hm-menu-layout {
	--hm-text: #201b14;
	--hm-text-muted: #6f6659;
	--hm-text-faint: #96897a;
	--hm-heading: #17130e;
	--hm-accent: #027d42;
	--hm-accent-soft: #e2f2ea;
	--hm-border: #e9e2d6;
	--hm-border-strong: #d8cdb8;
	--hm-surface: #fffdfa;
	--hm-surface-alt: #faf6ef;
	--hm-danger: #a63a34;
	--hm-danger-bg: #fbf0ef;
	--hm-radius-sm: 6px;
	--hm-radius-md: 10px;
	--hm-radius-lg: 16px;
	--hm-shadow-sm: 0 1px 2px rgba(30, 22, 8, 0.06);
	--hm-shadow-md: 0 10px 30px -12px rgba(30, 22, 8, 0.18);

	max-width: 1280px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 3fr 1fr;
	gap: 2.5rem;
	align-items: start;
}

.hm-menu-layout .hm-menu {
	max-width: none;
	margin: 0;
	min-width: 0;
}

.hm-menu-layout .hm-reservation {
	max-width: none;
	margin: 0;
	min-width: 0;
	position: sticky;
	top: 7.5rem;
}

@media (max-width: 960px) {
	.hm-menu-layout {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.hm-menu-layout .hm-reservation {
		position: static;
		margin-top: 2.5rem;
	}
}

.hm-res-qty {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin-top: 0.6rem;
}

.hm-res-qty-minus,
.hm-res-qty-plus {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid var(--hm-border-strong);
	background: var(--hm-surface);
	color: var(--hm-heading);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.hm-res-qty-minus:hover,
.hm-res-qty-plus:hover {
	border-color: var(--hm-accent);
	background: var(--hm-accent-soft);
}

.hm-res-qty-value {
	min-width: 1.4em;
	text-align: center;
	font-weight: 700;
}

.hm-res-added-badge {
	display: inline-flex;
	align-items: center;
	margin-right: 0.5rem;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: var(--hm-accent);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

.hm-res-added-badge[hidden] {
	display: none;
}

/* Booking form */
.hm-res-card {
	padding: 1.5rem 1.25rem;
	background: var(--hm-surface);
	border: 1px solid var(--hm-border);
	border-radius: var(--hm-radius-lg);
	box-shadow: var(--hm-shadow-sm);
	display: flex;
	flex-direction: column;
	gap: 1.4rem;
}

.hm-res-field label {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--hm-text-muted);
	margin-bottom: 0.4rem;
}

.hm-res-icon {
	display: inline-flex;
	flex-shrink: 0;
	width: 15px;
	height: 15px;
	color: var(--hm-accent);
}

.hm-res-icon svg {
	width: 100%;
	height: 100%;
}

.hm-res-submit .hm-res-icon {
	color: #fff;
}

.hm-res-field input[type="text"],
.hm-res-field input[type="email"],
.hm-res-field input[type="tel"],
.hm-res-field input[type="date"],
.hm-res-field textarea {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--hm-border-strong);
	border-radius: var(--hm-radius-sm);
	font: inherit;
	color: var(--hm-text);
	background: var(--hm-surface);
}

.hm-res-field input:focus,
.hm-res-field textarea:focus {
	outline: 2px solid var(--hm-accent);
	outline-offset: 1px;
	border-color: var(--hm-accent);
}

.hm-res-stepper {
	display: inline-flex;
	align-items: center;
	gap: 0.9rem;
}

.hm-res-stepper-btn {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--hm-border-strong);
	background: var(--hm-surface);
	font-size: 1.1rem;
	cursor: pointer;
}

.hm-res-stepper-btn:hover {
	border-color: var(--hm-accent);
	background: var(--hm-accent-soft);
}

.hm-res-stepper-value {
	min-width: 1.6em;
	text-align: center;
	font-weight: 700;
	font-size: 1.1rem;
}

.hm-res-slots-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.4rem;
}

.hm-res-slot {
	padding: 0.45rem 0.9rem;
	border: 1px solid var(--hm-border-strong);
	border-radius: 999px;
	background: var(--hm-surface);
	color: var(--hm-text);
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
}

.hm-res-slot:hover:not(:disabled) {
	border-color: var(--hm-accent);
}

.hm-res-slot--active {
	background: var(--hm-accent);
	border-color: var(--hm-accent);
	color: #fff;
}

.hm-res-slot--full,
.hm-res-slot:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	text-decoration: line-through;
}

.hm-res-hint {
	margin: 0;
	color: var(--hm-text-faint);
	font-size: 0.85rem;
}

.hm-res-contact-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
}

.hm-res-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.hm-res-message {
	min-height: 1.2em;
	color: var(--hm-danger);
	font-size: 0.9rem;
	margin: 0;
}

/* Cart total, just above the submit button */
.hm-res-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding-top: 1.1rem;
	border-top: 1px solid var(--hm-border);
	font-weight: 700;
}

.hm-res-total-label {
	color: var(--hm-text-muted);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-weight: 600;
}

.hm-res-total-value {
	font-size: 1.2rem;
	color: var(--hm-heading);
	font-variant-numeric: tabular-nums;
}

.hm-res-deposit-line {
	margin: 0 0 0.6rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--hm-text-muted);
}

.hm-res-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	width: 100%;
	padding: 0.75rem 1.6rem;
	border: none;
	border-radius: var(--hm-radius-md);
	background: var(--hm-accent);
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.15s ease;
}

.hm-res-submit:hover:not(:disabled) {
	background: var(--hm-heading);
}

.hm-res-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.hm-res-success {
	padding: 1.5rem;
	text-align: center;
	font-weight: 600;
	color: var(--hm-accent);
	background: var(--hm-accent-soft);
	border-radius: var(--hm-radius-md);
}

/*
 * Cart review popup, shown before payment.
 *
 * Appended straight to <body> by reservation.js (standard modal practice, to
 * escape any ancestor overflow/stacking quirks) — which means it sits OUTSIDE
 * .hm-menu-layout and can't inherit its --hm-* tokens. It therefore declares
 * its own self-contained neutral palette below (white / black / grey, as
 * requested) rather than depending on the warm brand tokens, plus just the
 * one brand token (--hm-accent) it needs so .hm-res-submit still renders
 * identically to the sidebar's "Réserver" button.
 */
.hm-res-modal-overlay {
	--hm-accent: #027d42;
	--hm-accent-soft: #e2f2ea;
	--hm-heading: #111111;
	--hm-radius-md: 10px;

	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	background: rgba(17, 17, 17, 0.6);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.hm-res-modal {
	--hm-modal-text: #111111;
	--hm-modal-muted: #6b7280;
	--hm-modal-border: #e5e7eb;
	--hm-modal-subtle: #f9fafb;

	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 2.5rem);
	overflow-y: auto;
	padding: 2rem;
	background: #ffffff;
	color: var(--hm-modal-text);
	border-radius: 16px;
	box-shadow: 0 20px 48px -16px rgba(17, 17, 17, 0.35);
	outline: none;
}

.hm-res-modal-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: var(--hm-modal-subtle);
	color: var(--hm-modal-muted);
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.hm-res-modal-close:hover,
.hm-res-modal-close:focus-visible {
	background: var(--hm-modal-border);
	color: var(--hm-modal-text);
}

.hm-res-modal-title {
	position: relative;
	margin: 0 1.8rem 0.9rem 0;
	padding-bottom: 0.7rem;
	font-family: var(--hm-font-heading, Georgia, serif);
	font-size: 1.3rem;
	color: var(--hm-modal-text);
}

.hm-res-modal-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 40px;
	height: 3px;
	border-radius: 2px;
	background: var(--hm-accent);
}

.hm-res-modal-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 0.6rem;
	margin: 0 0 1.4rem;
	font-size: 0.88rem;
	color: var(--hm-modal-muted);
}

.hm-res-modal-meta-item {
	position: relative;
	padding-right: 0.7rem;
}

.hm-res-modal-meta-item:not(:last-child)::after {
	content: "·";
	position: absolute;
	right: -0.1rem;
	color: var(--hm-modal-border);
}

.hm-res-modal-section-label {
	margin: 0 0 0.6rem;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--hm-modal-muted);
}

.hm-res-modal-no-items {
	padding: 0.9rem 1rem;
	background: var(--hm-modal-subtle);
	border-radius: 10px;
	color: var(--hm-modal-muted);
	font-size: 0.88rem;
}

.hm-res-modal-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.hm-res-modal-item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.92rem;
	color: var(--hm-modal-text);
}

.hm-res-modal-item-price {
	flex-shrink: 0;
	font-variant-numeric: tabular-nums;
	color: var(--hm-modal-muted);
}

.hm-res-modal-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-top: 1.1rem;
	padding-top: 1.1rem;
	border-top: 1px solid var(--hm-modal-border);
	font-weight: 700;
	font-size: 1.1rem;
	color: var(--hm-modal-text);
}

.hm-res-modal .hm-res-message {
	margin-top: 1.2rem;
	color: #b91c1c;
}

.hm-res-modal .hm-res-deposit-line {
	color: var(--hm-modal-muted);
}

.hm-res-modal .hm-res-submit {
	margin-top: 1.2rem;
}

@media (prefers-reduced-motion: no-preference) {
	.hm-res-modal-overlay {
		animation: hm-res-fade-in 0.15s ease;
	}

	.hm-res-modal {
		animation: hm-res-modal-in 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
	}
}

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

@keyframes hm-res-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

