/**
 * bc-booking front-end styles. All selectors are prefixed with .bcb-.
 * Relies on the theme's Bootstrap 5 base and Poppins font; colours come
 * from the theme variables with fallbacks.
 */

/* ------------------------------------------------------------------
 * Tokens
 * ------------------------------------------------------------------ */
.bcb-app {
	--bcb-primary: var(--primary-color, rgba(173, 156, 131, 1));
	--bcb-primary-dark: rgba(140, 124, 101, 1);
	--bcb-primary-soft: rgba(173, 156, 131, 0.14);
	--bcb-text: var(--secondary-color, rgba(47, 47, 47, 1));
	--bcb-muted: rgba(47, 47, 47, 0.68);
	--bcb-light: var(--light-grey, rgba(242, 243, 245, 1));
	--bcb-border: rgba(47, 47, 47, 0.14);
	--bcb-bg: #fff;
	--bcb-busy: rgba(47, 47, 47, 0.86);
	--bcb-free: rgba(100, 204, 98, 0.2); /* Same green as the old WooCommerce calendar. */
	--bcb-free-hover: rgba(100, 204, 98, 0.38);
	--bcb-danger: #b3261e;
	--bcb-success: #2e7d4f;
	--bcb-focus: rgba(47, 47, 47, 1);
	--bcb-radius: 10px;
	--bcb-radius-sm: 6px;
	--bcb-hour: 44px;
	--bcb-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);

	color: var(--bcb-text);
	font-family: inherit;
	line-height: 1.5;

	/* Space below the theme's fixed navbar and above the footer (theme .section-padding rhythm). */
	padding-top: 24px;
	padding-bottom: 56px;
}

@media (min-width: 992px) {
	.bcb-app {
		padding-top: 40px;
		padding-bottom: 80px;
	}
}

.bcb-app *,
.bcb-app *::before,
.bcb-app *::after {
	box-sizing: border-box;
}

.bcb-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.bcb-app [hidden] {
	display: none !important;
}

.bcb-icon {
	width: 1.25em;
	height: 1.25em;
	fill: currentColor;
	flex: none;
}

/* Text links in the site's primary colour */
.bcb-app a:not(.bcb-btn):not(.bcb-tabs__tab),
.bcb-dialog a:not(.bcb-btn) {
	color: var(--bcb-primary);
}

.bcb-app a:not(.bcb-btn):not(.bcb-tabs__tab):hover,
.bcb-dialog a:not(.bcb-btn):hover {
	color: var(--bcb-text);
}

/* Visible focus for every interactive element */
.bcb-app :is(button, a, [tabindex]):focus-visible,
.bcb-dialog :is(button, a, [tabindex]):focus-visible {
	outline: 2px solid var(--bcb-focus);
	outline-offset: 2px;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9);
}

/* ------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------ */
.bcb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	min-height: 44px;
	padding: 0.55rem 1.25rem;
	border: 1px solid transparent;
	border-radius: var(--bcb-radius-sm);
	font: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bcb-btn:disabled,
.bcb-btn[aria-disabled='true'] {
	opacity: 0.5;
	cursor: not-allowed;
}

.bcb-btn--primary {
	background: var(--bcb-primary);
	border-color: var(--bcb-primary);
	color: #fff; /* Same as the theme's beige buttons. */
}

.bcb-btn--primary:hover:not(:disabled) {
	background: var(--bcb-text); /* Footer colour of the theme. */
	border-color: var(--bcb-text);
	color: #fff;
}

.bcb-btn--secondary {
	background: var(--bcb-bg);
	border-color: var(--bcb-text);
	color: var(--bcb-text);
}

.bcb-btn--secondary:hover:not(:disabled) {
	background: var(--bcb-text);
	border-color: var(--bcb-text);
	color: #fff;
}

.bcb-btn--ghost {
	background: transparent;
	border-color: var(--bcb-border);
	color: var(--bcb-text);
}

