.e5-section-calendar-popup.open {
	z-index: 1001;
}

.e5-calendar-popup-hide-header {
	display: none;
}

html.e5-no-scroll {
	overflow: hidden;
}

.calendar-layout {
	display: flex;
	flex-wrap: nowrap;
	gap: 20px;
	border: 2px solid #e3e3e3;
	border-radius: 10px;
	padding-top: 26px;
}

.calendar-sidebar {
	width: 280px;
	padding: 15px;
}

.calendar-sidebar h3 {
	margin-top: 0;
	font-size: 1rem;
}

.calendar-sidebar label {
	color: black;
	font-size: 1em;
	font-family: "Raleway Bold";
}

.filter-item {
	margin-top: 30px;
}

.calendar-main {
	flex-grow: 1;
	min-width: 300px;
	width: calc(100% - 300px);
}

.calendar-container {
	display: flex;
	flex-direction: column;
}

.calendar-weekdays,
.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1em;
	flex-wrap: wrap;
	padding-right: 15px;
}

.calendar-header-left {
	display: flex;
	align-items: center;
	gap: 10px;
}

.calendar-month-title {
	margin: 0;
	font-size: 40px;
	color: black;
	font-weight: bold;
	margin-right: 8px;
}

.calendar-arrow-box {
	border: 2px solid black;
	border-radius: 5px;
	text-decoration: none;
	cursor: pointer;
	width: 23px;
	height: 23px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.calendar-arrow {
	width: 12px;
	height: 16px;
	border-radius: unset !important;
}

.calendar-arrow-left {
	transform: rotate(180deg);
}

.calendar-header-right {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.calendar-header-right button {
	margin-bottom: 0;
}

.view-switch-container {
	display: flex;
}

.view-switch {
	cursor: pointer;
	font-weight: normal;
	border: 2px solid #e3e3e3;
	margin-right: 0;
	text-transform: initial;
}

.view-switch.heute {
	border-radius: 5px;
}

.view-switch.woche {
	border-right: unset;
	border-left: unset;
}

.view-switch.tag {
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
}

.view-switch.monat {
	border-top-right-radius: 5px;
	border-bottom-right-radius: 5px;
}

.view-switch.active {
	font-weight: bolder;
}

.calendar-grid.week .calendar-weekday-container .calendar-weekday {
	display: none;
}

.calendar-weekday-container {
	display: flex;
	align-items: baseline;
	justify-content: end;
}

.calendar-weekday {
	text-align: center;
	padding: 8px;
	font-size: 21px;
	font-family: "Raleway Extra Bold", "sans-serif";
}

.calendar-day {
	background: #fff;
	padding: 8px;
	min-height: 160px;
	font-size: 1.3em;
	display: flex;
	flex-direction: column;
	border-right: 2px solid #e3e3e3;
	border-bottom: 2px solid #e3e3e3;
}

.calendar-day:nth-child(7n + 1) {
	border-left: 2px solid #e3e3e3;
}

.calendar-day:nth-child(-n + 7) {
	border-top: 2px solid #e3e3e3;
}

.calendar-day:nth-child(7n) {
	border-right: none;
}

.calendar-grid.month .calendar-day:nth-last-child(-n + 7) {
	border-bottom: none;
}

.calendar-grid.month .calendar-day:nth-child(7n):nth-last-child(-n + 7) {
	border-bottom-right-radius: 10px;
}

.calendar-day.today {
	border: 3px solid var(--primary-color) !important;
}

.day-number {
	margin-bottom: 4px;
	color: #333;
	text-align: right;
	font-family: "Raleway Extra Bold", "sans-serif";
}

.day-number-period {
	display: none;
}

.day-events {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	justify-content: center;
	margin-top: 4px;
}

.event-label {
	color: black;
	padding: 4px 6px;
	margin-top: 4px;
	width: 100%;
	max-width: 170px;
	font-family: "Raleway Bold";
	border-radius: 4px;
	font-size: 0.75em;
	white-space: nowrap;
	cursor: pointer;
	overflow: hidden;
	text-overflow: ellipsis;
	border-style: solid;
	border-width: 2px;
}

.event-month-mobile-container {
	display: flex;
	align-items: flex-start;
	margin-bottom: 12px;
}

.event-month-mobile-time {
	width: 60px;
	font-weight: bold;
	padding-top: 6px;
}

.event-month-mobile {
	padding: 6px 10px;
	border-radius: 6px;
	flex: 1;
	position: relative;
	cursor: pointer;
	border-style: solid;
	border-width: 2px;
}

.event-month-mobile::after {
	content: url("/wp-content/themes/flatsome-child/flatsome-child/images/rechter-pfeil.svg");
	display: block;
	width: 11px;
	height: 16px;
	color: #000000;
	position: absolute;
	top: 30%;
	right: 10px;
}

.event-month-mobile-title {
	font-weight: bold;
	margin-bottom: 4px;
}

.event-month-mobile-time-range {
	font-size: 0.9rem;
}

#event-popup-container.popup-container {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
}

#event-popup-container.popup-container::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 4;
}

