/* Grass Booking — inherits the theme's fonts and text colour. Tune per site with the
   custom properties below (set them on .gb-booking in the theme's CSS). */
.gb-booking {
	--gb-accent: var(--wp--preset--color--primary, #22543d);
	--gb-accent-text: #fff;
	--gb-range: color-mix(in srgb, var(--gb-accent) 16%, transparent);
	--gb-taken: color-mix(in srgb, currentColor 8%, transparent);
	--gb-border: color-mix(in srgb, currentColor 22%, transparent);
	--gb-radius: 0.5rem;
	max-width: 46rem;
	margin-inline: auto;
}

.gb-booking [hidden] { display: none !important; }

.gb-booking button { font: inherit; }

.gb-cal-nav {
	display: flex;
	justify-content: space-between;
	margin-bottom: -2.4rem;
	position: relative;
	z-index: 1;
	pointer-events: none;
}
.gb-cal-nav button {
	pointer-events: auto;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid var(--gb-border);
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}
.gb-cal-nav button:disabled { opacity: 0.35; cursor: default; }

.gb-months {
	display: grid;
	gap: 1.5rem;
	min-height: 18rem;
}
.gb-months[data-count="2"] { grid-template-columns: 1fr 1fr; }

.gb-month { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0; }
.gb-month caption {
	font-weight: 600;
	text-transform: capitalize;
	line-height: 2.75rem;
	margin-bottom: 0.25rem;
}
.gb-month th {
	font-size: 0.8em;
	font-weight: 500;
	text-align: center;
	padding: 0 0 0.25rem;
	border: 0;
	text-transform: capitalize;
}
.gb-month td { padding: 1px; border: 0; text-align: center; }

.gb-day {
	width: 100%;
	aspect-ratio: 1;
	min-height: 2.5rem;
	max-height: 3rem;
	border: 0;
	border-radius: var(--gb-radius);
	background: transparent;
	color: inherit;
	cursor: pointer;
	font-variant-numeric: tabular-nums;
}
.gb-day:not(:disabled):hover { outline: 2px solid var(--gb-accent); outline-offset: -2px; }
.gb-day:focus-visible { outline: 3px solid var(--gb-accent); outline-offset: 1px; }
.gb-day:disabled { cursor: default; opacity: 0.45; }
.gb-day.gb-past { opacity: 0.3; }
.gb-day.gb-taken { background: var(--gb-taken); text-decoration: line-through; }
.gb-day.gb-depart-only { background: linear-gradient(135deg, transparent 50%, var(--gb-taken) 50%); }
.gb-day.gb-today { font-weight: 700; }
.gb-day.gb-in-range { background: var(--gb-range); border-radius: 0; opacity: 1; }
.gb-day.gb-sel { background: var(--gb-accent); color: var(--gb-accent-text); opacity: 1; font-weight: 600; text-decoration: none; }

.gb-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.25rem;
	list-style: none;
	padding: 0;
	margin: 1rem 0 0;
	font-size: 0.875em;
}
.gb-legend li { display: flex; align-items: center; gap: 0.4rem; margin: 0; }
.gb-swatch { width: 1rem; height: 1rem; border-radius: 0.25rem; border: 1px solid var(--gb-border); }
.gb-swatch-taken { background: var(--gb-taken); }
.gb-swatch-selected { background: var(--gb-accent); border-color: var(--gb-accent); }

.gb-status { margin: 0.75rem 0 0; font-weight: 500; }

