/*
 * HestaHub: structural CSS only. No colours, fonts or spacing opinions:
 * the theme sets those. A theme sets these custom properties, on .hestahub
 * or anywhere above it:
 *
 *   --hestahub-gap              Space between cards and calendar months.
 *   --hestahub-day-free         Background of a free day.
 *   --hestahub-day-booked       Background of a booked night.
 *   --hestahub-day-arrival      Background of a day a stay starts.
 *   --hestahub-day-departure    Background of a day a stay ends.
 *   --hestahub-day-changeover   Background of a day one stay ends and another starts.
 *   --hestahub-day-past         Background of a day before today.
 *   --hestahub-day-unknown      Background of a day outside what is known.
 *
 * Unset, every day state is transparent; the calendar then tells booked
 * from free by its markup alone.
 */

.hestahub {
	box-sizing: border-box;
}

.hestahub *,
.hestahub *::before,
.hestahub *::after {
	box-sizing: inherit;
}

.hestahub img {
	max-width: 100%;
	height: auto;
}

.hestahub-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
	gap: var(--hestahub-gap, 1.5rem);
}

.hestahub-table-wrap {
	overflow-x: auto;
}

.hestahub-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
	gap: var(--hestahub-gap, 1.5rem);
}

.hestahub figure {
	margin: 0;
}

.hestahub-bundle-terms {
	display: block;
	font-weight: normal;
}

.hestahub table {
	border-collapse: collapse;
	width: 100%;
}

.hestahub-months {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
	gap: var(--hestahub-gap, 1.5rem);
}

.hestahub table.hestahub-month {
	table-layout: fixed;
}

.hestahub-month td,
.hestahub-month th {
	text-align: center;
}

.hestahub-calendar-nav {
	display: flex;
	justify-content: space-between;
	gap: var(--hestahub-gap, 1.5rem);
}

.hestahub-calendar-next {
	margin-inline-start: auto;
}

.hestahub-legend {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}

.hestahub-legend-swatch {
	display: inline-block;
	width: 1em;
	height: 1em;
	vertical-align: middle;
	border: 1px solid;
}

.hestahub-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hestahub-day--free {
	background: var(--hestahub-day-free, transparent);
}

.hestahub-day--booked {
	background: var(--hestahub-day-booked, transparent);
}

.hestahub-day--arrival {
	background: var(--hestahub-day-arrival, transparent);
}

.hestahub-day--departure {
	background: var(--hestahub-day-departure, transparent);
}

.hestahub-day--changeover {
	background: var(--hestahub-day-changeover, transparent);
}

.hestahub-day--past {
	background: var(--hestahub-day-past, transparent);
}

.hestahub-day--unknown {
	background: var(--hestahub-day-unknown, transparent);
}

/* The calendar script's announcements: read by screen readers, not shown. */
.hestahub-live {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
