.bem-screen-reader-text {
	border: 0 !important;
	clip: rect(1px, 1px, 1px, 1px) !important;
	clip-path: inset(50%) !important;
	height: 1px !important;
	margin: -1px !important;
	overflow: hidden !important;
	padding: 0 !important;
	position: absolute !important;
	width: 1px !important;
	word-wrap: normal !important;
}

.bem-calendar {
	--bem-accent: #185adb;
	--bem-accent-contrast: #fff;
	--bem-surface: #fff;
	--bem-surface-muted: #f5f7fa;
	--bem-border: #dfe3e8;
	--bem-text: #1d2327;
	--bem-text-muted: #646970;
	--bem-filter-bg: #fff;
	--bem-filter-border: #8c8f94;
	--bem-filter-text: #1d2327;
	--bem-filter-label-color: #646970;
	--bem-filter-gap: 8px;
	background: var(--bem-surface);
	border: 1px solid var(--bem-border);
	border-radius: 12px;
	color: var(--bem-text);
	/* The compact layout follows the widget's own width, not the screen's,
	   so it also applies in a narrow column on a wide screen. */
	container: bem-calendar / inline-size;
	font-family: inherit;
	overflow: hidden;
}

.bem-calendar *,
.bem-calendar *::before,
.bem-calendar *::after {
	box-sizing: border-box;
}

.bem-calendar__toolbar {
	align-items: center;
	display: grid;
	gap: 16px;
	grid-template-columns: 1fr auto 1fr;
	padding: 18px;
}

.bem-calendar__navigation {
	align-items: center;
	display: flex;
	gap: 6px;
}

.bem-calendar__navigation-separator {
	color: var(--bem-border);
	font-size: 1.1rem;
	margin: 0 2px;
}

.bem-calendar__button {
	background: var(--bem-surface);
	border: 1px solid #8c8f94;
	border-radius: 6px;
	color: var(--bem-text);
	cursor: pointer;
	font: inherit;
	min-height: 38px;
	padding: 7px 12px;
}

.bem-calendar__button:hover,
.bem-calendar__button:focus-visible {
	border-color: var(--bem-accent);
	outline: 2px solid color-mix(in srgb, var(--bem-accent) 24%, transparent);
	outline-offset: 1px;
}

.bem-calendar__button--icon {
	font-size: 24px;
	line-height: 1;
	padding: 3px 12px;
}

.bem-calendar__title {
	font-size: clamp(1.2rem, 2.5vw, 1.7rem);
	line-height: 1.2;
	margin: 0;
	text-align: center;
	text-transform: capitalize;
}

.bem-calendar__filters {
	display: flex;
	justify-content: flex-end;
	padding: 0 18px 18px;
}

.bem-calendar__status {
	color: var(--bem-text-muted);
	min-height: 24px;
	padding: 0 18px 8px;
	text-align: center;
}

.bem-calendar__weekdays,
.bem-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}

.bem-calendar__weekdays {
	background: var(--bem-surface-muted);
	border-bottom: 1px solid var(--bem-border);
	border-top: 1px solid var(--bem-border);
}

.bem-calendar__weekday {
	color: var(--bem-text-muted);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .04em;
	padding: 9px 6px;
	text-align: center;
	text-transform: uppercase;
}

.bem-calendar__day {
	border-bottom: 1px solid var(--bem-border);
	border-right: 1px solid var(--bem-border);
	min-height: 112px;
	padding: 7px;
	position: relative;
}

.bem-calendar__day:nth-child(7n) {
	border-right: 0;
}

.bem-calendar__day.is-outside {
	background: var(--bem-surface-muted);
	color: var(--bem-text-muted);
}

.bem-calendar__day.is-selected {
	box-shadow: inset 0 0 0 2px var(--bem-accent);
}

.bem-calendar__day-number {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: inherit;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: .88rem;
	height: 30px;
	justify-content: center;
	padding: 0;
	width: 30px;
}

.bem-calendar__day-number:focus-visible {
	outline: 2px solid var(--bem-accent);
	outline-offset: 1px;
}

.bem-calendar__day.is-today .bem-calendar__day-number {
	background: var(--bem-accent);
	color: var(--bem-accent-contrast);
	font-weight: 700;
}

.bem-calendar__day-events {
	display: grid;
	gap: 4px;
	margin-top: 5px;
}

