.rebc-calendar {
	width: 100%;
	font-family: 'Open Sans', 'Helvetica Neue', Arial, Sans-serif;
	color: #3f3f3f;
	box-sizing: border-box;
}
.rebc-calendar * { box-sizing: border-box; }

/* Three year calendars, matching the reference layout. */
.rebc-years {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	align-items: start;
}
.rebc-year {
	min-width: 0;
	margin: 0;
}
.rebc-year-title {
	margin: 0 0 20px;
	padding: 0;
	text-align: center;
	font-size: 23px;
	line-height: 1.15;
	font-weight: 300;
	letter-spacing: .20em;
	color: #4a4a4a;
	white-space: nowrap;
}

.rebc-year-grid {
	width: 100%;
}
.rebc-month {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr);
	min-height: 23px;
	border-left: 1px solid #e7e7e7;
	border-right: 1px solid #e7e7e7;
	border-bottom: 1px solid #e7e7e7;
}
.rebc-month:first-child { border-top: 1px solid #e7e7e7; }
.rebc-month-label {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	background: #eeeeee;
	font-size: 9px;
	line-height: 1;
	font-weight: 400;
	letter-spacing: .13em;
	color: #444;
	white-space: nowrap;
	border-right: 1px solid #e7e7e7;
}
.rebc-days {
	display: grid;
	grid-template-columns: repeat(31, minmax(0, 1fr));
	align-items: stretch;
	min-width: 0;
	background: #f8f8f8;
}
.rebc-day {
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-width: 0;
	height: 22px;
	padding: 0 2px;
	text-align: center;
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	color: #303030;
	background: #fff;
	border-right: 1px solid #f0f0f0;
}
.rebc-day:last-child { border-right: 0; }

/* Reference styling: calendar day numbers are bold inline elements. */
.rebc-calendar b {
	display: inline-block;
	background-color: #efe4d0;
	width: auto;
	padding: 3px 2px;
	text-align: center;
	font-weight: 600;
	font-size: 10px;
}
/* Keep the calendar dates vertically centered despite the global <b> styling. */
.rebc-calendar .rebc-day {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 2px;
}
.rebc-calendar b.rebc-available { background-color: #fff; }
.rebc-calendar b.rebc-past { background-color: #eee; font-weight: 400; color: #bdbdbd; }
.rebc-day.rebc-available { background: #fff; }
.rebc-day.rebc-reserved {
	background-color: #efe4d0;
	font-weight: 600;
}
.rebc-day.rebc-past {
	background: #eeeeee;
	color: #bdbdbd;
	font-weight: 400;
}

/* Empty day slots keep all month rows aligned to 31 columns. */
.rebc-day.rebc-empty {
	background: #f8f8f8;
	color: transparent;
}

.rebc-legend {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 18px;
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.2;
	color: #555;
}
.rebc-legend span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.rebc-legend-box {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 1px solid #d9d9d9;
	background: #fff;
}
.rebc-legend-box.rebc-reserved { background: #efe4d0; }
.rebc-legend-box.rebc-past { background: #eeeeee; }

@media (max-width: 1000px) {
	.rebc-years { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rebc-year-title { font-size: 20px; }
}

@media (max-width: 680px) {
	.rebc-years {
		grid-template-columns: 1fr;
		gap: 32px;
	}
	.rebc-year-title { font-size: 20px; margin-bottom: 14px; }
	.rebc-month { grid-template-columns: 42px minmax(0, 1fr); }
	.rebc-days {
		display: flex;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.rebc-day {
		flex: 0 0 24px;
		min-width: 24px;
		height: 22px;
	}
	.rebc-legend { font-size: 12px; }
}

/* Slim mobile horizontal scrollbar under the date row. */
@media (max-width: 680px) {
	.rebc-days {
		scrollbar-width: thin;
		scrollbar-color: #cfcfcf transparent;
	}
	.rebc-days::-webkit-scrollbar {
		height: 3px;
	}
	.rebc-days::-webkit-scrollbar-track {
		background: transparent;
	}
	.rebc-days::-webkit-scrollbar-thumb {
		background: #cfcfcf;
		border-radius: 999px;
	}
}