.gb-form { margin-top: 1.5rem; display: grid; gap: 0.25rem; }
.gb-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; }
.gb-stay { margin: 0; font-weight: 600; }
.gb-link {
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.gb-field { margin: 0.5rem 0 0; display: grid; gap: 0.3rem; }
.gb-field label { font-weight: 500; }
.gb-field input,
.gb-field select,
.gb-field textarea {
	font: inherit;
	color: inherit;
	background: transparent;
	border: 1px solid var(--gb-border);
	border-radius: var(--gb-radius);
	padding: 0.65rem 0.8rem;
	width: 100%;
	box-sizing: border-box;
}
.gb-field select { max-width: 8rem; }
.gb-field input:focus-visible,
.gb-field select:focus-visible,
.gb-field textarea:focus-visible { outline: 3px solid var(--gb-accent); outline-offset: 1px; }
.gb-check { grid-template-columns: auto 1fr; align-items: start; gap: 0.6rem; }
.gb-check input { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; }
.gb-check label { font-weight: 400; }

.gb-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.gb-price { width: 100%; border-collapse: collapse; margin: 1rem 0 0.5rem; }
.gb-price th,
.gb-price td { padding: 0.35rem 0; border: 0; border-bottom: 1px solid var(--gb-border); font-weight: 400; text-align: left; }
.gb-price td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gb-price tfoot th,
.gb-price tfoot td { font-weight: 700; border-bottom: 0; padding-top: 0.6rem; }

.gb-error {
	margin: 0.75rem 0 0;
	padding: 0.75rem 1rem;
	border-left: 4px solid #b42318;
	background: color-mix(in srgb, #b42318 8%, transparent);
	border-radius: 0 var(--gb-radius) var(--gb-radius) 0;
}

.gb-actions { margin: 1rem 0 0; }
/* The submit button is a .wp-element-button, so it looks like the theme's own buttons.
   These are only fallbacks (zero specificity) for themes without button styles. */
:where(.gb-booking .gb-submit) {
	background: var(--gb-accent);
	color: var(--gb-accent-text);
	border: 0;
	border-radius: var(--gb-radius);
	padding: 0.85rem 1.6rem;
	font-weight: 600;
}
.gb-submit { cursor: pointer; min-height: 2.75rem; }
.gb-submit:disabled { opacity: 0.7; cursor: wait; }
.gb-small { font-size: 0.875em; margin: 0.5rem 0 0; }

/* Search over all accommodations: the free ones, each with its price and a choose button. */
.gb-details { display: grid; gap: 0.25rem; }
.gb-results { margin-top: 0.75rem; }
.gb-searching,
.gb-none,
.gb-found { margin: 0.25rem 0 0.5rem; }
.gb-none { font-weight: 500; }
.gb-result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.gb-result {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem 1.25rem;
	margin: 0;
	padding: 0.9rem 1rem;
	border: 1px solid var(--gb-border);
	border-radius: var(--gb-radius);
}
.gb-result.gb-chosen { border-color: var(--gb-accent); box-shadow: inset 0 0 0 1px var(--gb-accent); }
.gb-result p { margin: 0; }
.gb-result-name { font-weight: 600; font-size: 1.1em; }
.gb-result-meta { font-size: 0.875em; }
.gb-result-side { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-left: auto; }
.gb-result-price { text-align: right; font-variant-numeric: tabular-nums; }
.gb-result-price span { display: block; font-size: 0.8em; }
.gb-choose {
	min-height: 2.75rem;
	padding: 0.5rem 1.2rem;
	border: 1px solid var(--gb-accent);
	border-radius: var(--gb-radius);
	background: transparent;
	color: inherit;
	font-weight: 600;
	cursor: pointer;
}
.gb-choose[aria-pressed="true"] { background: var(--gb-accent); color: var(--gb-accent-text); }
.gb-choose:focus-visible { outline: 3px solid var(--gb-accent); outline-offset: 2px; }
.gb-quote-title { margin: 1rem 0 0; font-weight: 600; }
.gb-quote-title + .gb-price { margin-top: 0.25rem; }
.gb-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.gb-done { padding: 1.5rem; border: 1px solid var(--gb-border); border-radius: var(--gb-radius); }
.gb-done:focus { outline: none; }
.gb-done-title { font-size: 1.25em; font-weight: 700; margin-top: 0; }
.gb-payment { white-space: normal; }
