/**
 * Consultation booking modal
 * Edit freely — loaded only when the booking popup is rendered.
 */

.hm-book {
	--hm-modal-bg: #0e0d0d;
	--hm-modal-surface: #171514;
	--hm-modal-border: rgba(255, 255, 255, 0.1);
	--hm-modal-text: #f4f0ea;
	--hm-modal-muted: rgba(244, 240, 234, 0.62);
	--hm-modal-accent: #de5a18;
	--hm-modal-cream: #f4f0ea;
	--hm-book-ease: cubic-bezier(0.22, 1, 0.36, 1);
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}

.hm-book[hidden] {
	display: none !important;
}

.hm-book .hm-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 7, 7, 0.78);
	backdrop-filter: blur(6px);
}

.hm-book__dialog {
	position: relative;
	z-index: 1;
	width: min(640px, 100%);
	max-height: min(92vh, 880px);
	overflow: auto;
	background:
		radial-gradient(120% 80% at 100% 0%, rgba(222, 90, 24, 0.12), transparent 55%),
		var(--hm-modal-bg);
	color: var(--hm-modal-text);
	border: 1px solid var(--hm-modal-border);
	box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
	padding: 2rem 1.75rem 1.6rem;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.hm-book.hm-modal--open {
	animation: hm-book-fade 0.28s var(--hm-book-ease);
}

.hm-book.hm-modal--open .hm-book__dialog {
	animation: hm-book-rise 0.38s var(--hm-book-ease);
}

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

@keyframes hm-book-rise {
	from { opacity: 0; transform: translateY(14px) scale(0.985); }
	to { opacity: 1; transform: none; }
}

.hm-book .hm-modal__close {
	position: absolute;
	top: 0.85rem;
	right: 0.85rem;
	width: 2.25rem;
	height: 2.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--hm-modal-border) !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-image: none !important;
	color: var(--hm-modal-cream) !important;
	font-size: 1.45rem;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	box-shadow: none !important;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.hm-book .hm-modal__close:hover,
.hm-book .hm-modal__close:focus-visible {
	border-color: rgba(222, 90, 24, 0.85) !important;
	color: var(--hm-modal-accent) !important;
}

.hm-book .hm-modal__eyebrow {
	margin: 0 0 0.45rem;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hm-modal-accent);
}

.hm-book .hm-modal__title {
	margin: 0 0 0.45rem;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(1.75rem, 3.5vw, 2.25rem);
	font-weight: 500;
	line-height: 1.15;
	color: var(--hm-modal-cream);
}

.hm-book .hm-modal__subtitle {
	margin: 0 0 1.15rem;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.92rem;
	line-height: 1.5;
	color: var(--hm-modal-muted);
	max-width: 38em;
}

.hm-book__progress {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.4rem;
	list-style: none;
	margin: 0 0 1.35rem;
	padding: 0;
}

.hm-book__progress-item {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(244, 240, 234, 0.35);
	padding-bottom: 0.45rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hm-book__progress-item span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.25rem;
	height: 1.25rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	font-size: 0.65rem;
}

.hm-book__progress-item.is-active,
.hm-book__progress-item.is-done {
	color: var(--hm-modal-cream);
	border-bottom-color: rgba(222, 90, 24, 0.85);
}

.hm-book__progress-item.is-active span,
.hm-book__progress-item.is-done span {
	border-color: var(--hm-modal-accent);
	color: var(--hm-modal-accent);
}

.hm-book__step-title {
	margin: 0 0 0.95rem;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 1.35rem;
	font-weight: 500;
	color: var(--hm-modal-cream);
}

.hm-book__step[hidden] {
	display: none !important;
}

.hm-book__type-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem;
}

