/* Mench Bookings — booking form. Every selector is scoped under .mench-bk; theme it via the custom properties. */
.mench-bk {
	--mbk-ink: #1f2c2b;
	--mbk-muted: #566765;
	--mbk-line: #d3ddd9;
	--mbk-surface: #ffffff;
	--mbk-soft: #eff5f2;
	--mbk-accent: #0b6e4f;
	--mbk-accent-ink: #ffffff;
	--mbk-danger: #a3241b;
	--mbk-radius: 14px;
	--mbk-radius-sm: 10px;
	--mbk-gap: 16px;
	--mbk-pad: 24px;
	--mbk-font: inherit;
	--mbk-ease: cubic-bezier(.2, .7, .2, 1);

	box-sizing: border-box;
	max-width: 640px;
	margin-inline: auto;
	color: var(--mbk-ink);
	font-family: var(--mbk-font);
	font-size: 1rem;
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
	container-type: inline-size;
	container-name: mench-bk;
}
.mench-bk *, .mench-bk *::before, .mench-bk *::after { box-sizing: inherit; }
.mench-bk button, .mench-bk input, .mench-bk textarea { font: inherit; color: inherit; letter-spacing: normal; text-transform: none; }
.mench-bk button {
	-webkit-appearance: none; appearance: none; display: inline-block; margin: 0; padding: 0; border: 0; border-radius: 0;
	white-space: normal; text-align: inherit; line-height: inherit; font-weight: inherit; box-shadow: none; text-decoration: none;
}
.mench-bk button, .mench-bk button:hover, .mench-bk button:focus, .mench-bk button:active {
	background-color: var(--mbk-btn-bg, transparent);
	color: var(--mbk-btn-fg, inherit);
}


.mench-bk .mench-bk__title { margin: 0 0 12px; font-size: 1.5rem; line-height: 1.25; }

.mench-bk .mench-bk__panel {
	background: var(--mbk-surface);
	border: 1px solid var(--mbk-line);
	border-radius: var(--mbk-radius);
	overflow: hidden;
}

/* Ticket: the booking builds up here as choices are made. */
.mench-bk .mench-bk__ticket {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0;
	background: var(--mbk-soft);
	border-bottom: 1px dashed var(--mbk-line);
	position: relative;
}
.mench-bk .mench-bk__ticket::before, .mench-bk .mench-bk__ticket::after {
	content: "";
	position: absolute;
	bottom: -9px;
	width: 18px; height: 18px;
	border-radius: 50%;
	background: var(--mbk-surface);
	border: 1px solid var(--mbk-line);
}
.mench-bk .mench-bk__ticket::before { left: -10px; }
.mench-bk .mench-bk__ticket::after { right: -10px; }
.mench-bk .mench-bk__ticket-field { padding: 12px 14px 14px; min-width: 0; position: relative; border-right: 1px solid var(--mbk-line); }
/* The jump-back button covers its whole ticket field so the tap target is large. */
.mench-bk button.mench-bk__ticket-value::after { content: ""; position: absolute; inset: 0; }
.mench-bk .mench-bk__ticket-field:has(button.mench-bk__ticket-value:hover) { background: color-mix(in srgb, var(--mbk-accent) 6%, transparent); }
.mench-bk .mench-bk__ticket-field:last-child { border-right: 0; }
.mench-bk .mench-bk__ticket-field dt { font-size: .8125rem; color: var(--mbk-muted); margin: 0 0 2px; }
.mench-bk .mench-bk__ticket-field dd { margin: 0; }
.mench-bk .mench-bk__ticket-field.is-current dt { color: var(--mbk-accent); font-weight: 600; }
.mench-bk .mench-bk__ticket-value {
	display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; text-align: start;
	font-weight: 600; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-variant-numeric: tabular-nums;
}
.mench-bk .mench-bk__ticket-value.is-empty { color: var(--mbk-muted); font-weight: 400; }
button.mench-bk__ticket-value { cursor: pointer; text-decoration: underline; text-decoration-color: var(--mbk-line); text-underline-offset: 3px; }
button.mench-bk__ticket-value:hover { text-decoration-color: currentColor; }

.mench-bk .mench-bk__step { padding: var(--mbk-pad); }
.mench-bk.mench-bk--compact .mench-bk__step { padding: 16px; }

.mench-bk .mench-bk__heading { margin: 0 0 var(--mbk-gap); font-size: 1.25rem; line-height: 1.3; outline: none; }
.mench-bk .mench-bk__heading--done { font-size: 1.5rem; }
.mench-bk .mench-bk__sub { margin: -8px 0 var(--mbk-gap); color: var(--mbk-muted); }