.bcb-btn--ghost:hover:not(:disabled) {
	background: var(--bcb-text);
	border-color: var(--bcb-text);
	color: #fff;
}

.bcb-btn--danger {
	background: var(--bcb-danger);
	border-color: var(--bcb-danger);
	color: #fff;
}

.bcb-btn--danger:hover:not(:disabled) {
	background: #8f1e18;
}

.bcb-btn--sm {
	min-height: 40px;
	padding: 0.4rem 0.9rem;
	font-size: 0.875rem;
}

.bcb-btn--icon {
	width: 44px;
	padding: 0;
}

.bcb-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.bcb-actions--center {
	justify-content: center;
}

/* ------------------------------------------------------------------
 * Tabs
 * ------------------------------------------------------------------ */
.bcb-tabs {
	display: flex;
	gap: 0.25rem;
	margin-bottom: 1.5rem;
	padding: 0.25rem;
	background: var(--bcb-light);
	border-radius: var(--bcb-radius);
	overflow-x: auto;
}

.bcb-tabs__tab {
	flex: 1 1 auto;
	min-height: 44px;
	padding: 0.5rem 1rem;
	border: 0;
	border-radius: var(--bcb-radius-sm);
	background: transparent;
	color: var(--bcb-muted);
	font: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
}

.bcb-tabs__tab:hover {
	color: var(--bcb-text);
}

.bcb-tabs__tab[aria-selected='true'] {
	background: var(--bcb-bg);
	color: var(--bcb-text);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (max-width: 575.98px) {
	.bcb-tabs__tab {
		flex: 1 1 0;
		padding: 0.4rem 0.35rem;
		font-size: 0.85rem;
		line-height: 1.2;
		white-space: normal;
	}
}

@media (min-width: 576px) {
	.bcb-tabs {
		display: inline-flex;
	}

	.bcb-tabs__tab {
		flex: 0 0 auto;
	}
}

/* ------------------------------------------------------------------
 * Form fields
 * ------------------------------------------------------------------ */
.bcb-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

.bcb-label {
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--bcb-muted);
}

.bcb-input {
	width: 100%;
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--bcb-border);
	border-radius: var(--bcb-radius-sm);
	background-color: var(--bcb-bg);
	color: var(--bcb-text);
	font: inherit;
	font-size: 1rem;
}

.bcb-select {
	appearance: none;
	padding-right: 2.25rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%232f2f2f' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 12px 12px;
}

.bcb-input:hover {
	border-color: rgba(47, 47, 47, 0.35);
}

/* Form fields: no focus ring or shadow (design decision); the thin border takes the site's primary color instead. */
.bcb-app :is(input, select, textarea, .bcb-time__field):focus,
.bcb-app :is(input, select, textarea, .bcb-time__field):focus-visible,
.bcb-dialog :is(input, select, textarea, .bcb-time__field):focus,
.bcb-dialog :is(input, select, textarea, .bcb-time__field):focus-visible {
	outline: none;
	box-shadow: none;
	border-color: var(--bcb-primary);
}

.bcb-input[aria-invalid='true'] {
	border-color: var(--bcb-danger);
}

.bcb-input:disabled {
	background-color: var(--bcb-light);
	cursor: not-allowed;
}

.bcb-field-error {
	min-height: 0;
	margin: 0.35rem 0 0;
	color: var(--bcb-danger);
	font-size: 0.85rem;
}

.bcb-field-error:empty {
	display: none;
}

/* ------------------------------------------------------------------
 * List view: filter
 * ------------------------------------------------------------------ */
.bcb-filter {
	display: grid;
	gap: 1rem;
	margin-bottom: 1.5rem;
	padding: 1.25rem;
	background: var(--bcb-light);
	border-radius: var(--bcb-radius);
}

