.calendar-layout {
	display: flex;
	flex-wrap: nowrap;
	gap: 20px;
	border: 2px solid #E3E3E3;
    border-radius: 10px;
	padding-top: 26px;
}

.calendar-sidebar {
	width: 280px;
	padding: 16px;
}

.calendar-sidebar h3 {
	margin-top: 0;
	font-size: 1rem;
}

.calendar-sidebar label {
    color: black;
	font-size: 17px;
	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;
}

.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: 10px;
}

.calendar-arrow {
	font-size: 40px;
    line-height: 20px;
	color: black;
    border: 2px solid black;
    border-radius: 5px;
	text-decoration: none;
	padding: 0 7px 6px 7px;
	cursor: pointer;
}

.calendar-header-right {
	display: flex;
	margin-right: 29px;
	flex-wrap: wrap;
}

.view-switch {
	cursor: pointer;
    font-weight: normal;
	border: 2px solid #E3E3E3;
    margin-right: 0;
    text-transform: initial;
}

.view-switch.heute {
    margin-right: 20px;
    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-weekday {
	text-align: center;
	font-weight: 600;
	padding: 8px;
	font-size: 21px;
}

.calendar-day {
	background-color: #fff;
	padding: 8px;
	min-height: 160px;
	font-size: 21px;
	display: flex;
	flex-direction: column;
    border: 2px solid transparent; /* Prevent double borders */
	outline: 2px solid #E3E3E3; /* Simulates border without stacking */
}

.calendar-day.today {
	outline: 2px solid var(--primary-color);
    border-right: 4px solid var(--primary-color);
    border-bottom: 4px solid var(--primary-color);
}

.day-number {
	font-weight: bold;
	margin-bottom: 4px;
	color: #333;
    text-align: right;
}

.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: 160px;
	font-family: 'Raleway Bold';
    border-radius: 4px;
	font-size: 17px;
	white-space: nowrap;
    cursor: pointer;
	overflow: hidden;
	text-overflow: ellipsis;
}

.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: 380px;
	width: 90%;
	border-radius: 6px;
}

.event-popup:after,
.event-filter-modal:after {
	content: "";
    background: black;
    width: 200vw;
    height: 200vh;
    position: absolute;
    top: -60vh;
    left: -100vh;
    z-index: -1;
    transition: unset;
    opacity: 0.15;
}

.event-popup-content {
	padding: 20px;
	background: white;
}

.event-popup-close {
	position: absolute;
    top: 4px;
    right: 15px;
    cursor: pointer;
    font-size: 45px;
    line-height: 45px;
}

.event-popup-content h3 {
	margin-top: 0;
}

.event-popup-content svg {
    width: 20px;
}

.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-category {
	border: 1px solid currentColor;
	border-radius: 4px;
	font-weight: bold;
}

#popup-date {
    font-size: 17px;
    font-weight: bold;
}

#popup-link {
	background-color: var(--primary-color);
	color: white;
	border-radius: 4px;
	text-transform: uppercase;
	padding: 9px 15px;
	margin-top: 19px;
}

button.filter {
    background-color: var(--primary-color);
    color: white;
    border-radius: 5px;
    margin-top: 40px;
}

.filter-title {
    color: black;
    text-transform: uppercase;
    font-size: 21px;
    font-family: 'Raleway Extra Bold', 'sans-serif';
    margin-bottom: 40px;
    display: block;
}

.custom-multiselect {
	position: relative;
	border: 1px solid #ccc;
	border-radius: 7px;
	padding: 0.5rem;
	cursor: pointer;
	background: #fff;
}

.custom-multiselect::after {
	content: '▾'; /* Unicode down arrow */
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1rem;
	color: #666;
	pointer-events: none;
}

.selected-options {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.selected-options span {
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 0.85rem;
}

.options-list {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	border: 1px solid #ccc;
	background: #fff;
	max-height: 200px;
	overflow-y: auto;
	display: none;
	z-index: 10;
	list-style: none;
	padding-left: 0;
}

.options-list li {
	padding: 0.5rem;
	cursor: pointer;
    margin-left: 0 !important;
	margin-bottom: 0 !important;
}

/* day view */

.day-view-cards {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-top: 20px;
	margin-right: 29px;
}

.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-title {
	font-size: 21px;
}

.day-view-cards .event-footer {
	padding: 0 20px;
}

.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: 0 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: 0 0 20px;
}

.calendar-main .event-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.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;
}

.calendar-main .event-icons {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px;
}

.calendar-main  .event-description {
	flex: 2;
}

.read-more-button {
	display: inline-block;
	margin-top: 10px;
	padding: 6px 12px;
	background-color: var(--primary-color);
	color: white;
	text-decoration: none;
	border-radius: 4px;
}

.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;
	font-weight: bold;
	font-size: 21px;
	padding: 0.5rem 0;
	font-family: 'Raleway Extra Bold', 'sans-serif';
}

.mobile-events-list, .mobile-day-header {
	display: none;
}

.calendar-mobile-filter {
	display: none;
}

@media screen and (max-width: 1024px) {
	.calendar-mobile-filter {
		display: block;
		text-align: right;
		width: 100%;
		margin-right: 29px;
	}

	.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 {
		position: absolute;
		left: -100vw;
		background: white;
		width: 40vw;
		z-index: 1;
		height: 100vh;
		top: 0;
		transition: all 0.6 ease-in-out;
	}

	.calendar-sidebar.open {
		left: -15px;
	}

}

@media screen and (max-width: 768px) {
	html.no-scroll {
		overflow-y: hidden;
	}

	.calendar-layout {
		border: unset;
	}

	.calendar-container {
		border-top: 1px solid #E3E3E3;
	}

	.calendar-sidebar {
		width: 80vw;
	}

	.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: 1px solid #E3E3E3;
		font-size: 19px;
		padding-top: 19px;
		font-weight: bold;
	}

	.calendar-month-title {
		font-size: 26px;
	}

	.calendar-header-right {
		margin-right: 0;
	}

	.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: 21px;
		line-height: 28px;
		display: flex;
		flex-direction: column;
		border: unset;
		outline: unset;
	}

	.calendar-day.selected {
		background-color: #E3E3E3;
		border-radius: 5px;
	}

	.day-number {
		font-weight: normal;
		margin-bottom: 0;
		color: #333;
		text-align: center;
		font-family: 'Raleway Bold';
	}

	.day-events {
		margin-top: 0;
	}

	.weekday-full {
		display: none;
	}

	.weekday-short {
		display: inline;
	}

	.calendar-day.today {
		outline: unset;
		border-right: unset;
		border-bottom: unset;
	}

	.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;
	}

	/* week view */

	.calendar-grid.week {
        display: flex;
        flex-direction: column;
    }

	.week .calendar-weekday {
        display: none;
    }

    .week .calendar-day {
        border-bottom: 1px solid #ccc;
        padding: 1rem 0;
    }

    .week .day-number {
        font-size: 1.2rem;
        font-weight: bold;
        margin-bottom: 0.5rem;
    }

    .week .event-label {
        margin: 0.25rem 0;
        padding: 0.5rem;
        border-radius: 4px;
        background-color: #eee;
        cursor: pointer;
		max-width: unset;
    }

    .calendar-day.today {
        background-color: #f9f9f9;
    }

}