/* Horotiu booking form. Uses theme tokens with fallbacks. */

.hhb-book,
.hhb-bar {
	--b-forest: var(--hh-forest, #1F3A2E);
	--b-forest-deep: var(--hh-forest-deep, #15281F);
	--b-leaf: var(--hh-leaf, #3F6B4F);
	--b-leaf-soft: var(--hh-leaf-soft, #DCE5DA);
	--b-gold: var(--hh-gold, #B8924A);
	--b-paper: var(--hh-paper, #FAF7F0);
	--b-white: #fff;
	--b-ink: var(--hh-ink, #18201B);
	--b-muted: var(--hh-muted, #5B665E);
	--b-line: var(--hh-line, #E2DACA);
	--b-error: var(--hh-error, #A2412F);
	--b-radius: var(--hh-radius, 10px);
	--b-radius-lg: var(--hh-radius-lg, 18px);
	--b-display: var(--hh-font-display, Georgia, serif);
	color: var(--b-ink);
}

/* ---------------- Calendar ---------------- */
.hhb-cal { position: relative; }
.hhb-cal__nav {
	position: absolute;
	top: -4px;
	left: 0;
	right: 0;
	display: flex;
	justify-content: space-between;
	pointer-events: none;
}
.hhb-cal__arrow {
	pointer-events: auto;
	width: 38px;
	height: 38px;
	border: 1px solid var(--b-line);
	border-radius: 50%;
	background: var(--b-white);
	color: var(--b-forest);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}
.hhb-cal__arrow:hover:not(:disabled) { border-color: var(--b-forest); }
.hhb-cal__arrow:disabled { opacity: 0.35; cursor: default; }
.hhb-cal__months { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2.5rem; }
.hhb-cal__title {
	margin: 0 0 1rem;
	text-align: center;
	font-family: var(--b-display);
	font-size: 1.2rem;
	color: var(--b-forest);
	line-height: 30px;
}
.hhb-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; }
.hhb-cal__dow {
	padding-bottom: 0.5rem;
	text-align: center;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--b-muted);
}
.hhb-cal__day {
	position: relative;
	aspect-ratio: 1 / 1;
	min-height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--b-ink);
	font: inherit;
	font-size: 0.95rem;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
}
.hhb-cal__day:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--b-forest); }
.hhb-cal__day:focus-visible { outline: 2px solid var(--b-gold); outline-offset: 1px; }
.hhb-cal__day:disabled { cursor: default; }
.hhb-cal__day.is-past { color: #B9BDB6; }
.hhb-cal__day.is-taken {
	color: #9AA39C;
	text-decoration: line-through;
	text-decoration-thickness: 1px;
	background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(91, 102, 94, 0.09) 5px 7px);
	border-radius: 0;
}
.hhb-cal__day.is-today::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 6px;
	width: 4px;
	height: 4px;
	margin-left: -2px;
	border-radius: 50%;
	background: var(--b-gold);
}
.hhb-cal__day.is-range { background: var(--b-leaf-soft); border-radius: 0; color: var(--b-forest-deep); text-decoration: none; }
.hhb-cal__day.is-start,
.hhb-cal__day.is-end {
	background: var(--b-forest);
	color: var(--b-white);
	text-decoration: none;
	border-radius: 50%;
}
.hhb-cal__day.is-start::after,
.hhb-cal__day.is-end::after { background: var(--b-gold); }
.hhb-cal__day.is-preview { background: var(--b-leaf); }

/* ---------------- Steppers ---------------- */
.hhb-stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--b-line);
}
.hhb-stepper:last-of-type { border-bottom: 0; }
.hhb-stepper__text { display: grid; }
.hhb-stepper__label { font-weight: 600; }
.hhb-stepper__hint { font-size: 0.875rem; color: var(--b-muted); }
.hhb-stepper__controls { display: flex; align-items: center; gap: 0.75rem; }
.hhb-stepper__btn {
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--b-line);
	border-radius: 50%;
	background: var(--b-white);
	color: var(--b-forest);
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}
.hhb-stepper__btn:hover:not(:disabled) { border-color: var(--b-forest); }
.hhb-stepper__btn:disabled { opacity: 0.35; cursor: default; }
.hhb-stepper__value { min-width: 2.2ch; text-align: center; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------------- Full form layout ---------------- */
.hhb-book {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: clamp(1.5rem, 3vw, 3rem);
	align-items: start;
}
.hhb-book__main { display: grid; gap: 1.5rem; }
.hhb-panel {
	padding: clamp(1.25rem, 3vw, 2rem);
	background: var(--b-white);
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius-lg);
}
.hhb-panel__head { margin-bottom: 1.5rem; }
.hhb-panel__title { margin: 0 0 0.35rem; font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.85rem); }
.hhb-panel__hint { margin: 0; color: var(--b-muted); font-size: 0.95rem; }
.hhb-panel .hhb-cal { margin-top: 0.5rem; }