.bcb-filter__group {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.bcb-filter__legend {
	float: none;
	width: auto;
	margin: 0 0 0.4rem;
	padding: 0;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
}

.bcb-filter__row {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 0.5rem;
}

.bcb-filter__submit {
	display: flex;
	align-items: flex-end;
}

.bcb-filter__submit .bcb-btn {
	width: 100%;
}

@media (min-width: 992px) {
	.bcb-filter {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
		align-items: start;
	}

	.bcb-filter__submit {
		padding-top: calc(1.3rem + 0.4rem + 1.2rem + 0.25rem);
	}

	.bcb-filter__submit .bcb-btn {
		width: auto;
	}
}

/* ------------------------------------------------------------------
 * List view: room cards
 * ------------------------------------------------------------------ */
.bcb-cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.bcb-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.bcb-cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.bcb-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--bcb-bg);
	border: 1px solid var(--bcb-border);
	border-radius: var(--bcb-radius);
	box-shadow: var(--bcb-shadow);
}

.bcb-card__media {
	aspect-ratio: 16 / 10;
	background: var(--bcb-light);
	overflow: hidden;
}

.bcb-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bcb-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.1rem 1.25rem 1.25rem;
}

.bcb-card__title {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.3;
}

.bcb-card__cta {
	align-self: flex-start;
	margin-top: auto;
}

.bcb-features {
	display: grid;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.9rem;
	color: var(--bcb-muted);
}

.bcb-features__item {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.bcb-features__icon {
	width: 20px;
	height: 20px;
	flex: none;
	object-fit: contain;
}

.bcb-features__dot {
	width: 6px;
	height: 6px;
	margin: 0 7px;
	flex: none;
	border-radius: 50%;
	background: var(--bcb-primary);
}

/* ------------------------------------------------------------------
 * States: empty, alert, skeleton, hint
 * ------------------------------------------------------------------ */
.bcb-empty {
	margin: 0;
	padding: 2rem 1rem;
	text-align: center;
	color: var(--bcb-muted);
	background: var(--bcb-light);
	border-radius: var(--bcb-radius);
}

.bcb-empty--small {
	padding: 1rem;
	text-align: left;
	font-size: 0.95rem;
}

.bcb-hint {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	color: var(--bcb-muted);
}

.bcb-alert {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.6rem 0.75rem;
	padding: 0.85rem 1rem;
	border-radius: var(--bcb-radius-sm);
	font-size: 0.95rem;
}

.bcb-alert--error {
	background: #fdf1f0;
	border: 1px solid rgba(179, 38, 30, 0.3);
	color: #7a1a14;
}

.bcb-alert__icon {
	margin-top: 0.1em;
}

.bcb-alert__text {
	flex: 1 1 12rem;
	margin: 0;
}

.bcb-alert__text p,
.bcb-alert__text ul {
	margin: 0;
}

.bcb-alert__text ul {
	padding-left: 1.1rem;
}

.bcb-skel {
	position: relative;
	overflow: hidden;
	background: var(--bcb-light);
	border-radius: var(--bcb-radius-sm);
}

.bcb-skel::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
	transform: translateX(-100%);
	animation: bcb-shimmer 1.4s infinite;
}

.bcb-skel--title {
	height: 1.3rem;
	width: 60%;
}

.bcb-skel--line {
	height: 0.9rem;
	width: 90%;
}

.bcb-skel--short {
	width: 45%;
}

.bcb-card--skeleton .bcb-card__media {
	border-radius: 0;
}

/* Server-rendered skeleton until booking.js takes over (sizes follow the real views). */
.bcb-boot__tabs {
	width: 340px;
	max-width: 100%;
	height: 52px;
	margin-bottom: 1.5rem;
	border-radius: var(--bcb-radius);
}

.bcb-boot__filter {
	height: 134px;
	margin-bottom: 1.5rem;
	border-radius: var(--bcb-radius);
}

.bcb-boot__chips {
	height: 88px;
	margin-bottom: 1.25rem;
	border-radius: var(--bcb-radius);
}

.bcb-boot__cal {
	height: 632px;
	border-radius: var(--bcb-radius);
}