.hm-book__type {
	text-align: left;
	padding: 0.9rem 0.95rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: var(--hm-modal-surface);
	color: var(--hm-modal-cream);
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.hm-book__type:hover,
.hm-book__type:focus-visible {
	border-color: rgba(222, 90, 24, 0.7);
	outline: none;
}

.hm-book__type[aria-selected="true"] {
	border-color: var(--hm-modal-accent);
	background: rgba(222, 90, 24, 0.1);
	box-shadow: inset 0 0 0 1px rgba(222, 90, 24, 0.35);
}

.hm-book__type-label {
	display: block;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.82rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin-bottom: 0.28rem;
}

.hm-book__type-desc {
	display: block;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.8rem;
	line-height: 1.4;
	color: var(--hm-modal-muted);
}

.hm-book__datetime {
	display: grid;
	gap: 0.55rem;
}

.hm-book__label {
	margin: 0.35rem 0 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(244, 240, 234, 0.55);
}

.hm-book__date-input,
.hm-book .wpcf7 input.wpcf7-form-control,
.hm-book .wpcf7 select.wpcf7-form-control,
.hm-book .wpcf7 textarea.wpcf7-form-control {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: var(--hm-modal-surface);
	color: var(--hm-modal-cream);
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.9rem;
	line-height: 1.35;
	padding: 0.62rem 0.75rem;
	border-radius: 0;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hm-book__date-input:focus,
.hm-book .wpcf7 input.wpcf7-form-control:focus,
.hm-book .wpcf7 select.wpcf7-form-control:focus,
.hm-book .wpcf7 textarea.wpcf7-form-control:focus {
	border-color: rgba(222, 90, 24, 0.85);
	box-shadow: 0 0 0 1px rgba(222, 90, 24, 0.45);
	background: #1f1c1a;
}

.hm-book__hint {
	margin: 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.75rem;
	color: rgba(244, 240, 234, 0.4);
}

.hm-book__slots {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.5rem;
	margin-top: 0.15rem;
}

.hm-book__slot {
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: var(--hm-modal-surface);
	color: var(--hm-modal-cream);
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.82rem;
	font-weight: 600;
	padding: 0.65rem 0.4rem;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hm-book__slot:hover,
.hm-book__slot:focus-visible {
	border-color: rgba(222, 90, 24, 0.7);
	outline: none;
}

.hm-book__slot[aria-selected="true"] {
	border-color: var(--hm-modal-accent);
	background: rgba(222, 90, 24, 0.14);
	color: #fff;
}

.hm-book__slot:disabled,
.hm-book__slot[aria-disabled="true"] {
	opacity: 0.35;
	cursor: not-allowed;
}

.hm-book__slots-empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 0.85rem 0.75rem;
	border: 1px dashed rgba(255, 255, 255, 0.14);
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.85rem;
	color: var(--hm-modal-muted);
}

.hm-book .hm-cf7-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.65rem 0.85rem;
}

.hm-book .hm-cf7-field {
	display: flex;
	flex-direction: column;
	gap: 0.22rem;
	min-width: 0;
}

.hm-book .hm-cf7-field--full,
.hm-book .hm-cf7-actions {
	grid-column: 1 / -1;
}

.hm-book .hm-cf7-field label {
	display: block;
	margin: 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(244, 240, 234, 0.55);
}

.hm-book .wpcf7,
.hm-book .wpcf7-form,
.hm-book .wpcf7-form > p,
.hm-book .hm-cf7-field p {
	margin: 0;
}

.hm-book .hm-cf7-field br {
	display: none;
}

.hm-book .wpcf7-form-control-wrap {
	display: block;
}

.hm-book .wpcf7 select.wpcf7-form-control {
	background-image:
		linear-gradient(45deg, transparent 50%, rgba(244, 240, 234, 0.55) 50%),
		linear-gradient(135deg, rgba(244, 240, 234, 0.55) 50%, transparent 50%);
	background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px);
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 2rem;
	cursor: pointer;
}

.hm-book .wpcf7 select.wpcf7-form-control option {
	background: #1a1816;
	color: #f4f0ea;
}