.hhb-legend { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.5rem; font-size: 0.85rem; color: var(--b-muted); }
.hhb-legend span { display: inline-flex; align-items: center; gap: 0.5rem; }
.hhb-legend__swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--b-line); background: var(--b-white); }
.hhb-legend__swatch--taken { background: repeating-linear-gradient(135deg, #fff 0 3px, rgba(91, 102, 94, 0.3) 3px 4px); }
.hhb-legend__swatch--picked { background: var(--b-forest); border-color: var(--b-forest); }

/* Summary */
/* Sticky only when the whole card fits on screen, so the button is always reachable. */
@media (min-width: 961px) and (min-height: 820px) {
	.hhb-summary { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--hh-header-h, 76px) + 1.5rem); }
}
.hhb-summary__card {
	overflow: hidden;
	background: var(--b-white);
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius-lg);
	box-shadow: var(--hh-shadow-panel, 0 18px 40px -18px rgba(21, 40, 31, 0.28));
}
.hhb-summary__img { display: block; width: 100%; aspect-ratio: 5 / 2; object-fit: cover; object-position: center 60%; }
.hhb-summary__body { padding: 1.5rem; }
.hhb-summary__title { margin: 0; font-size: 1.5rem; }
.hhb-summary__place { margin: 0.2rem 0 1.25rem; color: var(--b-muted); font-size: 0.9rem; }
.hhb-summary__facts { display: grid; gap: 0.6rem; margin: 0 0 1.25rem; padding: 1rem 0; border-top: 1px solid var(--b-line); border-bottom: 1px solid var(--b-line); }
.hhb-summary__facts div { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0.75rem; }
.hhb-summary__facts dt { color: var(--b-muted); font-size: 0.9rem; }
.hhb-summary__facts dd { margin: 0; font-weight: 500; font-size: 0.95rem; }
.hhb-summary__prompt { margin: 0 0 1rem; color: var(--b-muted); }
.hhb-line { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; font-variant-numeric: tabular-nums; }
.hhb-line--total {
	margin-top: 0.5rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--b-line);
	font-weight: 700;
	font-size: 1.1rem;
}
.hhb-line--total span:last-child { font-family: var(--b-display); font-weight: 400; font-size: 1.5rem; color: var(--b-forest); }
.hhb-summary__small { margin: 0.5rem 0 1rem; font-size: 0.85rem; color: var(--b-muted); }
.hhb-summary__error {
	margin: 0 0 1rem;
	padding: 0.75rem 0.9rem;
	border-left: 3px solid var(--b-error);
	background: #FBEFEC;
	color: var(--b-error);
	font-size: 0.9rem;
}
.hhb-summary__cta { width: 100%; padding: 1em; font-size: 1rem; }
.hhb-summary__cta:disabled { opacity: 0.5; cursor: not-allowed; }
.hhb-summary__notes { margin: 1.25rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.4rem; font-size: 0.85rem; color: var(--b-muted); }
.hhb-summary__notes li { padding-left: 1rem; position: relative; }
.hhb-summary__notes li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 5px; height: 5px; border-radius: 50%; background: var(--b-gold); }

/* Mobile bottom bar */
.hhb-mobilebar { display: none; }

@media (max-width: 960px) {
	.hhb-book { grid-template-columns: 1fr; }
	.hhb-summary { position: static; }
	.hhb-mobilebar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 40;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1rem;
		padding: 0.8rem var(--hh-gutter, 16px) calc(0.8rem + env(safe-area-inset-bottom));
		background: var(--b-white);
		border-top: 1px solid var(--b-line);
		box-shadow: 0 -8px 24px -12px rgba(21, 40, 31, 0.25);
		transition: transform 0.25s ease;
	}
	.hhb-mobilebar.is-hidden { transform: translateY(110%); }
	.hhb-mobilebar__text { display: grid; line-height: 1.3; }
	.hhb-mobilebar__text strong { font-size: 1.1rem; }
	.hhb-mobilebar__text span { font-size: 0.85rem; color: var(--b-muted); }
	.hhb-mobilebar .hh-btn:disabled { opacity: 0.5; }
	.hhb-book { padding-bottom: 5rem; }
}