@media (max-width: 767.98px) {
	.bcb-boot__filter {
		height: 305px;
	}

	.bcb-boot__chips {
		height: 48px;
	}
}

@keyframes bcb-shimmer {
	to {
		transform: translateX(100%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bcb-skel::after {
		animation: none;
	}

	.bcb-btn,
	.bcb-tabs__tab {
		transition: none;
	}
}

/* ------------------------------------------------------------------
 * Calendar view: room chips, room header, navigation
 * ------------------------------------------------------------------ */
.bcb-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}

/* Phones: room chips become one swipeable row; the faded right edge shows there is more. */
@media (max-width: 767.98px) {
	.bcb-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		/* No negative margin: the theme container has no side padding here, so it would widen the page. */
		padding: 2px 32px 6px 0;
		-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
		mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
	}

	.bcb-chips::-webkit-scrollbar {
		display: none;
	}

	.bcb-chips .bcb-chip {
		flex: none;
		white-space: nowrap;
		scroll-snap-align: start;
	}
}

.bcb-chip {
	min-height: 40px;
	padding: 0.4rem 1rem;
	border: 1px solid var(--bcb-border);
	border-radius: 999px;
	background: var(--bcb-bg);
	color: var(--bcb-text);
	font: inherit;
	font-size: 0.875rem;
	cursor: pointer;
}

.bcb-chip:hover {
	border-color: var(--bcb-primary);
}

.bcb-chip[aria-pressed='true'] {
	background: var(--bcb-primary);
	border-color: var(--bcb-primary);
	color: #fff;
	/* Same weight as the other chips: a bolder active chip is wider and re-wraps the row (QA 32). */
}