.event-popup {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: white;
	border: 2px solid #ccc;
	z-index: 5;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
	max-width: 500px;
	width: 90%;
	border-radius: 6px;
}

.event-popup-close {
	width: 18px;
	height: 18px;
	border-radius: unset !important;
	cursor: pointer;
	margin-left: auto;
}

.event-popup-content-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.event-popup-content {
	padding: 20px;
	background: white;
	border-radius: 6px;
}

.e5-popup-category {
	margin-right: 15px;
}

.event-popup-content h3 {
	margin-top: 0;
}

.event-popup-content svg {
	width: 20px;
}

.event-footer button {
	margin-bottom: 0;
}

.popup-meta {
	border-bottom: 1px solid #e3e3e3;
	display: flex;
	flex-direction: column;
	align-items: baseline;
	margin-top: 10px;
	padding-bottom: 10px;
	margin-bottom: 10px;
}

.popup-meta p {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.popup-attachment-wrapper,
.popup-buy-wrapper {
	display: flex;
	flex-direction: column;
	margin-top: 10px;
}

.popup-description {
	margin-top: 12px;
	font-size: 0.95rem;
	line-height: 1.4;
}

.popup-attachment,
.popup-buy-link {
	text-decoration: none;
	color: #333;
}

.popup-attachment svg {
	width: 18px;
}

#popup-attachment-name,
#popup-buy-link-text {
	font-family: "Raleway Regular";
}

#popup-date {
	font-size: 17px;
	font-weight: bold;
}

#popup-link {
	margin-top: 20px;
}

#popup-link:hover {
	box-shadow: none;
	color: var(--primary-color);
	border: 2px solid var(--primary-color);
	background-color: white;
}

button.filter {
	margin-top: 40px;
}

button.filter .button-filter-icon,
.filter-icon {
	width: 18px;
	height: 15px;
	border-radius: unset !important;
}

.calendar-sidebar .filter-icon,
.event-filter-modal .filter-icon {
	display: none;
}

button.filter .button-filter-icon {
	filter: brightness(0) saturate(100%) invert(99%) sepia(1%) saturate(3611%)
	hue-rotate(153deg) brightness(122%) contrast(100%);
}

.filter-title {
	color: black;
	text-transform: uppercase;
	font-size: 21px;
	font-family: "Raleway Extra Bold", "sans-serif";
	display: block;
	line-height: 1;
}

.filter-top-container {
	display: flex;
	justify-content: space-between;
	padding-bottom: 20px;
}

.filter-top-title-container {
	display: flex;
	align-items: center;
	gap: 10px;
}

.filter-close {
	display: inline-block;
	width: 15px;
	height: 15px;
	border-radius: unset !important;
	cursor: pointer;
}

.calendar-sidebar .filter-close {
	display: none;
}

.e5-category-circle {
	font-size: 22px;
}

/* day view */

.day-view-cards {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-top: 20px;
	padding-right: 15px;
}

.day-view-cards .event-icon {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.day-view-cards .event-category {
	margin-bottom: 0;
	text-wrap: nowrap;
	text-wrap-mode: nowrap;
}

.day-view-cards .event-attachment,
.day-view-cards .event-buy {
	font-family: "Raleway Regular";
	color: black;
}

.day-view-cards .event-icon svg {
	width: 24px;
}

.day-view-cards .event-description {
	padding-left: 20px;
}

.day-view-cards .event-card:last-of-type {
	margin-bottom: 29px;
}

.day-view-cards .event-attachment-wrapper {
	display: flex;
	flex-direction: column;
}

.day-view-cards .event-buy-wrapper {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
}

.event-card-header {
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
}

.calendar-main .event-card {
	border-radius: 8px;
	background-color: #f9f6f0;
	padding: 20px;
}

.calendar-main .event-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.calendar-main .event-title {
	margin: 0;
	font-size: 1.2em;
}

.calendar-main .event-category {
	font-weight: bold;
}

.calendar-main .event-details-row {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	margin: 20px 0;
}

.calendar-main .event-details-row > div {
	flex: 1;
}

.calendar-main .event-icons {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.calendar-main .event-description {
	flex: 2;
}

.ticket-link,
.attachment-link {
	display: inline-block;
	margin-top: 6px;
	text-decoration: underline;
}

/**/

#popup-title {
	color: black;
	text-transform: initial;
	font-size: 21px;
	line-height: 30px;
	margin-top: 10px;
}

.weekday-full {
	display: inline;
}

.weekday-short {
	display: none;
}

.calendar-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
	padding: 0.5rem 0;
}