.hm-book .wpcf7 textarea.wpcf7-form-control {
	min-height: 78px;
	resize: vertical;
}

.hm-book .wpcf7-not-valid-tip {
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.72rem;
	color: #ff8f6b;
	margin-top: 0.2rem;
}

.hm-book .wpcf7-response-output {
	margin: 0.85rem 0 0;
	padding: 0.75rem 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.85rem;
	line-height: 1.45;
	color: var(--hm-modal-cream);
}

.hm-book .wpcf7-form.sent .wpcf7-response-output {
	border-color: rgba(222, 90, 24, 0.55);
	background: rgba(222, 90, 24, 0.1);
}

.hm-book__summary {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem 1rem;
	margin: 0 0 1rem;
	padding: 1rem;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.03);
}

.hm-book__summary > div {
	min-width: 0;
}

.hm-book__summary dt {
	margin: 0 0 0.2rem;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(244, 240, 234, 0.45);
}

.hm-book__summary dd {
	margin: 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.92rem;
	color: var(--hm-modal-cream);
	word-break: break-word;
}

.hm-book__confirm-note {
	margin: 0 0 1rem;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.85rem;
	line-height: 1.45;
	color: var(--hm-modal-muted);
}

.hm-book__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-top: 1.2rem;
}

.hm-book__btn {
	appearance: none;
	border-radius: 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.82rem;
	font-weight: 650;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.78rem 1.15rem;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.hm-book__btn--primary {
	flex: 1 1 auto;
	border: 1px solid var(--hm-modal-cream);
	background: var(--hm-modal-cream);
	color: #0e0d0d;
}

.hm-book__btn--primary:hover,
.hm-book__btn--primary:focus-visible {
	background: #fff;
	border-color: #fff;
	outline: none;
}

.hm-book__btn--ghost {
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: transparent;
	color: var(--hm-modal-cream);
}

.hm-book__btn--ghost:hover,
.hm-book__btn--ghost:focus-visible {
	border-color: rgba(222, 90, 24, 0.85);
	color: var(--hm-modal-accent);
	outline: none;
}

.hm-book__btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.hm-book__step-error {
	margin: 0.75rem 0 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.8rem;
	color: #ff8f6b;
}

.hm-book__form-shell {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* When step 3 is active, CF7 contact fields are cloned/shown in mount — keep shell for submit */
.hm-book__cf7-mount .hm-cf7-field[data-hm-book-field="type"],
.hm-book__cf7-mount .hm-cf7-field[data-hm-book-field="date"],
.hm-book__cf7-mount .hm-cf7-field[data-hm-book-field="time"],
.hm-book__cf7-mount .hm-cf7-actions {
	display: none !important;
}

.hm-book .hm-modal__fallback {
	font-family: Manrope, system-ui, sans-serif;
	color: var(--hm-modal-muted);
	line-height: 1.5;
}

html.hm-modal-lock,
html.hm-modal-lock body {
	overflow: hidden;
}

@media (max-width: 640px) {
	.hm-book {
		padding: 0.65rem;
		align-items: flex-end;
	}

	.hm-book__dialog {
		width: 100%;
		max-height: 94vh;
		padding: 1.4rem 1.05rem 1.15rem;
	}

	.hm-book__progress {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 0.25rem;
	}

	.hm-book__progress-item {
		font-size: 0;
		justify-content: center;
		gap: 0;
	}

	.hm-book__progress-item span {
		font-size: 0.65rem;
	}

	.hm-book__type-grid,
	.hm-book__slots,
	.hm-book .hm-cf7-grid,
	.hm-book__summary {
		grid-template-columns: 1fr;
	}

	.hm-book__nav {
		flex-direction: column-reverse;
	}

	.hm-book__btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hm-book.hm-modal--open,
	.hm-book.hm-modal--open .hm-book__dialog {
		animation: none;
	}
}