.bcb-cal__roominfo {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.bcb-cal__roomimg {
	width: 88px;
	height: 64px;
	flex: none;
	object-fit: cover;
	border-radius: var(--bcb-radius-sm);
}

.bcb-cal__roomtitle {
	margin: 0 0 0.25rem;
	font-size: 1.15rem;
	font-weight: 600;
}

.bcb-cal__roominfo .bcb-features {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	font-size: 0.85rem;
}

.bcb-cal__roominfo .bcb-features__icon {
	width: 16px;
	height: 16px;
}

.bcb-weeknav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.bcb-weeknav__range {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
}

.bcb-weeknav__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

@media (max-width: 479.98px) {
	.bcb-weeknav__buttons {
		width: 100%;
	}

	.bcb-weeknav__buttons .bcb-btn {
		flex: 1 1 0;
		padding-left: 0.5rem;
		padding-right: 0.5rem;
	}

	.bcb-weeknav__text {
		font-size: 0.8rem;
	}
}

.bcb-daynav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.bcb-daynav__label {
	margin: 0;
	font-weight: 600;
	text-align: center;
}

/* ------------------------------------------------------------------
 * Calendar view: week grid
 * ------------------------------------------------------------------ */
.bcb-cal {
	position: relative;
	border: 1px solid var(--bcb-border);
	border-radius: var(--bcb-radius);
	background: var(--bcb-bg);
	overflow: hidden;
}

.bcb-cal > .bcb-alert {
	margin: 1rem;
}

.bcb-cal--loading .bcb-cal__scroll {
	opacity: 0.5;
	pointer-events: none;
}

.bcb-cal__skeleton {
	height: min(70vh, 640px);
	border-radius: 0;
}

.bcb-cal__scroll {
	max-height: min(70vh, 640px);
	overflow-y: auto;
	overscroll-behavior: contain;
	transition: opacity 0.15s ease;
	/* Thin, track-less scrollbar: no white strip next to the day columns. */
	scrollbar-width: thin;
	scrollbar-color: rgba(47, 47, 47, 0.25) transparent;
}

@media (max-width: 767.98px) {
	.bcb-cal__scroll {
		scrollbar-width: none;
	}

	.bcb-cal__scroll::-webkit-scrollbar {
		display: none;
	}
}

.bcb-stale-hint {
	margin: 0 0 1rem;
	padding: 0.6rem 0.9rem;
	border-left: 3px solid var(--bcb-primary);
	background: var(--bcb-primary-soft);
	font-size: 0.9rem;
}

/* Filter changed but not searched yet: results are greyed and cannot be booked. */
.bcb-results.is-stale {
	opacity: 0.45;
	pointer-events: none;
	filter: grayscale(0.6);
	transition: opacity 0.15s ease;
}

.bcb-cal__grid {
	display: grid;
	grid-template-columns: 52px repeat(var(--bcb-cols, 7), minmax(0, 1fr));
}

.bcb-cal__corner,
.bcb-cal__dayhead {
	position: sticky;
	top: 0;
	z-index: 4;
	background: var(--bcb-bg);
	border-bottom: 1px solid var(--bcb-border);
}

.bcb-cal__dayhead {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.5rem 0.25rem;
	border-left: 1px solid var(--bcb-border);
	font-size: 0.8rem;
	line-height: 1.25;
}

.bcb-cal__dow {
	font-weight: 600;
}

.bcb-cal__date {
	color: var(--bcb-muted);
}

.bcb-cal__dayhead.is-today {
	/* Opaque: the sticky header must hide the grid scrolling underneath. */
	background: linear-gradient(var(--bcb-primary-soft), var(--bcb-primary-soft)), var(--bcb-bg);
	box-shadow: inset 0 -3px 0 var(--bcb-primary);
}

.bcb-cal__dayhead.is-past {
	color: var(--bcb-muted);
}

.bcb-cal__times {
	display: flex;
	flex-direction: column;
}

.bcb-cal__time {
	height: var(--bcb-hour);
	padding: 0.15rem 0.4rem 0 0;
	text-align: right;
	font-size: 0.72rem;
	color: var(--bcb-muted);
	font-variant-numeric: tabular-nums;
	border-top: 1px solid transparent;
}

.bcb-cal__col {
	position: relative;
	display: flex;
	flex-direction: column;
	border-left: 1px solid var(--bcb-border);
}

.bcb-cal__col.is-today {
	background: rgba(173, 156, 131, 0.05);
}

.bcb-cal__slot {
	display: block;
	width: 100%;
	height: var(--bcb-hour);
	margin: 0;
	padding: 0;
	border: 0;
	border-top: 1px solid var(--bcb-border);
	background: transparent;
	cursor: pointer;
}

.bcb-cal__slot:not(.is-unavailable) {
	background: var(--bcb-free);
}

.bcb-cal__slot:hover:not(.is-unavailable) {
	background: var(--bcb-free-hover);
}

.bcb-cal__slot.is-unavailable {
	cursor: default;
}

.bcb-cal__slot:focus-visible {
	position: relative;
	z-index: 5;
	outline-offset: -2px;
	box-shadow: none;
}

/* Past or not bookable time (absolutely positioned overlay) */
.bcb-cal__past {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1;
	background:
		repeating-linear-gradient(135deg, rgba(47, 47, 47, 0.04) 0 6px, transparent 6px 12px),
		rgba(242, 243, 245, 0.85);
	pointer-events: auto;
}

/* Busy segment spanning its real duration */
.bcb-cal__busy {
	position: absolute;
	left: 3px;
	right: 3px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-height: 4px;
	padding: 0.25rem 0.4rem;
	overflow: hidden;
	border-radius: 4px;
	background: var(--bcb-busy);
	color: #fff;
	font-size: 0.72rem;
	line-height: 1.2;
	cursor: not-allowed;
}

/* Period blocked by the administration (room options) */
.bcb-cal__busy.is-blocked {
	background:
		repeating-linear-gradient(135deg, rgba(47, 47, 47, 0.08) 0 6px, transparent 6px 12px),
		#e6e7ea;
	color: var(--bcb-text);
}

.bcb-cal__busylabel {
	font-weight: 600;
}

.bcb-cal__busytime {
	opacity: 0.85;
	font-variant-numeric: tabular-nums;
}

.bcb-cal__busy.is-short {
	flex-direction: row;
	gap: 0.3rem;
	padding-top: 0;
	padding-bottom: 0;
	align-items: center;
}

.bcb-cal__busy.is-short .bcb-cal__busytime {
	display: none;
}

/* Current time */
.bcb-cal__now {
	position: absolute;
	left: 0;
	right: 0;
	z-index: 3;
	height: 2px;
	margin-top: -1px;
	background: #c62828;
	pointer-events: none;
}

.bcb-cal__now::before {
	content: '';
	position: absolute;
	left: -5px;
	top: -4px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #c62828;
}

/* One-day layout on narrow screens */
.bcb-cal__grid--day {
	grid-template-columns: 52px minmax(0, 1fr);
}

@media (max-width: 767.98px) {
	.bcb-cal__dayhead {
		flex-direction: row;
		justify-content: center;
		gap: 0.4rem;
	}

	.bcb-cal__busy {
		font-size: 0.8rem;
	}
}

@media (min-width: 768px) and (max-width: 991.98px) {
	.bcb-cal__busytime {
		display: none;
	}
}

/* ------------------------------------------------------------------
 * Booking dialog
 * ------------------------------------------------------------------ */
.bcb-dialog {
	width: min(560px, calc(100vw - 24px));
	max-height: calc(100vh - 24px);
	max-height: calc(100dvh - 24px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: var(--bcb-radius);
	background: var(--bcb-bg);
	color: var(--bcb-text);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	overflow: auto;
}

.bcb-dialog::backdrop {
	background: rgba(47, 47, 47, 0.55);
}

/* Fallback when <dialog> is not supported natively */
.bcb-dialog[open]:not(:modal) {
	position: fixed;
	inset: 0;
	z-index: 100000;
}

.bcb-dialog__inner {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.25rem;
}

@media (min-width: 576px) {
	.bcb-dialog__inner {
		padding: 1.75rem;
	}
}

.bcb-dialog__head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1rem;
	padding-right: 2.5rem;
}

.bcb-dialog__img {
	width: 96px;
	height: 72px;
	flex: none;
	object-fit: cover;
	border-radius: var(--bcb-radius-sm);
}

.bcb-dialog__title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 600;
	line-height: 1.3;
}

