.ksg-event-calendar,
.ksg-event-type-filter {
	--ksg-calendar-red: #e30613;
	--ksg-calendar-red-soft: #fdebed;
	--ksg-calendar-text: #202020;
	--ksg-calendar-muted: #777777;
	--ksg-calendar-border: #eeeeee;

	width: 100%;
	padding: 22px 20px 20px;
	background: #ffffff;
	border: 1px solid var(--ksg-calendar-border);
	border-radius: 8px;
	box-shadow: 0 5px 24px rgba(0, 0, 0, 0.045);
	color: var(--ksg-calendar-text);
	font-family: inherit;
	box-sizing: border-box;
	transition: opacity 0.2s ease;
}

.ksg-event-calendar__title,
.ksg-event-type-filter__title {
	margin: 0 0 20px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	color: inherit;
}

.ksg-event-calendar__navigation {
	display: grid;
	grid-template-columns: 34px 1fr 34px;
	align-items: center;
	margin-bottom: 17px;
}

.ksg-event-calendar__month {
	text-align: center;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

.ksg-event-calendar__nav-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	color: inherit;
	text-decoration: none;
	font-size: 25px;
	font-weight: 400;
	line-height: 1;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ksg-event-calendar__nav-link:hover,
.ksg-event-calendar__nav-link:focus-visible {
	background: #f5f5f5;
	color: var(--ksg-calendar-red);
	outline: none;
}

.ksg-event-calendar__weekdays,
.ksg-event-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 8px 4px;
}

.ksg-event-calendar__weekdays {
	margin-bottom: 9px;
}

.ksg-event-calendar__weekdays span {
	text-align: center;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.035em;
	color: var(--ksg-calendar-muted);
}

.ksg-event-calendar__day,
.ksg-event-calendar__empty {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	justify-self: center;
	width: 31px;
	height: 31px;
	border-radius: 50%;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	color: inherit;
}

.ksg-event-calendar__day.has-events {
	background: var(--ksg-calendar-red-soft);
	cursor: pointer;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.ksg-event-calendar__day.has-events:hover,
.ksg-event-calendar__day.has-events:focus-visible {
	background: var(--ksg-calendar-red);
	color: #ffffff;
	transform: translateY(-1px);
	outline: none;
}

.ksg-event-calendar__day.is-today,
.ksg-event-calendar__day.is-selected {
	background: var(--ksg-calendar-red);
	color: #ffffff;
	font-weight: 700;
}

/* Eventtyp-Filter */

.ksg-event-type-filter__list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ksg-event-type-filter__item {
	--ksg-term-color: #e30613;
	--ksg-term-soft: rgba(227, 6, 19, 0.11);

	margin: 0;
	padding: 0;
}

.ksg-event-type-filter__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 38px;
	padding: 7px 8px;
	border-radius: 5px;
	color: var(--ksg-calendar-text);
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ksg-event-type-filter__label {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
}

.ksg-event-type-filter__icon {
	flex: 0 0 17px;
	width: 17px;
	height: 17px;
	fill: currentColor;
	color: var(--ksg-term-color);
}

.ksg-event-type-filter__count {
	flex: 0 0 auto;
	color: #555555;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

.ksg-event-type-filter__link:hover,
.ksg-event-type-filter__link:focus-visible,
.ksg-event-type-filter__link.is-selected {
	background: var(--ksg-term-soft);
	color: var(--ksg-term-color);
	outline: none;
}

.ksg-event-type-filter__link.is-selected {
	font-weight: 700;
}

.ksg-event-type-filter__link:hover .ksg-event-type-filter__count,
.ksg-event-type-filter__link:focus-visible .ksg-event-type-filter__count,
.ksg-event-type-filter__link.is-selected .ksg-event-type-filter__count {
	color: inherit;
}

/* Teilaktualisierung */

.ksg-events-grid,
.ksg-event-calendar,
.ksg-event-type-filter {
	transition: opacity 0.2s ease;
}

.ksg-events-grid.is-ksg-loading,
.ksg-event-calendar.is-ksg-loading,
.ksg-event-type-filter.is-ksg-loading {
	opacity: 0.42;
	pointer-events: none;
	cursor: wait;
}

@media (max-width: 767px) {
	.ksg-event-calendar,
	.ksg-event-type-filter {
		padding: 20px 16px 18px;
	}

	.ksg-event-calendar__weekdays,
	.ksg-event-calendar__grid {
		gap: 8px 2px;
	}

	.ksg-event-calendar__day,
	.ksg-event-calendar__empty {
		width: 29px;
		height: 29px;
	}

	.ksg-event-type-filter__link {
		min-height: 42px;
		padding: 8px 6px;
		font-size: 14px;
	}
}

/* Farbiger Eventtyp-Name im Elementor Loop Item */

.ksg-event-type-label {
	display: inline;
	font: inherit;
	line-height: inherit;
}
