.sgbc-wrapper {
	width: 100%;
	box-sizing: border-box;
}

.sgbc-calendars {
	display: grid;
	grid-template-columns: repeat(var(--sgbc-columns, 1), minmax(0, 1fr));
	gap: 36px;
	align-items: start;
}

.sgbc-months-1 .sgbc-calendars { --sgbc-columns: 1; }
.sgbc-months-2 .sgbc-calendars { --sgbc-columns: 2; }
.sgbc-months-3 .sgbc-calendars { --sgbc-columns: 3; }

.sgbc-month {
	width: 100%;
	min-width: 0;
	background: #fff;
	color: #111;
	box-sizing: border-box;
}

.sgbc-month-header {
	display: grid;
	grid-template-columns: 32px 1fr 32px;
	align-items: center;
	min-height: 38px;
}

.sgbc-month-title {
	text-align: center;
	font-size: 18px;
	line-height: 1.4;
	font-weight: 400;
	white-space: nowrap;
}

.sgbc-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	font-size: 32px;
	line-height: 1;
	text-decoration: none;
	color: #111;
	box-sizing: border-box;
}

.sgbc-nav:hover,
.sgbc-nav:focus {
	color: #111;
	text-decoration: none;
}

.sgbc-nav-disabled {
	color: #bbb;
}

.sgbc-nav-spacer {
	visibility: hidden;
}

.sgbc-table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: fixed;
	margin: 0;
	background: #fff;
}

.sgbc-table th,
.sgbc-table td {
	border: 1px solid #ccc;
	box-sizing: border-box;
	text-align: right;
	vertical-align: top;
	background: #fff;
	color: #111;
}

.sgbc-table th {
	height: 24px;
	padding: 2px 6px;
	font-size: 14px;
	line-height: 1.3;
	font-weight: 700;
	text-align: center;
}

.sgbc-table td {
	height: 52px;
	padding: 6px 5px;
	font-size: 16px;
	line-height: 1.2;
}

.sgbc-table th.sgbc-sunday {
	color: #e60000;
}

.sgbc-table th.sgbc-saturday {
	color: #0000d8;
}

.sgbc-table td.sgbc-other-month {
	color: #999;
}

.sgbc-table td.sgbc-today {
	color: #0000d8;
	font-weight: 700;
}

.sgbc-legends {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	margin-top: 10px;
	font-size: 14px;
	line-height: 1.4;
}

.sgbc-legend {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.sgbc-legend-swatch {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 1px solid #ccc;
	box-sizing: border-box;
	flex: 0 0 18px;
}

.sgbc-error {
	padding: 10px 12px;
	background: #fff3cd;
	color: #664d03;
	border: 1px solid #ffecb5;
}

@media (max-width: 767px) {
	.sgbc-calendars {
		grid-template-columns: 1fr !important;
		gap: 24px;
	}

	.sgbc-table td {
		height: 44px;
		font-size: 14px;
	}

	.sgbc-month-title {
		font-size: 16px;
	}
}

/* Navigation is rendered as GET forms/buttons to avoid conflicts with theme link styles/scripts. */
.sgbc-nav-form {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	width: 32px !important;
	height: 32px !important;
	display: block !important;
}

.sgbc-month-header .sgbc-nav {
	appearance: none !important;
	-webkit-appearance: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	position: relative !important;
	width: 32px !important;
	height: 32px !important;
	min-width: 32px !important;
	min-height: 32px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	text-indent: 0 !important;
	font-size: 0 !important;
	line-height: 1 !important;
	opacity: 1 !important;
	visibility: visible !important;
	cursor: pointer !important;
}

.sgbc-month-header .sgbc-nav::before {
	content: "" !important;
	display: block !important;
	width: 8px !important;
	height: 8px !important;
	border-style: solid !important;
	border-color: #111 !important;
	box-sizing: border-box !important;
}

.sgbc-month-header .sgbc-nav-prev::before {
	border-width: 0 0 2px 2px !important;
	transform: rotate(45deg) !important;
}

.sgbc-month-header .sgbc-nav-next::before {
	border-width: 2px 2px 0 0 !important;
	transform: rotate(45deg) !important;
}

.sgbc-month-header .sgbc-nav-disabled {
	cursor: default !important;
}

.sgbc-month-header .sgbc-nav-disabled::before {
	border-color: #bbb !important;
}

.sgbc-month-header .sgbc-nav-spacer::before {
	display: none !important;
}