.bcb-dialog__date {
	margin: 0.2rem 0 0;
	color: var(--bcb-muted);
	font-size: 0.95rem;
}

.bcb-dialog__x {
	position: absolute;
	top: -0.25rem;
	right: -0.25rem;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--bcb-text);
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.bcb-dialog__x:hover {
	background: var(--bcb-light);
}

.bcb-dialog__intro {
	margin: 0;
	font-size: 0.95rem;
}

.bcb-dialog__times {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 0.75rem;
}

.bcb-dialog__summary {
	margin: 0;
	padding: 0.75rem 1rem;
	background: var(--bcb-primary-soft);
	border-left: 3px solid var(--bcb-primary);
	border-radius: var(--bcb-radius-sm);
	font-weight: 600;
}

.bcb-dialog__customer {
	display: grid;
	gap: 0.35rem;
	margin: 0;
	font-size: 0.95rem;
}

.bcb-dialog__customer > div {
	display: grid;
	grid-template-columns: 5rem minmax(0, 1fr);
	gap: 0.5rem;
}

.bcb-dialog__customer dt {
	font-weight: 500;
	color: var(--bcb-muted);
}

.bcb-dialog__customer dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.bcb-dialog__msg:empty {
	display: none;
}

.bcb-dialog__actions {
	justify-content: flex-end;
	padding-top: 0.25rem;
}

@media (max-width: 479.98px) {
	.bcb-dialog__actions .bcb-btn {
		flex: 1 1 100%;
	}

	.bcb-dialog__img {
		width: 72px;
		height: 56px;
	}
}

