.bk-frontend-calendar {
	--bk-calendar-color-free: #00a32a;
	--bk-calendar-color-booked: #d63638;
	--bk-calendar-color-past: #8c8f94;
	--bk-calendar-color-day-number: #3c434a;
	--bk-calendar-color-split: #ffffff;
	--bk-calendar-color-free-soft: color-mix(in srgb, var(--bk-calendar-color-free) 20%, white);
	--bk-calendar-color-booked-soft: color-mix(in srgb, var(--bk-calendar-color-booked) 20%, white);
	--bk-calendar-color-past-soft: color-mix(in srgb, var(--bk-calendar-color-past) 20%, white);
	color: #1d2327;
}

.bk-frontend-calendar--placeholder {
	padding: 16px;
	border: 1px dashed #c3c4c7;
	border-radius: 10px;
	background: #f6f7f7;
}

.bk-frontend-calendar__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 12px;
}

.bk-frontend-calendar__title {
	margin: 0;
	font-size: clamp(1.1rem, 1.8vw, 1.35rem);
}

.bk-frontend-calendar__subtitle {
	margin: 4px 0 0;
	color: #50575e;
	font-size: 0.85rem;
}

.bk-frontend-calendar__legend {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.bk-frontend-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.82rem;
	white-space: nowrap;
}

.bk-frontend-legend-swatch {
	width: 11px;
	height: 11px;
	border-radius: 999px;
	display: inline-block;
}

.bk-frontend-legend-swatch.is-free {
	background: var(--bk-calendar-color-free);
}

.bk-frontend-legend-swatch.is-booked {
	background: var(--bk-calendar-color-booked);
}

.bk-frontend-legend-swatch.is-past {
	background: var(--bk-calendar-color-past);
}

.bk-frontend-calendar__months {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 10px;
}

.bk-frontend-month {
	border: 0;
	border-radius: 10px;
	padding: 0;
	background: #ffffff;
}

.bk-frontend-month__title {
	margin: 0 0 6px;
	font-size: 0.92rem;
	font-weight: 700;
	text-transform: capitalize;
}

.bk-frontend-month__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 1px;
}

.bk-frontend-weekday {
	padding: 4px 1px;
	text-align: center;
	font-size: 0.66rem;
	font-weight: 700;
	color: #50575e;
	border-radius: 4px;
}

.bk-frontend-day {
	--bk-day-text-color: var(--bk-calendar-color-free);
	--bk-day-surface-color: var(--bk-calendar-color-free-soft);
	position: relative;
	min-height: 32px;
	border-radius: 2px;
	background: var(--bk-day-surface-color);
	color: var(--bk-day-text-color);
	overflow: hidden;
}

.bk-frontend-day.is-empty {
	background: transparent;
	box-shadow: none;
	pointer-events: none;
}

.bk-frontend-day.is-booked {
	--bk-day-text-color: var(--bk-calendar-color-booked);
	--bk-day-surface-color: var(--bk-calendar-color-booked-soft);
	background: var(--bk-day-surface-color);
}

.bk-frontend-day.is-past {
	--bk-day-text-color: var(--bk-calendar-color-past);
	--bk-day-surface-color: var(--bk-calendar-color-past-soft);
	background: var(--bk-day-surface-color);
}

.bk-frontend-day.is-arrival-day:not(.is-past):not(.is-changeover-day) {
	background: linear-gradient(135deg, var(--bk-calendar-color-free-soft) 0 49%, var(--bk-calendar-color-booked-soft) 49% 100%);
}

.bk-frontend-day.is-departure-day:not(.is-past):not(.is-changeover-day) {
	background: linear-gradient(135deg, var(--bk-calendar-color-booked-soft) 0 49%, var(--bk-calendar-color-free-soft) 49% 100%);
}

.bk-frontend-day.is-changeover-day:not(.is-past) {
	background: linear-gradient(135deg, var(--bk-calendar-color-booked-soft) 0 48.5%, var(--bk-calendar-color-split) 48.5% 51.5%, var(--bk-calendar-color-booked-soft) 51.5% 100%);
}

.bk-frontend-day__number {
	position: absolute;
	top: 4px;
	left: 6px;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
	color: var(--bk-calendar-color-day-number);
}

.bk-frontend-calendar.has-no-header .bk-frontend-calendar__months {
	gap: 8px;
}

.bk-frontend-calendar__meta {
	display: block;
	margin-top: 10px;
	font-size: 0.75rem;
	line-height: 1.4;
	color: #6c7781;
}


@media (max-width: 782px) {
	.bk-frontend-calendar__header {
		flex-direction: column;
	}

	.bk-frontend-calendar__legend {
		justify-content: flex-start;
	}
}