.mobile-events-list,
.mobile-day-header {
	display: none;
}

.calendar-mobile-filter {
	display: none;
}

.mobile-days {
	display: none;
}

/* Tom Select */
.ts-wrapper.multi .ts-control .item {
	display: none;
}

.ts-control {
	border: 2px solid #e3e3e3;
	padding: 0 12px;
	border-radius: 7px;
}

.ts-control::after {
	content: url("/wp-content/themes/flatsome-child/flatsome-child/images/rechter-pfeil.svg");
	width: 15px;
	height: 8px;
	color: #000000;
	position: absolute;
	right: 10px;
	transform: rotate(90deg);
	top: 40%;
	cursor: pointer;
}

.ts-control > input {
	padding-right: 20px !important;
}

.ts-dropdown {
	border: 2px solid #e3e3e3;
	border-radius: 0 0 7px 7px;
	border-top: 0 none;
}

.ts-dropdown .active {
	background-color: #fff;
	color: #000;
}

.ts-dropdown {
	color: #000;
	font-size: 0.875em;
}

.e5-category-circle {
	font-size: 22px;
}

#e5-category-id-ts-dropdown input::after {
	content: "●";
	display: block;
	position: relative;
	font-size: 24px;
	bottom: 2px;
	margin-left: 20px;
}

.ts-dropdown-content .option:first-of-type {
	margin-top: 10px;
}

.ts-dropdown-content .option {
	display: flex;
	align-items: center;
	margin-bottom: 10px;
}

.ts-dropdown-content .option input {
	margin-bottom: 0;
	margin-top: 0;
	position: relative;
}

.ts-dropdown-content .option input[type="checkbox"] {
	accent-color: var(--primary-color);
}

.e5-category-select .ts-dropdown-content .option input {
	margin-right: 1.5rem !important;
}

.e5-category-select .ts-dropdown-content .option[data-value="musik-gesang-tanz"] input::after {
	color: #cde0c0;
}

.e5-category-select .ts-dropdown-content .option[data-value="regionalforschung-bildung"] input::after {
	color: #e6c7cd;
}

.e5-category-select .ts-dropdown-content .option[data-value="theater-sprache-literatur"] input::after {
	color: #f4e0c0;
}

.e5-category-select .ts-dropdown-content .option[data-value="trachten-braeuche-kulturelles-erbe"] input::after {
	color: #d7cae3;
}

.e5-category-select .ts-dropdown-content .option[data-value="theater"] input::after {
	color: #af122c4d;
}

.e5-category-select .ts-dropdown-content .option[data-value="theater-seminar"] input::after {
	color: #e4dddf;
}

.e5-category-select .ts-dropdown-content .option[data-value="volkslied"] input::after {
	color: #c71a1a4d;
}

.e5-category-select .ts-dropdown-content .option[data-value="volksmusik"] input::after {
	color: #f0f0f0;
}

.e5-category-select .ts-dropdown-content .option[data-value="volkstanz"] input::after {
	color: #c71a1a;
}

@media screen and (max-width: 1080px) {
	.calendar-layout.day {
		border: unset;
	}

	.calendar-layout .calendar-header {
		padding-left: 15px;
	}

	.calendar-layout.day .calendar-header {
		padding: 0;
	}

	.calendar-layout.day .day-view-cards {
		margin-top: 0;
		padding-right: 0;
	}

	.calendar-mobile-filter {
		display: block;
		text-align: right;
		width: 100%;
	}

	.calendar-mobile-filter button {
		color: white;
		background: var(--primary-color);
		border-radius: 5px;
		display: flex;
		justify-content: center;
		align-items: center;
		gap: 10px;
		justify-self: end;
		margin-right: 0;
	}

	.calendar-mobile-filter button svg {
		fill: white;
		height: 18px;
	}

	.calendar-sidebar {
		display: none;
		position: fixed;
		background: var(--wp--preset--color--white);
		width: 80%;
		z-index: 5;
		height: 100vh;
		top: 0;
		left: 20%;
		padding-top: 30px;
		overflow-y: scroll;
	}

	.calendar-sidebar.open {
		display: block;
	}

	.calendar-sidebar .filter-icon {
		display: block;
	}

	#filter-popup-container.popup-container {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: 9999;
	}

	#filter-popup-container.popup-container::before {
		content: "";
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.5);
		z-index: 4;
	}

	.filter-top-container {
		border-bottom-width: 2px;
		border-bottom-color: #e3e3e3;
		border-bottom-style: solid;
	}

	.filter-close,
	.filter-icon {
		display: inline-block !important;
	}

	.calendar-day:nth-child(7n + 1) {
		border-left: unset;
	}
}