.bcb-login {
	padding: 1rem;
	background: var(--bcb-light);
	border-radius: var(--bcb-radius-sm);
}

.bcb-login__text {
	margin: 0 0 0.75rem;
	font-weight: 500;
}

/* Confirmation */
/* Thank-you page (replaces the booking views until the visitor moves on) */
.bcb-thanks {
	display: flex;
	justify-content: center;
	padding: 1rem 0 3rem;
}

.bcb-thanks__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: 520px;
	padding: 2.5rem 2.75rem 2.25rem;
	border: 1px solid var(--bcb-border);
	border-radius: var(--bcb-radius);
	background: var(--bcb-bg);
	box-shadow: var(--bcb-shadow);
	text-align: center;
}

.bcb-success__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 108px;
	height: 108px;
	margin-bottom: 1.5rem;
	border-radius: 50%;
	background: var(--bcb-primary-soft);
}

.bcb-success__icon .bcb-icon {
	box-sizing: content-box;
	width: 30px;
	height: 30px;
	padding: 11px;
	border-radius: 50%;
	background: var(--bcb-primary);
	color: #fff;
}

.bcb-thanks__title {
	margin: 0;
	padding-bottom: 1.25rem;
	width: 100%;
	border-bottom: 1px solid var(--bcb-border);
	color: var(--bcb-primary);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.25;
}

/* Focused programmatically for screen readers only; no visible ring. */
.bcb-app .bcb-thanks__title:is(:focus, :focus-visible) {
	outline: none;
}

.bcb-thanks__subtitle {
	margin: 1.25rem 0 0.75rem;
	font-size: 1.05rem;
	font-weight: 600;
}

.bcb-thanks__list {
	width: 100%;
	margin: 0;
}

.bcb-thanks__row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.5rem 0;
	text-align: right;
}

.bcb-thanks__row dt {
	color: var(--bcb-muted);
	font-weight: 400;
	text-align: left;
	white-space: nowrap;
}

.bcb-thanks__row dd {
	margin: 0;
}

.bcb-thanks__note {
	margin: 1rem 0 1.5rem;
	color: var(--bcb-muted);
	font-size: 0.9rem;
}

@media (max-width: 575.98px) {
	.bcb-thanks {
		padding-top: 0;
	}

	.bcb-thanks__card {
		padding: 2rem 1.25rem 1.5rem;
	}

	.bcb-thanks__title {
		font-size: 1.6rem;
	}

	.bcb-thanks .bcb-actions {
		flex-direction: column-reverse;
		align-self: stretch;
	}
}

/* ------------------------------------------------------------------
 * My bookings
 * ------------------------------------------------------------------ */
.bcb-account {
	display: grid;
	gap: 2rem;
}

.bcb-heading {
	margin: 0 0 0.75rem;
	font-size: 1.15rem;
	font-weight: 600;
}

.bcb-heading:focus {
	outline: none;
}