.mench-bk .mench-bk__back {
	display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
	margin: -10px 0 4px -10px; padding: 0 10px; --mbk-btn-fg: var(--mbk-muted); cursor: pointer; border-radius: var(--mbk-radius-sm);
}
.mench-bk .mench-bk__back::before { content: "‹"; font-size: 1.25em; line-height: 1; }
.mench-bk .mench-bk__back:hover { --mbk-btn-fg: var(--mbk-ink); }

/* Option lists: services and staff. */
.mench-bk .mench-bk__options { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mench-bk .mench-bk__option {
	display: grid; grid-template-columns: 1fr auto; grid-template-areas: "main side" "meta side";
	align-items: center; column-gap: 12px; width: 100%; min-height: 56px; padding: 12px 16px;
	border: 1px solid var(--mbk-line); border-radius: var(--mbk-radius-sm); --mbk-btn-bg: var(--mbk-surface); --mbk-btn-fg: var(--mbk-ink);
	text-align: start; cursor: pointer; transition: border-color .15s var(--mbk-ease), background-color .15s var(--mbk-ease);
}
.mench-bk .mench-bk__option--static { cursor: default; }
.mench-bk .mench-bk__option-main { grid-area: main; font-weight: 600; }
.mench-bk .mench-bk__option-meta { grid-area: meta; color: var(--mbk-muted); font-size: .9375rem; }
.mench-bk .mench-bk__option-side { grid-area: side; font-variant-numeric: tabular-nums; font-weight: 600; }
.mench-bk .mench-bk__option:hover:not(:disabled) { border-color: var(--mbk-accent); }
.mench-bk .mench-bk__option.is-selected { border-color: var(--mbk-accent); --mbk-btn-bg: var(--mbk-soft); box-shadow: inset 3px 0 0 var(--mbk-accent); }
.mench-bk .mench-bk__option:disabled { cursor: not-allowed; opacity: .6; }
.mench-bk .mench-bk__option:disabled .mench-bk__option-side { font-weight: 400; color: var(--mbk-muted); }

/* Calendar. */
.mench-bk .mench-bk__month { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.mench-bk .mench-bk__month-label { margin: 0; font-weight: 600; }
.mench-bk .mench-bk__month-nav {
	width: 44px; height: 44px; border: 1px solid var(--mbk-line); border-radius: 50%; --mbk-btn-bg: var(--mbk-surface); --mbk-btn-fg: var(--mbk-ink); text-align: center;
	font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.mench-bk .mench-bk__month-nav:disabled { opacity: .35; cursor: not-allowed; }
.mench-bk .mench-bk__calendar { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0; border: 0; }
.mench-bk .mench-bk__calendar th, .mench-bk .mench-bk__calendar td { padding: 2px; border: 0 !important; background: none !important; text-align: center; vertical-align: middle; }
.mench-bk .mench-bk__calendar.is-loading .mench-bk__day { --mbk-btn-bg: var(--mbk-soft); --mbk-btn-fg: var(--mbk-muted); text-decoration: none; opacity: .55; }
.mench-bk .mench-bk__calendar th { font-size: .8125rem; font-weight: 600; color: var(--mbk-muted); padding-bottom: 6px; }
.mench-bk .mench-bk__day {
	width: 100%; max-width: 48px; aspect-ratio: 1; min-height: 40px; margin: 0 auto; display: grid; place-items: center;
	border: 1px solid transparent; border-radius: 50%; --mbk-btn-bg: var(--mbk-soft); --mbk-btn-fg: var(--mbk-ink); font-weight: 600; padding: 0;
	font-variant-numeric: tabular-nums; cursor: pointer;
}
.mench-bk .mench-bk__day[aria-disabled="true"] { --mbk-btn-bg: transparent; --mbk-btn-fg: var(--mbk-muted); font-weight: 400; cursor: default; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--mbk-muted) 40%, transparent); }
.mench-bk .mench-bk__day:not([aria-disabled="true"]):hover { border-color: var(--mbk-accent); }
.mench-bk .mench-bk__day.is-today { box-shadow: inset 0 0 0 1px var(--mbk-muted); }
.mench-bk .mench-bk__day.is-selected { --mbk-btn-bg: var(--mbk-accent); --mbk-btn-fg: var(--mbk-accent-ink); }

/* Times. */
.mench-bk .mench-bk__times-group + .mench-bk__times-group { margin-top: 16px; }
.mench-bk .mench-bk__times-label { margin: 0 0 6px; font-size: .875rem; color: var(--mbk-muted); font-weight: 600; }
.mench-bk .mench-bk__times { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.mench-bk .mench-bk__time {
	width: 100%; min-height: 44px; padding: 8px; border: 1px solid var(--mbk-line); border-radius: var(--mbk-radius-sm);
	--mbk-btn-bg: var(--mbk-surface); --mbk-btn-fg: var(--mbk-ink); font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; text-align: center;
}
.mench-bk .mench-bk__time:hover { border-color: var(--mbk-accent); }
.mench-bk .mench-bk__time.is-selected { --mbk-btn-bg: var(--mbk-accent); --mbk-btn-fg: var(--mbk-accent-ink); border-color: var(--mbk-accent); }

/* Form. */
.mench-bk .mench-bk__form { display: grid; gap: 14px; }
.mench-bk .mench-bk__field { display: grid; gap: 4px; }
.mench-bk .mench-bk__field label, .mench-bk .mench-bk__check label { font-weight: 600; }
.mench-bk .mench-bk__field input, .mench-bk .mench-bk__field textarea {
	width: 100%; min-height: 48px; padding: var(--mbk-field-pad, 10px 14px); border: 1px solid var(--mbk-field-line, var(--mbk-line)); border-radius: var(--mbk-field-radius, var(--mbk-radius-sm));
	background: var(--mbk-field-bg, var(--mbk-surface)); color: var(--mbk-field-ink, var(--mbk-ink)); font-size: 1rem; box-shadow: none;
}
.mench-bk .mench-bk__field textarea { min-height: 88px; resize: vertical; }
.mench-bk .mench-bk__field input:focus, .mench-bk .mench-bk__field textarea:focus { border-color: var(--mbk-field-focus, var(--mbk-accent)); }
.mench-bk .mench-bk__field-hint { margin: 0; font-size: .875rem; color: var(--mbk-muted); }
.mench-bk .mench-bk__field-error { margin: 0; font-size: .875rem; color: var(--mbk-danger); font-weight: 600; }
.mench-bk .has-error input, .mench-bk .has-error textarea { border-color: var(--mbk-danger); }
.mench-bk .mench-bk__check { display: grid; grid-template-columns: 24px 1fr; gap: 4px 10px; align-items: start; }
.mench-bk .mench-bk__check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--mbk-accent); }
.mench-bk .mench-bk__check label { font-weight: 400; }
.mench-bk .mench-bk__check .mench-bk__field-error { grid-column: 2; }
.mench-bk .mench-bk__trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Review and result. */
.mench-bk .mench-bk__summary { margin: 0 0 var(--mbk-gap); display: grid; gap: 0; border-top: 1px solid var(--mbk-line); }
.mench-bk .mench-bk__summary > div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--mbk-line); }
.mench-bk .mench-bk__summary dt { color: var(--mbk-muted); margin: 0; }
.mench-bk .mench-bk__summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.mench-bk .mench-bk__pay { margin: 0 0 var(--mbk-gap); padding: 12px 14px; border-radius: var(--mbk-radius-sm); background: var(--mbk-soft); }
.mench-bk .mench-bk__pay.is-due { box-shadow: inset 3px 0 0 var(--mbk-accent); }