@media screen and (max-width: 768px) {
	html.no-scroll {
		overflow-y: hidden;
	}

	.calendar-layout {
		border: unset;
	}

	.calendar-layout .calendar-header {
		padding: 0;
	}

	.calendar-header-left {
		margin-bottom: 19px;
		width: 100%;
	}

	.calendar-mobile-filter {
		margin-right: 0;
	}

	.mobile-events-list,
	.mobile-day-header {
		display: block;
	}

	.mobile-day-header {
		border-top: 2px solid #e3e3e3;
		font-size: 19px;
		padding-top: 19px;
		font-weight: bold;
	}

	.calendar-month-title {
		font-size: 26px;
	}

	.calendar-header-right {
		margin-right: 0;
	}

	.calendar-grid.month .calendar-event {
		width: 8px;
		height: 8px;
		border-radius: 50%;
		display: inline-block;
		margin: 2px;
		padding: 0;
		align-self: center;
		overflow: hidden;
		text-indent: -9999px;
		pointer-events: none;
	}

	.calendar-day {
		background-color: #fff;
		padding: 6px;
		min-height: unset;
		font-size: 1.3em;
		line-height: 28px;
		display: flex;
		flex-direction: column;
		border: unset;
	}

	.day-number-period {
		display: inline;
	}

	.calendar-day.selected {
		border-radius: 5px;
	}

	.calendar-grid.month .day-number {
		margin-bottom: 0;
		color: #333;
		text-align: center;
		font-family: "Raleway Extra Bold", "sans-serif";
	}

	.day-events {
		margin-top: 0;
	}

	.weekday-full {
		display: none;
	}

	.weekday-short {
		display: inline;
	}

	.calendar-day .event-label {
		display: inline-block;
	}

	.mobile-events-list {
		margin-top: 19px;
	}

	.mobile-events-list .calendar-event {
		text-indent: 0;
		margin-bottom: 0.5rem;
		padding: 0.5rem;
		border-radius: 4px;
		color: black;
		font-size: 21px;
		width: 100%;
		height: 100%;
	}

	.day-view-cards .event-category {
		text-wrap: wrap;
		text-wrap-mode: wrap;
	}

	.day-view-cards .event-card-header {
		flex-direction: column-reverse;
	}

	.day-view-cards .event-details-row {
		flex-direction: column;
	}

	.calendar-main .event-card-header {
		gap: 20px;
	}

	.calendar-main .e5-term-label {
		align-self: center;
	}

	.calendar-main .event-title {
		align-self: center;
		width: unset;
	}

	/* week view */

	.calendar-grid.week {
		display: flex;
		flex-direction: column;
	}

	.calendar-weekdays.week {
		display: none;
	}

	.calendar-weekday {
		font-size: 1.3em;
	}

	.calendar-grid.week .calendar-weekday-container .calendar-weekday {
		display: block;
	}

	.calendar-grid.week .calendar-weekday-container {
		justify-content: center;
	}

	.calendar-day:nth-child(7n + 1) {
		border-left: unset;
	}

	.calendar-grid.week .calendar-day:last-child {
		border-bottom: 2px solid #e3e3e3;
	}

	.calendar-grid.week .calendar-day {
		padding: 1rem 0;
	}

	.calendar-grid.week .event-label {
		margin: 0.25rem 0;
		padding: 0.5rem;
		border-radius: 4px;
		background-color: #eee;
		cursor: pointer;
		max-width: unset;
	}

	.calendar-grid.month .event-label {
		border: unset;
	}
}

@media screen and (max-width: 400px) {
	#popup-title {
		font-size: 18px;
		line-height: 22px;
	}

	#popup-date {
		font-size: 15px;
	}

	.event-popup .popup-description {
		display: none !important;
	}
}