/* ---------------- Compact bar (hero) ---------------- */
.hhb-bar {
	position: relative;
	display: grid;
	grid-template-columns: 2fr 1fr auto;
	align-items: stretch;
	max-width: 860px;
	padding: 0.5rem;
	background: var(--b-white);
	border-radius: var(--b-radius-lg);
	box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.45);
}
.hhb-bar__field { position: relative; display: flex; }
.hhb-bar__dates .hhb-bar__trigger + .hhb-bar__trigger { border-left: 1px solid var(--b-line); }
.hhb-bar__guests { border-left: 1px solid var(--b-line); }
.hhb-bar__trigger {
	flex: 1;
	display: grid;
	gap: 0.1rem;
	padding: 0.7rem 1.1rem;
	border: 0;
	border-radius: var(--b-radius);
	background: none;
	color: var(--b-ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.hhb-bar__trigger:hover,
.hhb-bar__trigger[aria-expanded="true"] { background: var(--b-paper); }
.hhb-bar__label { font-size: 0.8rem; font-weight: 600; color: var(--b-muted); }
.hhb-bar__value { font-size: 1rem; font-weight: 500; white-space: nowrap; }
.hhb-bar__submit { margin-left: 0.5rem; padding: 0 1.6rem; font-size: 1rem; }

.hhb-pop {
	position: absolute;
	top: calc(100% + 0.75rem);
	left: 0;
	z-index: 30;
	padding: 1.25rem;
	background: var(--b-white);
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius-lg);
	box-shadow: 0 24px 48px -20px rgba(21, 40, 31, 0.4);
	color: var(--b-ink);
}
.hhb-pop[hidden] { display: none; }
.hhb-pop--calendar { width: min(680px, calc(100vw - 2rem)); }
.hhb-pop--guests { width: 320px; right: 0; left: auto; }
.hhb-pop__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--b-line); }
.hhb-link { padding: 0; border: 0; background: none; color: var(--b-forest); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }

@media (max-width: 720px) {
	.hhb-bar { grid-template-columns: 1fr; gap: 0.25rem; }
	.hhb-bar__guests { border-left: 0; border-top: 1px solid var(--b-line); }
	.hhb-bar__submit { margin: 0.25rem 0 0; padding: 1em; }
	.hhb-pop { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 85vh; overflow: auto; border-radius: var(--b-radius-lg) var(--b-radius-lg) 0 0; }
	.hhb-pop--calendar,
	.hhb-pop--guests { width: auto; }
}

/* ---------------- Theme button reset ----------------
 * Astra styles every <button> globally (fill colour, focus colour, padding).
 * These rules keep the booking controls on their own styles in every state. */
.hhb-book button,
.hhb-bar button {
	font-family: inherit;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
}
.hhb-cal button.hhb-cal__day,
.hhb-cal button.hhb-cal__day:hover,
.hhb-cal button.hhb-cal__day:focus {
	padding: 0;
	border: 0;
	background-color: transparent;
	color: var(--b-ink);
	font-weight: 400;
	line-height: 1;
}
.hhb-cal button.hhb-cal__day:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--b-forest); }
.hhb-cal button.hhb-cal__day.is-past { color: #B9BDB6; }
.hhb-cal button.hhb-cal__day.is-taken {
	color: #9AA39C;
	background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(91, 102, 94, 0.09) 5px 7px);
}
.hhb-cal button.hhb-cal__day.is-range { background: var(--b-leaf-soft); color: var(--b-forest-deep); }
.hhb-cal button.hhb-cal__day.is-start,
.hhb-cal button.hhb-cal__day.is-end { background: var(--b-forest); color: var(--b-white); }
.hhb-cal button.hhb-cal__day.is-preview { background: var(--b-leaf); color: var(--b-white); }

.hhb-cal button.hhb-cal__arrow,
.hhb-cal button.hhb-cal__arrow:hover,
.hhb-cal button.hhb-cal__arrow:focus,
.hhb-book button.hhb-stepper__btn,
.hhb-book button.hhb-stepper__btn:hover,
.hhb-book button.hhb-stepper__btn:focus,
.hhb-bar button.hhb-stepper__btn,
.hhb-bar button.hhb-stepper__btn:hover,
.hhb-bar button.hhb-stepper__btn:focus {
	padding: 0;
	border: 1px solid var(--b-line);
	border-radius: 50%;
	background-color: var(--b-white);
	color: var(--b-forest);
	line-height: 1;
}
.hhb-cal button.hhb-cal__arrow:hover:not(:disabled),
.hhb-book button.hhb-stepper__btn:hover:not(:disabled),
.hhb-bar button.hhb-stepper__btn:hover:not(:disabled) { border-color: var(--b-forest); }

.hhb-bar button.hhb-bar__trigger,
.hhb-bar button.hhb-bar__trigger:focus {
	padding: 0.7rem 1.1rem;
	border: 0;
	background-color: transparent;
	color: var(--b-ink);
	font-weight: 400;
}
.hhb-bar button.hhb-bar__trigger:hover,
.hhb-bar button.hhb-bar__trigger[aria-expanded="true"] { background-color: var(--b-paper); }

.hhb-bar button.hhb-link,
.hhb-bar button.hhb-link:hover,
.hhb-bar button.hhb-link:focus {
	padding: 0;
	border: 0;
	background: none;
	color: var(--b-forest);
	font-weight: 400;
}
.hhb-book button:focus-visible,
.hhb-bar button:focus-visible { outline: 2px solid var(--b-gold); outline-offset: 2px; }