.bcb-bookings__list {
	display: grid;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bcb-booking {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.5rem 1rem;
	align-items: start;
	padding: 1rem 1.1rem;
	background: var(--bcb-bg);
	border: 1px solid var(--bcb-border);
	border-radius: var(--bcb-radius);
}

.bcb-booking--skeleton {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.6rem;
	margin-bottom: 0.75rem;
}

.bcb-booking.is-cancelled .bcb-booking__main {
	color: var(--bcb-muted);
}

.bcb-booking__room {
	margin: 0;
	font-weight: 600;
}

.bcb-booking__label {
	margin: 0.15rem 0 0;
	font-size: 0.95rem;
}

.bcb-booking__number {
	margin: 0.15rem 0 0;
	color: var(--bcb-muted);
	font-size: 0.85rem;
}

.bcb-booking__actions {
	grid-column: 1 / -1;
}

.bcb-booking__actions:empty {
	display: none;
}

.bcb-booking__hint {
	margin: 0;
	font-size: 0.85rem;
	color: var(--bcb-muted);
}

.bcb-booking__actions .bcb-alert {
	margin-bottom: 0.5rem;
}

.bcb-badge {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
	white-space: nowrap;
}

.bcb-badge--confirmed {
	background: rgba(46, 125, 79, 0.12);
	color: #1f5c39;
}

.bcb-badge--cancelled {
	background: var(--bcb-light);
	color: var(--bcb-muted);
}

.bcb-confirm {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	padding: 0.75rem;
	background: #fdf1f0;
	border-radius: var(--bcb-radius-sm);
}

.bcb-confirm__text {
	margin: 0;
	font-weight: 500;
}

/* ------------------------------------------------------------------
 * Minute-precise time inputs (grid < 15; booking.js FINE mode)
 * Own block, appended at the end on purpose — rules above are untouched.
 * ------------------------------------------------------------------ */
.bcb-input--time {
	min-width: 0;
}

.bcb-input--time::-webkit-calendar-picker-indicator {
	cursor: pointer;
}

.bcb-dialog__times--fine {
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	align-items: start;
}

.bcb-dialog__end {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.bcb-dialog__legend {
	float: none;
	width: auto;
	margin: 0 0 0.25rem;
	padding: 0;
	line-height: 1.5;
}

.bcb-dialog__start .bcb-label {
	/* Aligns the start input with the end inputs below the legend (0.8rem x 1.5 + 0.25rem). */
	margin-top: 1.45rem;
}

.bcb-dialog__endrow {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 0.5rem;
}

@media (max-width: 479.98px) {
	.bcb-dialog__times--fine {
		grid-template-columns: minmax(0, 1fr);
	}

	.bcb-dialog__start .bcb-label {
		margin-top: 0;
	}
}

/* 24-hour time picker (field + hour/minute popover) */
.bcb-time {
	position: relative;
	display: block;
	width: 100%;
}

.bcb-time__field {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	text-align: left;
	cursor: pointer;
	font-variant-numeric: tabular-nums;
}

.bcb-time__field[aria-expanded='true'] {
	border-color: var(--bcb-primary);
}

.bcb-time__icon {
	width: 18px;
	height: 18px;
	flex: none;
	fill: var(--bcb-muted);
}

.bcb-time__pop {
	position: fixed;
	z-index: 100000;
	display: flex;
	gap: 0.25rem;
	padding: 0.35rem;
	border: 1px solid var(--bcb-border);
	border-radius: var(--bcb-radius-sm);
	background: var(--bcb-bg);
	box-shadow: 0 10px 28px rgba(47, 47, 47, 0.16);
}

.bcb-time__pop[hidden] {
	display: none;
}

.bcb-time__col {
	width: 3.25rem;
	height: 13.5rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	/* Scrollable by wheel, touch and keyboard, without a visible scrollbar. */
	scrollbar-width: none;
}

.bcb-time__col::-webkit-scrollbar {
	display: none;
}

.bcb-time__col + .bcb-time__col {
	border-left: 1px solid var(--bcb-border);
	padding-left: 0.25rem;
}

.bcb-time__opt {
	padding: 0.35rem 0;
	border-radius: 4px;
	text-align: center;
	font-size: 0.9rem;
	font-variant-numeric: tabular-nums;
	color: var(--bcb-text);
	cursor: pointer;
	user-select: none;
}

.bcb-time__opt:hover {
	background: var(--bcb-primary-soft);
}

.bcb-time__opt[aria-selected='true'] {
	background: var(--bcb-primary);
	color: #fff;
	font-weight: 600;
}

/* The keyboard position is shown by the selected (filled) option, no extra ring. */
.bcb-app .bcb-time__opt:focus-visible,
.bcb-dialog .bcb-time__opt:focus-visible {
	outline: none;
}

.bcb-time[aria-invalid='true'] .bcb-input {
	border-color: var(--bcb-danger);
}