.bem-calendar__event-chip,
.bem-calendar__more {
	border: 0;
	border-radius: 4px;
	display: block;
	font-size: .76rem;
	line-height: 1.3;
	min-height: 24px;
	overflow: hidden;
	padding: 4px 6px;
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bem-calendar__event-chip {
	background: color-mix(in srgb, var(--bem-accent) 12%, var(--bem-surface));
	border-left: 3px solid var(--bem-accent);
	color: var(--bem-text);
	text-decoration: none;
}

.bem-calendar__event-chip:hover,
.bem-calendar__event-chip:focus-visible {
	background: color-mix(in srgb, var(--bem-accent) 20%, var(--bem-surface));
	color: var(--bem-text);
}

.bem-calendar__more {
	background: transparent;
	color: var(--bem-accent);
	cursor: pointer;
	padding-left: 3px;
}

.bem-calendar__agenda {
	padding: 22px;
}

.bem-calendar__agenda-title {
	font-size: 1.15rem;
	margin: 0 0 15px;
	scroll-margin-top: 24px;
}

.bem-calendar__agenda-item {
	align-items: start;
	border-top: 1px solid var(--bem-border);
	display: grid;
	gap: 16px;
	grid-template-columns: minmax(90px, 150px) 1fr;
	padding: 16px 0;
}

.bem-calendar__agenda-item:first-child {
	border-top: 0;
	padding-top: 0;
}

.bem-calendar__agenda-item:not(:has(.bem-calendar__agenda-image)) {
	grid-template-columns: 1fr;
}

.bem-calendar__agenda-image {
	aspect-ratio: 4 / 3;
	border-radius: 7px;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.bem-calendar__agenda-event-title {
	font-size: 1.05rem;
	margin: 0;
}

.bem-calendar__agenda-event-title a {
	color: var(--bem-text);
	text-decoration: none;
}

.bem-calendar__agenda-event-title a:hover,
.bem-calendar__agenda-event-title a:focus-visible {
	color: var(--bem-accent);
	text-decoration: underline;
}

.bem-calendar__agenda-meta,
.bem-calendar__agenda-admission,
.bem-calendar__agenda-excerpt,
.bem-calendar__empty {
	margin: 6px 0 0;
}

.bem-calendar__agenda-meta {
	color: var(--bem-text-muted);
	font-size: .9rem;
}

.bem-calendar__agenda-admission {
	font-weight: 700;
}

.bem-calendar__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.bem-calendar__category {
	background: var(--bem-surface-muted);
	border-radius: 999px;
	font-size: .75rem;
	padding: 3px 8px;
}

.bem-calendar.is-loading .bem-calendar__grid,
.bem-calendar.is-loading .bem-calendar__agenda {
	opacity: .55;
	pointer-events: none;
}

.bem-calendar .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Elements that only exist for the compact layout on small screens. */
.bem-calendar__filters-toggle,
.bem-calendar__day-count,
.bem-calendar__agenda-time,
.bem-calendar__agenda-title-short {
	display: none;
}

.bem-calendar__agenda-meta-part + .bem-calendar__agenda-meta-part::before {
	content: " · ";
}

/* Small screens: the month is a compact date picker (whole cell tappable,
   event count instead of chips) with the chosen day's events listed below. */
@container bem-calendar (max-width: 760px) {
	/* "‹ April 2027 ›" on top, the other actions below it. */
	.bem-calendar__toolbar {
		display: flex;
		flex-wrap: wrap;
		gap: 10px 6px;
		padding: 14px;
	}

	.bem-calendar__navigation {
		display: contents;
	}

	.bem-calendar__navigation-separator {
		display: none;
	}

	.bem-calendar__toolbar .bem-calendar__button {
		order: 4;
	}

	.bem-calendar__toolbar .bem-calendar__button[data-bem-prev] {
		order: 1;
	}

	.bem-calendar__title {
		flex: 1 1 calc(100% - 100px);
		order: 2;
	}

	.bem-calendar__toolbar .bem-calendar__button[data-bem-next] {
		order: 3;
	}

	.bem-calendar__toolbar .bem-calendar__button--icon {
		min-height: 44px;
		padding: 0;
		width: 44px;
	}

	.bem-calendar__toolbar .bem-calendar__filters-toggle {
		display: block;
		margin-left: auto;
		order: 5;
	}


	.bem-calendar__filters {
		display: none;
		padding: 0 14px 14px;
	}

	.bem-calendar.is-filters-open .bem-calendar__filters {
		display: block;
	}

	/* One field per row, only "Von"/"Bis" share one. */
	.bem-calendar__filters .bem-filter {
		flex: 1 1 100%;
		min-width: 0;
	}

	.bem-calendar__filters .bem-filter--date {
		flex-basis: calc(50% - var(--bem-filter-gap, 8px));
	}

	.bem-calendar__filters .bem-filter select,
	.bem-calendar__filters .bem-filter input[type="date"] {
		width: 100%;
	}

	/* Keep the theme's button colors off tapped controls: on touch screens
	   hover/focus stay applied after the tap, and a tapped day keeps focus. */
	.bem-calendar .bem-calendar__toolbar .bem-calendar__button:hover,
	.bem-calendar .bem-calendar__toolbar .bem-calendar__button:focus {
		background: var(--bem-surface);
		color: var(--bem-text);
	}

	.bem-calendar .bem-calendar__toolbar .bem-calendar__filters-toggle.has-active-filters {
		border-color: var(--bem-accent);
		color: var(--bem-accent);
		font-weight: 600;
	}

	.bem-calendar .bem-calendar__day .bem-calendar__day-number:hover,
	.bem-calendar .bem-calendar__day .bem-calendar__day-number:focus {
		background: transparent;
		color: inherit;
	}

	.bem-calendar .bem-calendar__day.is-today .bem-calendar__day-number,
	.bem-calendar .bem-calendar__day.is-today .bem-calendar__day-number:hover,
	.bem-calendar .bem-calendar__day.is-today .bem-calendar__day-number:focus {
		background: var(--bem-accent);
		color: var(--bem-accent-contrast);
	}

	.bem-calendar__status:empty {
		min-height: 0;
		padding: 0;
	}

	.bem-calendar__weekday {
		font-size: .68rem;
		padding: 7px 2px;
	}

	.bem-calendar__day {
		align-items: center;
		display: flex;
		flex-direction: column;
		gap: 2px;
		min-height: 54px;
		padding: 3px 2px 4px;
	}

	.bem-calendar__day.is-selected {
		background: color-mix(in srgb, var(--bem-accent) 10%, var(--bem-surface));
	}

	.bem-calendar__day.is-trailing-week,
	.bem-calendar__day-events {
		display: none;
	}

	.bem-calendar__day-number {
		height: 26px;
		width: 26px;
	}

	/* Stretch the day button over its whole cell. */
	.bem-calendar__day-number::after {
		content: "";
		inset: 0;
		position: absolute;
	}

	.bem-calendar__day-count {
		background: color-mix(in srgb, var(--bem-accent) 14%, var(--bem-surface));
		border-radius: 999px;
		color: var(--bem-accent);
		display: block;
		font-size: .72rem;
		font-weight: 700;
		line-height: 18px;
		min-width: 22px;
		padding: 0 5px;
		pointer-events: none;
		text-align: center;
	}

	.bem-calendar__day.is-outside .bem-calendar__day-count {
		background: var(--bem-surface);
		color: var(--bem-text-muted);
	}

	.bem-calendar__agenda {
		padding: 16px;
	}

	.bem-calendar__agenda-title {
		font-size: 1.02rem;
		margin-bottom: 4px;
	}

	.bem-calendar__agenda-title-long {
		display: none;
	}

	.bem-calendar__agenda-title-short {
		display: inline;
	}

	/* Compact list: time | title + place | chevron, the whole row is the link. */
	.bem-calendar__agenda .bem-calendar__agenda-item,
	.bem-calendar__agenda .bem-calendar__agenda-item:not(:has(.bem-calendar__agenda-image)) {
		gap: 0 10px;
		grid-template-columns: 4rem minmax(0, 1fr) auto;
		padding: 12px 0;
		position: relative;
	}

	.bem-calendar__agenda-item::after {
		align-self: center;
		color: var(--bem-text-muted);
		content: "›";
		font-size: 1.3rem;
		grid-column: 3;
		grid-row: 1;
		line-height: 1;
	}

	.bem-calendar__agenda-time {
		display: block;
		font-size: .84rem;
		font-variant-numeric: tabular-nums;
		font-weight: 600;
		line-height: 1.5;
	}

	/* All-matches search list: the date is part of the text, no time column. */
	.bem-calendar__agenda-item:not(:has(.bem-calendar__agenda-time)) .bem-calendar__agenda-content {
		grid-column: 1 / 3;
	}

	.bem-calendar__agenda-event-title {
		font-size: .98rem;
		line-height: 1.35;
	}

	.bem-calendar__agenda-event-title a::after {
		content: "";
		inset: 0;
		position: absolute;
	}

	.bem-calendar__agenda-meta {
		font-size: .84rem;
		margin-top: 2px;
	}

	.bem-calendar__agenda-item .bem-calendar__agenda-image,
	.bem-calendar__agenda-item .bem-calendar__agenda-series,
	.bem-calendar__agenda-item .bem-calendar__agenda-admission,
	.bem-calendar__agenda-item .bem-calendar__agenda-excerpt,
	.bem-calendar__agenda-item .bem-calendar__categories,
	.bem-calendar__agenda-meta-part--time,
	.bem-calendar__agenda-meta-part--secondary {
		display: none;
	}

	.bem-calendar__agenda-meta-part--time + .bem-calendar__agenda-meta-part::before {
		content: none;
	}
}

/* Event modal */
.bem-modal {
	--bem-accent: #185adb;
	--bem-accent-contrast: #fff;
	--bem-surface: #fff;
	--bem-surface-muted: #f5f7fa;
	--bem-border: #dfe3e8;
	--bem-text: #1d2327;
	--bem-text-muted: #646970;
	align-items: center;
	background: rgba(15, 23, 42, .55);
	display: flex;
	inset: 0;
	justify-content: center;
	opacity: 0;
	padding: 20px;
	position: fixed;
	transition: opacity .18s ease;
	z-index: 100000;
}

.bem-modal[hidden] {
	display: none;
}

.bem-modal.is-open {
	opacity: 1;
}

.bem-modal *,
.bem-modal *::before,
.bem-modal *::after {
	box-sizing: border-box;
}

.bem-modal__dialog {
	background: var(--bem-surface);
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
	color: var(--bem-text);
	max-height: calc(100vh - 40px);
	max-width: 520px;
	overflow-y: auto;
	position: relative;
	transform: translateY(12px) scale(.98);
	transition: transform .18s ease;
	width: 100%;
}

.bem-modal.is-open .bem-modal__dialog {
	transform: none;
}

.bem-modal__dialog:focus {
	outline: none;
}

.bem-modal__close {
	align-items: center;
	background: rgba(255, 255, 255, .85);
	border: 0;
	border-radius: 50%;
	color: var(--bem-text);
	cursor: pointer;
	display: flex;
	font-size: 26px;
	height: 36px;
	justify-content: center;
	line-height: 1;
	position: absolute;
	right: 12px;
	top: 12px;
	width: 36px;
}

.bem-modal__close:hover,
.bem-modal__close:focus-visible {
	background: var(--bem-surface-muted);
	outline: 2px solid color-mix(in srgb, var(--bem-accent) 30%, transparent);
	outline-offset: 1px;
}

.bem-modal__media {
	margin: 0;
}

.bem-modal__image {
	aspect-ratio: 16 / 9;
	border-radius: 14px 14px 0 0;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.bem-modal__body {
	padding: 24px;
}

.bem-modal__title {
	font-size: 1.4rem;
	line-height: 1.25;
	margin: 0 40px 16px 0;
}

.bem-modal__row {
	display: grid;
	gap: 2px 14px;
	grid-template-columns: 120px 1fr;
	padding: 7px 0;
}

.bem-modal__row + .bem-modal__row {
	border-top: 1px solid var(--bem-border);
}

.bem-modal__label {
	color: var(--bem-text-muted);
	font-size: .85rem;
	font-weight: 600;
}

.bem-modal__value {
	font-size: .95rem;
}

.bem-modal__excerpt {
	color: var(--bem-text);
	line-height: 1.55;
	margin: 16px 0 0;
}

.bem-modal .bem-calendar__categories {
	margin-top: 16px;
}

.bem-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

.bem-modal__action {
	background: var(--bem-modal-secondary-bg, transparent);
	border: 1px solid var(--bem-modal-secondary-border, var(--bem-accent));
	border-radius: 8px;
	color: var(--bem-modal-secondary-text, var(--bem-accent));
	display: inline-block;
	font-weight: 600;
	padding: 9px 16px;
	text-decoration: none;
}

.bem-modal__action:hover,
.bem-modal__action:focus-visible {
	background: var(--bem-modal-secondary-bg, color-mix(in srgb, var(--bem-accent) 12%, var(--bem-surface)));
	color: var(--bem-modal-secondary-text, var(--bem-accent));
}

.bem-modal__action--primary {
	background: var(--bem-modal-primary-bg, var(--bem-accent));
	border-color: var(--bem-modal-primary-border, var(--bem-modal-primary-bg, var(--bem-accent)));
	color: var(--bem-modal-primary-text, var(--bem-accent-contrast));
}

.bem-modal__action--primary:hover,
.bem-modal__action--primary:focus-visible {
	background: var(--bem-modal-primary-bg, color-mix(in srgb, var(--bem-accent) 85%, #000));
	color: var(--bem-modal-primary-text, var(--bem-accent-contrast));
}

body.bem-modal-open {
	overflow: hidden;
}

/* Single event detail page */
.bem-event-detail {
	--bem-accent: #185adb;
	--bem-accent-contrast: #fff;
	--bem-surface: #fff;
	--bem-surface-muted: #f5f7fa;
	--bem-border: #dfe3e8;
	--bem-text: #1d2327;
	--bem-text-muted: #646970;
	background: var(--bem-surface);
	border-radius: 18px;
	color: var(--bem-text);
	margin: 0 0 36px;
	overflow: hidden;
}

.bem-event-detail *,
.bem-event-detail *::before,
.bem-event-detail *::after {
	box-sizing: border-box;
}

.bem-event-detail__media {
	aspect-ratio: 16 / 5;
	background: var(--bem-surface-muted);
	margin: 0;
	max-height: 420px;
	min-height: 240px;
	overflow: hidden;
	position: relative;
}

.bem-event-detail__image {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.bem-event-detail__media::after {
	background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .42));
	content: '';
	inset: 0;
	pointer-events: none;
	position: absolute;
}

.bem-event-detail__media-status {
	bottom: 22px;
	left: 24px;
	margin: 0;
	position: absolute;
	z-index: 1;
}

.bem-event-detail__media-status .bem-status-badge,
.bem-event-detail__status .bem-status-badge {
	box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
	font-size: .78rem;
	margin: 0;
	padding: 6px 13px;
}

.bem-event-detail__status {
	margin: 0;
	padding: 28px 32px 0;
}

.bem-event-detail__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.8fr) minmax(280px, .8fr);
}

.bem-event-detail__layout--single {
	grid-template-columns: minmax(0, 1fr);
}

.bem-event-detail__layout--single .bem-event-detail__booking {
	border-left: 0;
}

.bem-event-detail__information {
	padding: 32px;
}

.bem-event-detail__heading,
.bem-event-detail__booking-title {
	color: var(--bem-text);
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 18px;
	padding: 0;
}

.bem-event-detail__facts {
	margin: 0;
}

.bem-event-detail__fact {
	border-top: 1px solid var(--bem-border);
	display: grid;
	gap: 6px 22px;
	grid-template-columns: 132px minmax(0, 1fr);
	padding: 15px 0;
}

.bem-event-detail__label {
	color: var(--bem-text-muted);
	font-size: .88rem;
	font-weight: 600;
	margin: 0;
}

.bem-event-detail__value {
	font-weight: 500;
	line-height: 1.5;
	margin: 0;
}

.bem-event-detail__categories {
	margin-top: 20px;
}

.bem-event-detail__booking {
	background: var(--bem-surface-muted);
	border-left: 1px solid var(--bem-border);
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 32px;
}

.bem-event-detail__booking-copy {
	color: var(--bem-text-muted);
	font-size: .92rem;
	line-height: 1.55;
	margin: 0 0 20px;
}

.bem-event-detail__button {
	background: var(--bem-accent);
	border: 1px solid var(--bem-accent);
	border-radius: 9px;
	color: var(--bem-accent-contrast);
	display: block;
	font-weight: 700;
	padding: 12px 18px;
	text-align: center;
	text-decoration: none;
	transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.bem-event-detail__button:hover,
.bem-event-detail__button:focus-visible {
	background: color-mix(in srgb, var(--bem-accent) 85%, #000);
	border-color: color-mix(in srgb, var(--bem-accent) 85%, #000);
	color: var(--bem-accent-contrast);
	transform: translateY(-1px);
}

.bem-event-detail__button.is-disabled {
	background: var(--bem-text-muted);
	border-color: var(--bem-text-muted);
	cursor: not-allowed;
	opacity: .75;
}

.bem-event-detail__back {
	align-self: flex-start;
	color: var(--bem-text-muted);
	font-size: .9rem;
	font-weight: 600;
	margin-top: 22px;
	text-decoration: none;
}

.bem-event-detail__back:hover,
.bem-event-detail__back:focus-visible {
	color: var(--bem-accent);
	text-decoration: underline;
}

.bem-event-detail__notice {
	background: var(--bem-surface);
	border: 1px solid var(--bem-border);
	border-left: 3px solid var(--bem-accent);
	border-radius: 6px;
	color: var(--bem-text);
	font-size: .92rem;
	line-height: 1.55;
	margin: 0 0 20px;
	padding: 12px 16px;
}

/* The ticket CTA and the sold-out badge carry no bottom margin. */
.bem-event-detail__button + .bem-event-detail__notice {
	margin-top: 20px;
}

.bem-event-detail__notice-text {
	margin: 0;
}

.bem-event-detail__notice-link {
	color: var(--bem-accent);
	font-weight: 600;
	text-decoration: underline;
}

.bem-event-detail__notice-link:hover,
.bem-event-detail__notice-link:focus-visible {
	color: color-mix(in srgb, var(--bem-accent) 80%, #000);
}

.bem-event-detail__pretix {
	background: var(--bem-surface);
	border-top: 1px solid var(--bem-border);
	padding: 32px;
}

.bem-event-detail__map {
	background: var(--bem-surface);
	border-top: 1px solid var(--bem-border);
	padding: 32px;
}

/* Series: "Teil der Veranstaltungsreihe …" and "Weitere Termine dieser Reihe" */
.bem-event-detail__series {
	color: var(--bem-text-muted);
	line-height: 1.5;
	margin: -8px 0 18px;
}

.bem-event-detail__series-link,
.bem-event-detail__series-all {
	color: var(--bem-accent);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.bem-event-detail__series-dates {
	background: var(--bem-surface);
	border-top: 1px solid var(--bem-border);
	padding: 32px;
}

.bem-event-detail__series-list {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.bem-event-detail__series-item {
	align-items: center;
	border-top: 1px solid var(--bem-border);
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	padding: 12px 0;
}

.bem-event-detail__series-item:last-child {
	border-bottom: 1px solid var(--bem-border);
}

.bem-event-detail__series-item-link {
	color: var(--bem-text);
	display: grid;
	flex: 1 1 auto;
	gap: 2px 16px;
	grid-template-columns: minmax(0, auto) minmax(0, 1fr);
	text-decoration: none;
}

.bem-event-detail__series-item-date {
	font-weight: 600;
}

.bem-event-detail__series-item-title {
	color: var(--bem-text-muted);
}

.bem-event-detail__series-item-link:hover .bem-event-detail__series-item-date,
.bem-event-detail__series-item-link:focus-visible .bem-event-detail__series-item-date {
	color: var(--bem-accent);
	text-decoration: underline;
}

.bem-event-detail__series-item.is-cancelled .bem-event-detail__series-item-date {
	text-decoration: line-through;
}

/* "Reihe: …" in the calendar's day list, the list view and the modal */
.bem-calendar__agenda-series {
	color: var(--bem-text-muted);
	font-size: .9rem;
	margin: 6px 0 0;
}

.bem-event-list__series {
	color: var(--bem-text-muted);
}

.bem-series-link {
	color: var(--bem-accent);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.bem-series-link:hover,
.bem-series-link:focus-visible {
	text-decoration-thickness: 2px;
}

.bem-series-name {
	font-weight: 600;
}

.bem-event-detail__map-frame {
	height: 400px;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.bem-event-detail__map-frame iframe {
	border: 0;
	display: block;
	height: 100%;
	width: 100%;
}

.bem-event-detail__content,
.bem-event-detail__description {
	background: var(--bem-surface);
	border-top: 1px solid var(--bem-border);
	line-height: 1.7;
	padding: 32px;
}

.bem-event-detail__content > :first-child,
.bem-event-detail__description > :first-child {
	margin-top: 0;
}

.bem-event-detail__content > :last-child,
.bem-event-detail__description > :last-child {
	margin-bottom: 0;
}

.bem-event-detail__content img,
.bem-event-detail__description img {
	height: auto;
	max-width: 100%;
}

.bem-event-detail__pretix pretix-widget,
.bem-event-detail__pretix .pretix-widget-compat {
	display: block;
	width: 100%;
}

@media (max-width: 760px) {
	.bem-event-detail__media {
		aspect-ratio: 16 / 7;
		min-height: 200px;
	}

	.bem-event-detail__layout {
		grid-template-columns: 1fr;
	}

	.bem-event-detail__booking {
		border-left: 0;
		border-top: 1px solid var(--bem-border);
	}
}

@media (max-width: 480px) {
	.bem-event-detail {
		border-radius: 12px;
	}

	.bem-event-detail__media {
		aspect-ratio: 4 / 3;
		min-height: 180px;
	}

	.bem-event-detail__information,
	.bem-event-detail__booking,
	.bem-event-detail__content,
	.bem-event-detail__description,
	.bem-event-detail__series-dates,
	.bem-event-detail__map,
	.bem-event-detail__pretix {
		padding: 24px 20px;
	}

	.bem-event-detail__series-item-link {
		grid-template-columns: 1fr;
	}

	.bem-event-detail__map-frame {
		height: 280px;
	}

	.bem-event-detail__fact {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.bem-modal__row {
		grid-template-columns: 1fr;
	}

	.bem-modal__actions .bem-modal__action {
		flex: 1 1 auto;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bem-calendar *,
	.bem-calendar *::before,
	.bem-calendar *::after {
		scroll-behavior: auto !important;
	}

	.bem-modal,
	.bem-modal__dialog {
		transition: none;
	}
}

/* Shared taxonomy filter bar (calendar + list) */
/* The bar always spans the full width, so few filters don't leave it
   shrunk to its content next to the "Merkliste" button, and the widget's
   "Ausrichtung" control has room to align the filters within it. */
.bem-calendar__filters > .bem-filters,
.bem-event-list__filters-panel > .bem-filters {
	flex: 1 1 100%;
	min-width: 0;
}

.bem-filters {
	align-items: flex-end;
	display: flex;
	flex-wrap: wrap;
	gap: var(--bem-filter-gap, 8px);
	justify-content: flex-start;
}

.bem-filter {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.bem-filter__label {
	color: var(--bem-filter-label-color, #646970);
	font: inherit;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .01em;
}

.bem-filters select,
.bem-filters input[type="date"] {
	background: var(--bem-filter-bg, #fff);
	border: 1px solid var(--bem-filter-border, #8c8f94);
	border-radius: 6px;
	color: var(--bem-filter-text, #1d2327);
	font: inherit;
	min-height: 38px;
	padding: 7px 12px;
}

/* Full-text search field: grows with the free space and takes the whole
   first row when it is the first filter (the default). */
.bem-filter--search {
	flex: 2 1 260px;
}

.bem-filters > .bem-filter--search:first-child {
	flex-basis: 100%;
}

.bem-filters input[type="search"] {
	-webkit-appearance: none;
	appearance: none;
	background: var(--bem-filter-bg, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23646970' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px 50%;
	border: 1px solid var(--bem-filter-border, #8c8f94);
	border-radius: 6px;
	box-sizing: border-box;
	color: var(--bem-filter-text, #1d2327);
	font: inherit;
	min-height: 38px;
	padding: 7px 12px 7px 40px;
	width: 100%;
}

.bem-filters input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: searchfield-cancel-button;
	cursor: pointer;
}

.bem-filters input[type="search"]:focus-visible,
.bem-filters select:focus-visible,
.bem-filters input[type="date"]:focus-visible {
	border-color: var(--bem-accent, #185adb);
	outline: 2px solid color-mix(in srgb, var(--bem-accent, #185adb) 24%, transparent);
	outline-offset: 1px;
}

.bem-filters__reset {
	background: none;
	border: 0;
	color: var(--bem-accent, #185adb);
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	min-height: 38px;
	padding: 7px 4px;
	text-decoration: none;
}

.bem-filters__reset:hover,
.bem-filters__reset:focus-visible,
.bem-filters__reset:active {
	/* Explicitly overrides theme/browser default button hover/focus
	   backgrounds — this is a plain <button> element, not a themed one. */
	background: none;
	color: var(--bem-accent, #185adb);
}

/* Grouped meta-data checkbox filter, e.g. several VR-Ticket "Zielgruppe"
   fields combined into one multi-select (see Calendar::render_meta_filter_group()). */
.bem-filter--group {
	background: var(--bem-filter-bg, #fff);
	border: 1px solid var(--bem-filter-border, #8c8f94);
	border-radius: 6px;
	margin: 0;
	padding: 8px 14px 10px;
}

.bem-filter--group legend {
	color: var(--bem-filter-label-color, #646970);
	font: inherit;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .01em;
	padding: 0 4px;
}

.bem-filter--group__values {
	column-gap: 16px;
	display: flex;
	flex-wrap: wrap;
	row-gap: 4px;
}

.bem-filter__checkbox {
	align-items: center;
	color: var(--bem-filter-text, #1d2327);
	display: flex;
	flex: 0 0 auto;
	font: inherit;
	gap: 6px;
	min-height: 32px;
}

.bem-filter__checkbox input[type="checkbox"] {
	accent-color: var(--bem-accent, #185adb);
	height: 16px;
	width: 16px;
}

.bem-filter__checkbox input[type="checkbox"]:focus-visible {
	outline: 2px solid color-mix(in srgb, var(--bem-accent, #185adb) 24%, transparent);
	outline-offset: 1px;
}

/* Event list view */
.bem-event-list {
	--bem-accent: #185adb;
	--bem-accent-contrast: #fff;
	--bem-surface: #fff;
	--bem-border: #e3e6ea;
	--bem-text: #14181d;
	--bem-text-muted: #5b6470;
	--bem-date-bg: #101216;
	--bem-media-bg: #0f172a;
	--bem-filter-bg: #fff;
	--bem-filter-border: #8c8f94;
	--bem-filter-text: #1d2327;
	--bem-filter-label-color: #5b6470;
	--bem-filter-gap: 8px;
	color: var(--bem-text);
	/* See .bem-calendar: the layout follows the widget's own width. */
	container: bem-event-list / inline-size;
	font-family: inherit;
}

/* A query container has no width of its own content, so in an Elementor
   row container the widget would shrink to nothing. Elementor gives its own
   such widgets (video, maps) full width the same way; a width set on the
   widget in Elementor still wins through its more specific selector. */
.e-con .elementor-widget-booker-event-calendar {
	width: 100%;
}

.bem-event-list *,
.bem-event-list *::before,
.bem-event-list *::after {
	box-sizing: border-box;
}

.bem-event-list__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 6px;
	justify-content: flex-end;
	margin-bottom: 30px;
}

.bem-event-list__filters-toggle {
	display: none;
}

/* Only a hook for the toggle: without it, the bar lays out as if unwrapped. */
.bem-event-list__filters-panel {
	display: contents;
}

/* Narrow widget: "Merkliste" and "Filter" in one row, the bar collapsed below. */
@container bem-event-list (max-width: 760px) {
	/* One field per row, only "Von"/"Bis" share one. */
	.bem-event-list__filters-panel .bem-filter {
		flex: 1 1 100%;
		min-width: 0;
	}

	.bem-event-list__filters-panel .bem-filter--date {
		flex-basis: calc(50% - var(--bem-filter-gap, 8px));
	}

	.bem-event-list__filters-panel .bem-filter select,
	.bem-event-list__filters-panel .bem-filter input[type="date"] {
		width: 100%;
	}

	.bem-event-list__filters {
		flex-wrap: wrap;
		gap: 10px 6px;
		justify-content: flex-start;
		margin-bottom: 20px;
	}

	.bem-event-list .bem-event-list__filters-toggle {
		display: block;
		margin-left: auto;
	}

	.bem-event-list__filters-panel {
		display: none;
		flex: 1 1 100%;
		min-width: 0;
	}

	.bem-event-list.is-filters-open .bem-event-list__filters-panel {
		display: block;
	}

	/* Same theme-color guard as the calendar toolbar. */
	.bem-event-list .bem-event-list__filters .bem-event-list__filters-toggle:hover,
	.bem-event-list .bem-event-list__filters .bem-event-list__filters-toggle:focus,
	.bem-event-list .bem-event-list__filters .bem-watchlist-open:hover,
	.bem-event-list .bem-event-list__filters .bem-watchlist-open:focus {
		background: var(--bem-surface);
		color: var(--bem-text);
	}

	.bem-event-list .bem-event-list__filters .bem-event-list__filters-toggle.has-active-filters {
		border-color: var(--bem-accent);
		color: var(--bem-accent);
		font-weight: 600;
	}
}

.bem-event-list__status {
	color: var(--bem-text-muted);
	min-height: 20px;
}

.bem-event-list__status:empty {
	min-height: 0;
}

.bem-event-list__month {
	align-items: center;
	display: flex;
	gap: 24px;
	margin: 10px 0 28px;
}

.bem-event-list__event + .bem-event-list__month {
	margin-top: 26px;
}

.bem-event-list__month-label {
	font-size: clamp(1.25rem, 2.5vw, 1.6rem);
	font-weight: 600;
	letter-spacing: .01em;
	margin: 0;
	text-transform: capitalize;
	white-space: nowrap;
}

.bem-event-list__month-rule {
	background: var(--bem-border);
	flex: 1;
	height: 1px;
}

.bem-event-list__event {
	margin-bottom: 42px;
}

.bem-event-list__figure {
	align-items: stretch;
	border: 1px solid var(--bem-border);
	display: grid;
	grid-template-areas: "date media body";
	grid-template-columns: 168px minmax(0, 1.7fr) minmax(260px, 1fr);
	overflow: hidden;
}

.bem-event-list--no-image .bem-event-list__figure {
	grid-template-areas: "date body";
	grid-template-columns: 168px minmax(0, 1fr);
}

.bem-event-list__date {
	align-items: center;
	background: var(--bem-date-bg);
	color: #fff;
	display: flex;
	flex-direction: column;
	gap: 6px;
	grid-area: date;
	justify-content: center;
	padding: 26px 14px;
	text-align: center;
}

.bem-event-list__day {
	font-size: 2.6rem;
	font-weight: 700;
	line-height: 1;
}

.bem-event-list__month-year {
	font-size: .95rem;
	font-weight: 600;
	text-transform: capitalize;
}

.bem-event-list__weekday {
	color: rgba(255, 255, 255, .68);
	font-size: .85rem;
}

.bem-event-list__media {
	align-self: stretch;
	background: var(--bem-media-bg);
	display: block;
	grid-area: media;
	min-height: 210px;
	overflow: hidden;
	position: relative;
}

.bem-event-list__image {
	height: 100%;
	inset: 0;
	position: absolute;
	transition: transform .45s ease;
	width: 100%;
}

.bem-event-list__image--backdrop {
	filter: blur(24px) brightness(.7) saturate(1.1);
	object-fit: cover;
	transform: scale(1.15);
}

.bem-event-list__image--fg {
	height: auto;
	inset: auto;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
}

.bem-event-list__media:hover .bem-event-list__image--fg,
.bem-event-list__media:focus-visible .bem-event-list__image--fg {
	transform: translateY(-50%) scale(1.05);
}

.bem-event-list__media--placeholder {
	align-items: center;
	background: linear-gradient(135deg, #1f2937, #0f172a);
	color: #fff;
	display: flex;
	justify-content: center;
	padding: 20px;
}

.bem-event-list__placeholder {
	font-size: 1.1rem;
	font-weight: 600;
	opacity: .92;
	text-align: center;
}

.bem-event-list__body {
	display: flex;
	flex-direction: column;
	grid-area: body;
	justify-content: center;
	padding: 24px 28px;
}

.bem-event-list__heading {
	margin: 0 0 10px;
}

.bem-event-list__title {
	color: var(--bem-text);
	font-size: clamp(1.3rem, 2vw, 1.7rem);
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

.bem-event-list__title:hover,
.bem-event-list__title:focus-visible {
	color: var(--bem-accent);
}

.bem-event-list__meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 20px;
}

.bem-event-list__time {
	font-weight: 600;
}

.bem-event-list__venue {
	color: var(--bem-text-muted);
}

.bem-event-list__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.bem-event-list__button {
	border: 1px solid var(--bem-accent);
	border-radius: 8px;
	color: var(--bem-accent);
	display: inline-block;
	font-weight: 600;
	padding: 10px 22px;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}

.bem-event-list__button:hover,
.bem-event-list__button:focus-visible {
	background: color-mix(in srgb, var(--bem-accent) 12%, var(--bem-surface));
	color: var(--bem-accent);
}

.bem-event-list__button--primary {
	background: var(--bem-accent);
	color: var(--bem-accent-contrast);
}

.bem-event-list__button--primary:hover,
.bem-event-list__button--primary:focus-visible {
	background: color-mix(in srgb, var(--bem-accent) 86%, #000);
	color: var(--bem-accent-contrast);
}

.bem-event-list__empty {
	color: var(--bem-text-muted);
	padding: 20px 0;
}

.bem-event-list.is-loading .bem-event-list__items {
	opacity: .55;
	pointer-events: none;
}

.bem-event-list__pagination {
	align-items: center;
	display: flex;
	gap: 16px;
	justify-content: center;
	margin-top: 28px;
}

/* display: flex above would otherwise override the hidden attribute the
   script sets when everything fits on one page. */
.bem-event-list__pagination[hidden] {
	display: none;
}

.bem-event-list__page-button {
	background: transparent;
	border: 1px solid var(--bem-accent);
	border-radius: 8px;
	color: var(--bem-accent);
	cursor: pointer;
	font-weight: 600;
	padding: 10px 22px;
	transition: background-color .15s ease, color .15s ease, opacity .15s ease;
}

.bem-event-list__page-button:hover:not(:disabled),
.bem-event-list__page-button:focus-visible:not(:disabled) {
	background: color-mix(in srgb, var(--bem-accent) 12%, var(--bem-surface));
}

.bem-event-list__page-button:disabled {
	cursor: not-allowed;
	opacity: .4;
}

.bem-event-list__page-info {
	color: var(--bem-text-muted);
	font-size: .9rem;
	font-weight: 600;
}

@container bem-event-list (max-width: 900px) {
	.bem-event-list__figure {
		grid-template-areas:
			"date media"
			"body body";
		grid-template-columns: 168px minmax(0, 1fr);
	}

	.bem-event-list--no-image .bem-event-list__figure {
		grid-template-areas: "date body";
		grid-template-columns: 168px minmax(0, 1fr);
	}
}

@container bem-event-list (max-width: 540px) {
	.bem-event-list__figure {
		grid-template-areas:
			"date"
			"media"
			"body";
		grid-template-columns: 1fr;
	}

	.bem-event-list--no-image .bem-event-list__figure {
		grid-template-areas:
			"date"
			"body";
		grid-template-columns: 1fr;
	}

	.bem-event-list__date {
		flex-direction: row;
		gap: 14px;
		justify-content: flex-start;
		padding: 14px 18px;
	}

	.bem-event-list__day {
		font-size: 1.9rem;
	}

	.bem-event-list__media {
		min-height: 180px;
	}

	.bem-event-list__actions .bem-event-list__button {
		flex: 1 1 auto;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bem-event-list__image {
		transition: none;
	}
}

/* Status badges */
.bem-status-badge {
	border-radius: 999px;
	color: #fff;
	display: inline-block;
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1.5;
	margin: 0 0 12px;
	padding: 3px 12px;
	text-transform: uppercase;
	vertical-align: middle;
}

.bem-status-badge--cancelled {
	background: #b32d2e;
}

.bem-status-badge--sold-out {
	background: #52585d;
}

.bem-status-badge--postponed,
.bem-status-badge--few-tickets {
	background: #a86100;
}

/* Cancelled event de-emphasis */
.bem-event-list__event.is-cancelled .bem-event-list__media,
.bem-event-list__event.is-cancelled .bem-event-list__date {
	filter: grayscale(1);
	opacity: .7;
}

.bem-event-list__event.is-cancelled .bem-event-list__title,
.bem-calendar__event-chip.is-cancelled,
.bem-calendar__agenda-item.is-cancelled .bem-calendar__agenda-event-title {
	text-decoration: line-through;
}

.bem-calendar__event-chip.is-cancelled,
.bem-calendar__agenda-item.is-cancelled {
	opacity: .75;
}

/* Disabled ticket button (sold out) */
.bem-event-list__button.is-disabled,
.bem-modal__action.is-disabled {
	background: #52585d;
	border-color: #52585d;
	color: #fff;
	cursor: not-allowed;
	opacity: .9;
	pointer-events: none;
}

.bem-event-detail__status {
	margin: 0 0 16px;
}

/* Consistent, high-contrast keyboard focus across all public components. */
.bem-calendar a:focus-visible,
.bem-calendar button:focus-visible,
.bem-calendar select:focus-visible,
.bem-event-list a:focus-visible,
.bem-event-list button:focus-visible,
.bem-event-list select:focus-visible,
.bem-event-detail a:focus-visible,
.bem-event-detail button:focus-visible,
.bem-modal a:focus-visible,
.bem-modal button:focus-visible,
.bem-calendar__agenda-title:focus-visible {
	outline: 3px solid var(--bem-accent);
	outline-offset: 3px;
}

.bem-event-list__media:focus-visible {
	outline-offset: -4px;
}

@media (forced-colors: active) {
	.bem-status-badge,
	.bem-event-list__button,
	.bem-event-detail__button,
	.bem-modal__action {
		border: 1px solid ButtonText;
	}
}

/* "Merken" toggle button — reuses its host's existing button class
   (.bem-modal__action or .bem-event-list__button) for the resting look;
   those classes were written for <a> so this adds the <button>-specific
   resets, plus the bookmarked (is-active) state. */
.bem-watchlist-toggle {
	cursor: pointer;
	font: inherit;
	font-weight: 600;
}

.bem-watchlist-toggle.is-active,
.bem-watchlist-toggle.is-active:hover,
.bem-watchlist-toggle.is-active:focus,
.bem-watchlist-toggle.is-active:focus-visible {
	background: var(--bem-accent);
	color: var(--bem-accent-contrast);
}

/* The event detail page's "Merken" button gets its own class rather than
   reusing .bem-event-detail__button: that class is a common target for
   per-template custom CSS on the ticket CTA (e.g. in Elementor), which
   would otherwise leak onto this unrelated button too. Both class names
   combined keep this selector's specificity safely above the theme's own
   `button` reset rules regardless of stylesheet load order. */
.bem-event-detail__watchlist-button.bem-watchlist-toggle {
	border: 1px solid var(--bem-accent);
	border-radius: 9px;
	display: block;
	padding: 12px 18px;
	text-align: center;
	transition: background-color .2s ease, color .2s ease;
}

/* :not(.is-active) here, not just on .bem-watchlist-toggle.is-active above:
   both selectors are two classes deep (equal specificity), so without the
   guard this rule — coming later in the file — would win the tie and
   silently override the bookmarked (is-active) look back to resting. */
.bem-event-detail__watchlist-button.bem-watchlist-toggle:not(.is-active) {
	background: transparent;
	color: var(--bem-accent);
}

.bem-event-detail__watchlist-button.bem-watchlist-toggle:not(.is-active):hover,
.bem-event-detail__watchlist-button.bem-watchlist-toggle:not(.is-active):focus-visible {
	background: color-mix(in srgb, var(--bem-accent) 12%, transparent);
}

/* "Merkliste" toolbar button, next to the date filters. */
.bem-filter--watchlist {
	justify-content: flex-end;
}

.bem-watchlist-open {
	background: var(--bem-surface);
	border: 1px solid #8c8f94;
	border-radius: 6px;
	color: var(--bem-text);
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	min-height: 38px;
	padding: 7px 14px;
}

.bem-watchlist-open:hover,
.bem-watchlist-open:focus-visible {
	border-color: var(--bem-accent);
	outline: 2px solid color-mix(in srgb, var(--bem-accent) 24%, transparent);
	outline-offset: 1px;
}

/* "Merkliste" modal, opened by .bem-watchlist-open — mirrors .bem-modal's
   overlay/dialog structure so it looks and behaves consistently with the
   existing event-detail modal. */
.bem-watchlist-modal {
	--bem-accent: #185adb;
	--bem-accent-contrast: #fff;
	--bem-surface: #fff;
	--bem-surface-muted: #f5f7fa;
	--bem-border: #dfe3e8;
	--bem-text: #1d2327;
	--bem-text-muted: #646970;
	align-items: center;
	background: rgba(15, 23, 42, .55);
	display: flex;
	inset: 0;
	justify-content: center;
	opacity: 0;
	padding: 20px;
	position: fixed;
	transition: opacity .18s ease;
	z-index: 100000;
}

.bem-watchlist-modal[hidden] {
	display: none;
}

.bem-watchlist-modal.is-open {
	opacity: 1;
}

.bem-watchlist-modal *,
.bem-watchlist-modal *::before,
.bem-watchlist-modal *::after {
	box-sizing: border-box;
}

.bem-watchlist-modal__dialog {
	background: var(--bem-surface);
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
	color: var(--bem-text);
	max-height: calc(100vh - 40px);
	max-width: 560px;
	overflow-y: auto;
	padding: 24px;
	position: relative;
	transform: translateY(12px) scale(.98);
	transition: transform .18s ease;
	width: 100%;
}

.bem-watchlist-modal.is-open .bem-watchlist-modal__dialog {
	transform: none;
}

.bem-watchlist-modal__dialog:focus {
	outline: none;
}

.bem-watchlist-modal__header {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin-bottom: 16px;
}

.bem-watchlist-modal__title {
	font-size: 1.3rem;
	margin: 0;
}

.bem-watchlist-modal__close {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: var(--bem-text);
	cursor: pointer;
	display: flex;
	font-size: 26px;
	height: 36px;
	justify-content: center;
	line-height: 1;
	width: 36px;
}

.bem-watchlist-modal__close:hover,
.bem-watchlist-modal__close:focus-visible {
	background: var(--bem-surface-muted);
	outline: 2px solid color-mix(in srgb, var(--bem-accent) 30%, transparent);
	outline-offset: 1px;
}

.bem-watchlist-modal__toolbar {
	display: flex;
	gap: 12px;
	margin-bottom: 16px;
}

.bem-watchlist-modal__action {
	background: transparent;
	border: 1px solid var(--bem-watchlist-border, var(--bem-accent));
	border-radius: 8px;
	/* Outline button: text follows the border color (the standard "ghost
	   button" pairing), not --bem-accent-contrast — that's the color meant
	   to sit ON the filled .--primary button below, and would often be
	   unreadable here since this button's own background stays transparent. */
	color: var(--bem-watchlist-border, var(--bem-accent));
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	padding: 9px 16px;
}

.bem-watchlist-modal__action:hover,
.bem-watchlist-modal__action:focus-visible {
	background: color-mix(in srgb, var(--bem-watchlist-border, var(--bem-accent)) 12%, var(--bem-surface));
}

.bem-watchlist-modal__action--primary {
	background: var(--bem-accent);
	color: var(--bem-accent-contrast);
}

.bem-watchlist-modal__action--primary:hover,
.bem-watchlist-modal__action--primary:focus-visible {
	background: color-mix(in srgb, var(--bem-accent) 85%, #000);
	color: var(--bem-accent-contrast);
}

.bem-watchlist-modal__status {
	color: var(--bem-text-muted);
}

.bem-watchlist-modal__items {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.bem-watchlist-modal__month {
	align-items: center;
	display: flex;
	gap: 12px;
	margin-top: 4px;
}

.bem-watchlist-modal__event + .bem-watchlist-modal__month {
	margin-top: 12px;
}

.bem-watchlist-modal__month-label {
	font-size: 1rem;
	font-weight: 600;
	margin: 0;
	text-transform: capitalize;
	white-space: nowrap;
}

.bem-watchlist-modal__month-rule {
	background: var(--bem-border);
	flex: 1;
	height: 1px;
}

.bem-watchlist-modal__event {
	align-items: start;
	border: 1px solid var(--bem-border);
	border-radius: 10px;
	display: grid;
	gap: 4px 16px;
	grid-template-columns: 1fr auto;
	padding: 14px 16px;
}

.bem-watchlist-modal__event.is-cancelled {
	opacity: .6;
}

.bem-watchlist-modal__event-title {
	font-size: 1.05rem;
	grid-column: 1;
	margin: 0;
}

.bem-watchlist-modal__event-meta,
.bem-watchlist-modal__event-admission {
	color: var(--bem-text-muted);
	grid-column: 1;
	margin: 0;
}

.bem-watchlist-modal__event .bem-status-badge {
	grid-column: 1;
}

.bem-watchlist-modal__remove {
	background: transparent;
	border: 1px solid var(--bem-border);
	border-radius: 6px;
	color: var(--bem-text-muted);
	cursor: pointer;
	font: inherit;
	grid-column: 2;
	grid-row: 1 / -1;
	padding: 6px 12px;
}

.bem-watchlist-modal__remove:hover,
.bem-watchlist-modal__remove:focus-visible {
	border-color: var(--bem-accent);
	color: var(--bem-accent);
}

.bem-watchlist-modal__empty {
	color: var(--bem-text-muted);
}

/* Printing the watchlist modal: hide everything else on the page (theme
   header/footer included, since they're outside this plugin's markup) and
   let only the dialog's content flow onto the printed page. */
@media print {
	body.bem-watchlist-modal-open > *:not(.bem-watchlist-modal) {
		display: none !important;
	}

	.bem-watchlist-modal {
		background: none;
		inset: auto;
		opacity: 1;
		padding: 0;
		position: static;
	}

	.bem-watchlist-modal__dialog {
		box-shadow: none;
		max-height: none;
		max-width: none;
		overflow: visible;
		padding: 0;
		transform: none;
	}

	.bem-watchlist-modal__toolbar,
	.bem-watchlist-modal__close,
	.bem-watchlist-modal__remove {
		display: none;
	}

	.bem-watchlist-modal__event {
		break-inside: avoid;
		border-color: #000;
	}

	.bem-watchlist-modal__month {
		break-after: avoid;
	}
}

/* Search: result hint above calendar/list and highlighted matches. */
.bem-search-summary {
	align-items: center;
	background: color-mix(in srgb, var(--bem-accent, #185adb) 7%, #fff);
	border-left: 4px solid var(--bem-accent, #185adb);
	border-radius: 6px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin: 12px 0;
	padding: 10px 14px;
}

.bem-calendar .bem-search-summary {
	margin: 12px 18px;
}

.bem-search-summary[hidden] {
	display: none;
}

.bem-search-summary__text {
	flex: 1 1 260px;
	margin: 0;
}

.bem-search-summary__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
}

.bem-search-summary__button,
.bem-search-summary__button:hover,
.bem-search-summary__button:focus-visible,
.bem-search-summary__button:active {
	background: none;
	border: 0;
	color: var(--bem-accent, #185adb);
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	padding: 4px 0;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bem-search-summary__button--clear,
.bem-search-summary__button--clear:hover,
.bem-search-summary__button--clear:focus-visible {
	color: var(--bem-text-muted, #646970);
	font-weight: 400;
}

.bem-search-mark {
	background: color-mix(in srgb, #ffd54a 55%, transparent);
	border-radius: 2px;
	color: inherit;
	padding: 0 1px;
}