.mench-bk .mench-bk__primary {
	width: 100%; min-height: 52px; padding: 12px 20px; border: 0; border-radius: var(--mbk-radius-sm);
	--mbk-btn-bg: var(--mbk-accent); --mbk-btn-fg: var(--mbk-accent-ink); font-weight: 700; font-size: 1.0625rem; cursor: pointer; text-align: center;
	transition: filter .15s var(--mbk-ease), transform .15s var(--mbk-ease);
}
.mench-bk .mench-bk__primary:hover { filter: brightness(1.08); }
.mench-bk .mench-bk__primary:active { transform: translateY(1px); }
.mench-bk .mench-bk__primary:disabled { opacity: .7; cursor: progress; }

.mench-bk .mench-bk__lead { margin: 0 0 var(--mbk-gap); color: var(--mbk-muted); }
.mench-bk .mench-bk__ref {
	display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 var(--mbk-gap);
	padding: 14px 16px; border: 1px dashed var(--mbk-accent); border-radius: var(--mbk-radius-sm); background: var(--mbk-soft);
}
.mench-bk .mench-bk__ref span { color: var(--mbk-muted); }
.mench-bk .mench-bk__ref strong { font-size: 1.375rem; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.mench-bk .mench-bk__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.mench-bk .mench-bk__secondary {
	display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 14px; text-align: center;
	border: 1px solid var(--mbk-accent); border-radius: var(--mbk-radius-sm); color: var(--mbk-accent); font-weight: 600; text-decoration: none;
}
.mench-bk .mench-bk__secondary:hover { background: var(--mbk-soft); }
.mench-bk button.mench-bk__secondary { --mbk-btn-bg: var(--mbk-surface); --mbk-btn-fg: var(--mbk-accent); width: 100%; cursor: pointer; text-align: center; }
.mench-bk button.mench-bk__secondary:hover { --mbk-btn-bg: var(--mbk-soft); }
.mench-bk .mench-bk__secondary--danger, .mench-bk button.mench-bk__secondary--danger { border-color: var(--mbk-danger); --mbk-btn-fg: var(--mbk-danger); color: var(--mbk-danger); }
.mench-bk .mench-bk__status { display: inline-block; margin: 0 0 var(--mbk-gap); padding: 4px 12px; border-radius: 999px; background: var(--mbk-soft); font-weight: 600; font-size: .9375rem; }
.mench-bk .mench-bk__status--cancelled, .mench-bk .mench-bk__status--expired { background: #fdf1ef; color: var(--mbk-danger); }
.mench-bk .mench-bk__status--needs_attention, .mench-bk .mench-bk__status--pending_payment { background: #fff6e0; color: #7a5200; }
.mench-bk .mench-bk__link, .mench-bk a.mench-bk__link, .mench-bk a.mench-bk__link:hover, .mench-bk a.mench-bk__link:visited { color: var(--mbk-accent); }
.mench-bk .mench-bk__link { min-height: 44px; --mbk-btn-fg: var(--mbk-accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.mench-bk .mench-bk__message { margin: 0; padding: 12px var(--mbk-pad); background: #fdf1ef; color: var(--mbk-danger); border-bottom: 1px solid #f1c9c4; font-weight: 600; }
.mench-bk .mench-bk__hint, .mench-bk .mench-bk__empty, .mench-bk .mench-bk__notice { margin: 12px 0 0; color: var(--mbk-muted); }
.mench-bk .mench-bk__empty { margin: 0; padding: var(--mbk-pad); }
.mench-bk .mench-bk__panel > .mench-bk__heading, .mench-bk .mench-bk__panel > .mench-bk__options { margin: var(--mbk-pad); }

/* Focus is always visible, independent of the theme. */
.mench-bk button:focus-visible, .mench-bk a:focus-visible, .mench-bk input:focus-visible, .mench-bk textarea:focus-visible {
	outline: 3px solid var(--mbk-accent); outline-offset: 2px;
}
/* Headings receive focus programmatically on step change so screen readers announce them; they are not controls. */
.mench-bk .mench-bk__heading:focus, .mench-bk .mench-bk__heading:focus-visible { outline: none; }

@container mench-bk (max-width: 600px) {
	.mench-bk .mench-bk__panel { --mbk-pad: 18px; }
	.mench-bk .mench-bk__ticket-field { padding: 8px 12px 10px; }
	.mench-bk .mench-bk__ticket-field dt { font-size: .75rem; }
	.mench-bk .mench-bk__ticket { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mench-bk .mench-bk__ticket-field:nth-child(2) { border-right: 0; }
	.mench-bk .mench-bk__ticket-field:nth-child(-n+2) { border-bottom: 1px solid var(--mbk-line); }
	.mench-bk .mench-bk__actions { grid-template-columns: 1fr; }
	.mench-bk .mench-bk__summary > div { grid-template-columns: 6em 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.mench-bk * { transition: none !important; scroll-behavior: auto !important; }
}

/* Feedback page: CSS-only stars (radio buttons, keyboard and screen-reader friendly). */
.mench-bk .mench-bk__stars { border: 0; margin: 0; padding: 0; min-width: 0; }
.mench-bk .mench-bk__stars legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.mench-bk .mench-bk__stars-row { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.mench-bk .mench-bk__stars-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mench-bk .mench-bk__stars-row label { font-size: 40px; line-height: 1; color: var(--mbk-line); cursor: pointer; padding: 2px; min-width: 48px; min-height: 48px; display: grid; place-items: center; border-radius: var(--mbk-radius-sm); transition: color .12s var(--mbk-ease), transform .12s var(--mbk-ease); }
.mench-bk .mench-bk__stars-row input:checked ~ label,
.mench-bk .mench-bk__stars-row label:hover,
.mench-bk .mench-bk__stars-row label:hover ~ label { color: #e6a700; }
.mench-bk .mench-bk__stars-row input:focus-visible + label { outline: 3px solid var(--mbk-accent); outline-offset: 2px; }
.mench-bk .mench-bk__stars-row label:active { transform: scale(.92); }
.mench-bk .mench-bk__stars-static { font-size: 28px; color: #e6a700; margin: 0; letter-spacing: 2px; }
.mench-bk .mench-bk__sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mench-bk--page { max-width: 520px; }
