/* ================================================================
   ibelsa Termine – Frontend
   Nutzt die bestehenden ibelsa Design-Tokens aus dem Child-Theme.
   ================================================================ */

.ibelsatermine-list,
.ibelsatermine-list * {
	box-sizing: border-box;
}

.ibelsatermine-list {
	width: 100%;
	font-family: inherit;
	color: var(--ib-c-night, #1C1825);
}

/* Monatsgruppen */
.ibelsatermine-month + .ibelsatermine-month {
	margin-top: clamp(52px, 6vw, 82px);
}

.ibelsatermine-month__head {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-bottom: clamp(22px, 2.8vw, 32px);
}

.ibelsatermine-month__title {
	flex: 0 0 auto;
	margin: 0 !important;
	font-size: clamp(20px, 1.55vw, 25px) !important;
	font-weight: 700 !important;
	line-height: 1.1 !important;
	letter-spacing: -.015em !important;
	text-transform: lowercase !important;
	color: var(--ib-c-night, #1C1825) !important;
}

.ibelsatermine-month__line {
	flex: 1 1 auto;
	height: 1px;
	background: var(--ib-c-border, rgba(28, 24, 37, .10));
}

.ibelsatermine-month__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 18px;
	align-items: start;
}

/* Karte */
.ibelsatermine-event {
	min-width: 0;
	background: #fff;
	border: 1px solid var(--ib-c-border, rgba(28, 24, 37, .10));
	border-radius: var(--ib-radius, 20px);
	box-shadow: 0 8px 26px rgba(28, 24, 37, .055);
	overflow: hidden;
	transition: border-color var(--ib-trans, .22s ease), box-shadow var(--ib-trans, .22s ease), transform var(--ib-trans, .22s ease);
}

.ibelsatermine-event:hover {
	border-color: rgba(43, 169, 199, .34);
	box-shadow: 0 14px 38px rgba(28, 24, 37, .085);
	transform: translateY(-2px);
}

.ibelsatermine-event:has(.ibelsatermine-event__toggle[aria-expanded="true"]) {
	border-color: rgba(255, 45, 176, .30);
	box-shadow: 0 16px 44px rgba(28, 24, 37, .10);
	transform: none;
}

.ibelsatermine-event__toggle {
	width: 100%;
	min-width: 0;
	display: grid;
	grid-template-columns: 74px minmax(0, 1fr) 42px;
	gap: clamp(16px, 2vw, 24px);
	align-items: center;
	padding: clamp(20px, 2.2vw, 28px);
	margin: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.ibelsatermine-event__toggle:focus-visible {
	outline: 3px solid rgba(255, 45, 176, .30);
	outline-offset: -5px;
	border-radius: calc(var(--ib-radius, 20px) - 2px);
}

/* Datum */
.ibelsatermine-event__date {
	width: 74px;
	min-height: 78px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 16px;
	background: var(--ib-c-night, #1C1825);
	color: #fff;
	line-height: 1;
	box-shadow: 0 8px 22px rgba(28, 24, 37, .16);
}

.ibelsatermine-event__day {
	display: block;
	font-size: 29px;
	font-weight: 800;
	letter-spacing: -.04em;
}

.ibelsatermine-event__month-short {
	display: block;
	margin-top: 7px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--ib-c-yellow, #FFFD19);
}

.ibelsatermine-event__date-part {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.ibelsatermine-event__date--range {
	min-height: 112px;
	padding: 10px 0;
}

.ibelsatermine-event__date--range .ibelsatermine-event__day {
	font-size: 23px;
}

.ibelsatermine-event__date--range .ibelsatermine-event__month-short {
	margin-top: 4px;
	font-size: 9px;
}

.ibelsatermine-event__date-separator {
	display: block;
	margin: 5px 0 4px;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	color: rgba(255,255,255,.7);
}

/* Kopf */
.ibelsatermine-event__head {
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.ibelsatermine-event__time {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 750;
	line-height: 1.35;
	letter-spacing: .065em;
	text-transform: lowercase;
	color: var(--ib-c-teal, #2BA9C7);
}

.ibelsatermine-event__title {
	display: block;
	margin: 0;
	font-size: clamp(19px, 1.35vw, 23px);
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -.015em;
	text-transform: lowercase;
	color: var(--ib-c-night, #1C1825);
	overflow-wrap: break-word;
}

.ibelsatermine-event__excerpt {
	display: block;
	margin-top: 8px;
	max-width: 62ch;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--ib-c-muted, rgba(28, 24, 37, .62));
}

/* Plus / Minus */
.ibelsatermine-event__open {
	position: relative;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--ib-pink-10, #FFE0F3);
	color: var(--ib-c-pink, #FF2DB0);
	transition: background var(--ib-trans, .22s ease), color var(--ib-trans, .22s ease), transform var(--ib-trans, .22s ease);
}

.ibelsatermine-event__open span {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 14px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transform: translate(-50%, -50%);
	transition: transform var(--ib-trans, .22s ease), opacity var(--ib-trans, .22s ease);
}

.ibelsatermine-event__open span:last-child {
	transform: translate(-50%, -50%) rotate(90deg);
}

.ibelsatermine-event__toggle[aria-expanded="true"] .ibelsatermine-event__open {
	background: var(--ib-c-pink, #FF2DB0);
	color: #fff;
}

.ibelsatermine-event__toggle[aria-expanded="true"] .ibelsatermine-event__open span:last-child {
	opacity: 0;
	transform: translate(-50%, -50%) rotate(0deg);
}

/* Aufgeklappter Inhalt */
.ibelsatermine-event__panel[hidden] {
	display: none;
}

.ibelsatermine-event__panel {
	border-top: 1px solid var(--ib-c-border, rgba(28, 24, 37, .10));
	background: #fff;
}

.ibelsatermine-event__panel-inner {
	padding: 0 clamp(20px, 2.2vw, 28px) clamp(24px, 2.8vw, 34px);
}

.ibelsatermine-event__content {
	margin-top: clamp(20px, 2.3vw, 28px);
	padding: clamp(20px, 2.4vw, 30px);
	border: 1px solid rgba(28, 24, 37, .06);
	border-radius: 16px;
	background: var(--ib-grey-bg, #f8f8fa);
	font-size: var(--ib-text-base, 17px);
	line-height: 1.72;
	color: var(--ib-c-night, #1C1825);
}

.ibelsatermine-event__content > :first-child {
	margin-top: 0 !important;
}

.ibelsatermine-event__content > :last-child {
	margin-bottom: 0 !important;
}

.ibelsatermine-event__content :where(h2, h3, h4) {
	margin-top: 1.5em;
	text-transform: lowercase;
	color: var(--ib-c-night, #1C1825) !important;
}

.ibelsatermine-event__content a:not(.ib-btn) {
	color: var(--ib-c-teal, #2BA9C7);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/* Aktionen – Reihenfolge entspricht Admin-Sortierung */
.ibelsatermine-event__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 18px;
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid var(--ib-c-border, rgba(28, 24, 37, .10));
}

.ibelsatermine-event__booking {
	font-size: 14px;
	padding: .74em 1.35em;
}

.ibelsatermine-event__info-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ib-c-teal, #2BA9C7);
	text-decoration: none !important;
	transition: gap var(--ib-trans, .22s ease), color var(--ib-trans, .22s ease);
}

.ibelsatermine-event__info-link:hover {
	gap: 11px;
	color: var(--ib-c-night, #1C1825);
}

/* Empty state */
.ibelsatermine-empty {
	padding: 24px 28px;
	border: 1px solid var(--ib-c-border, rgba(28, 24, 37, .10));
	border-radius: var(--ib-radius, 20px);
	background: var(--ib-grey-bg, #f8f8fa);
	color: var(--ib-c-muted, rgba(28, 24, 37, .62));
	font-size: var(--ib-text-base, 17px);
}

/* Zwei Spalten erst auf wirklich breiten Screens */
@media (min-width: 1280px) {
	.ibelsatermine-month__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 22px;
	}
}

@media (max-width: 700px) {
	.ibelsatermine-month + .ibelsatermine-month {
		margin-top: 44px;
	}

	.ibelsatermine-month__head {
		gap: 12px;
		margin-bottom: 18px;
	}

	.ibelsatermine-event__toggle {
		grid-template-columns: 62px minmax(0, 1fr) 36px;
		gap: 14px;
		padding: 18px;
	}

	.ibelsatermine-event__date {
		width: 62px;
		min-height: 68px;
		border-radius: 14px;
	}

	.ibelsatermine-event__date--range {
		min-height: 102px;
	}

	.ibelsatermine-event__day {
		font-size: 25px;
	}

	.ibelsatermine-event__month-short {
		font-size: 10px;
		margin-top: 5px;
	}

	.ibelsatermine-event__open {
		width: 36px;
		height: 36px;
	}

	.ibelsatermine-event__excerpt {
		display: none;
	}

	.ibelsatermine-event__panel-inner {
		padding-inline: 18px;
	}

	.ibelsatermine-event__content {
		padding: 18px;
		border-radius: 14px;
	}
}

@media (max-width: 480px) {
	.ibelsatermine-event__toggle {
		grid-template-columns: 56px minmax(0, 1fr) 32px;
		gap: 12px;
		padding: 16px;
	}

	.ibelsatermine-event__date {
		width: 56px;
		min-height: 64px;
	}

	.ibelsatermine-event__date--range {
		min-height: 96px;
	}

	.ibelsatermine-event__day {
		font-size: 23px;
	}

	.ibelsatermine-event__open {
		width: 32px;
		height: 32px;
	}

	.ibelsatermine-event__time {
		font-size: 11px;
		letter-spacing: .035em;
	}

	.ibelsatermine-event__title {
		font-size: 18px;
	}

	.ibelsatermine-event__actions {
		align-items: stretch;
		flex-direction: column;
	}

	.ibelsatermine-event__booking {
		width: 100%;
		justify-content: center;
	}

	.ibelsatermine-event__info-link {
		align-self: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ibelsatermine-event,
	.ibelsatermine-event__open,
	.ibelsatermine-event__open span,
	.ibelsatermine-event__info-link {
		transition: none;
	}
}

/* Kalender-Export – bewusst sekundär gegenüber Buchungs-/Info-Links */
.ibelsatermine-event__calendar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px dashed var(--ib-c-border, rgba(28, 24, 37, .10));
}

.ibelsatermine-event__calendar-label {
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .055em;
	text-transform: lowercase;
	color: var(--ib-c-muted, rgba(28, 24, 37, .62));
}

.ibelsatermine-event__calendar-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 9px;
}

.ibelsatermine-event__calendar-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 34px;
	padding: 7px 12px;
	border: 1px solid var(--ib-c-border, rgba(28, 24, 37, .10));
	border-radius: 999px;
	background: #fff;
	color: var(--ib-c-night, #1C1825);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none !important;
	transition: border-color var(--ib-trans, .22s ease), color var(--ib-trans, .22s ease), background var(--ib-trans, .22s ease);
}

.ibelsatermine-event__calendar-link:hover {
	border-color: rgba(43, 169, 199, .38);
	background: var(--ib-teal-10, #DFF3F8);
	color: var(--ib-c-teal, #2BA9C7);
}

@media (max-width: 700px) {
	.ibelsatermine-event__calendar {
		align-items: flex-start;
		flex-direction: column;
	}
}

/* ================================================================
   QR-Kalenderexport
   QR wird erst beim Klick lokal im Browser erzeugt.
   ================================================================ */

.ibelsatermine-event__calendar {
	flex-wrap: wrap;
}

button.ibelsatermine-event__calendar-link {
	font-family: inherit;
	cursor: pointer;
}

.ibelsatermine-event__qr-toggle[aria-expanded="true"] {
	border-color: rgba(255, 45, 176, .38);
	background: var(--ib-pink-10, #FFE0F3);
	color: var(--ib-c-pink, #FF2DB0);
}

.ibelsatermine-event__qr {
	flex: 0 0 100%;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: clamp(20px, 3vw, 34px);
	margin-top: 4px;
	padding: clamp(20px, 3vw, 30px);
	border: 1px solid rgba(255, 45, 176, .16);
	border-radius: 20px;
	background:
		radial-gradient(circle at 12% 10%, rgba(255, 45, 176, .10), transparent 34%),
		linear-gradient(135deg, #ffffff, #f8f8fa);
	box-shadow: 0 14px 38px rgba(28, 24, 37, .06);
}

.ibelsatermine-event__qr[hidden] {
	display: none;
}

.ibelsatermine-event__qr-code {
	width: 260px;
	height: 260px;
	display: grid;
	place-items: center;
	padding: 10px;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(28, 24, 37, .10);
}

.ibelsatermine-event__qr-code svg,
.ibelsatermine-event__qr-code canvas {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

.ibelsatermine-event__qr-copy {
	display: grid;
	gap: 8px;
	max-width: 430px;
}

.ibelsatermine-event__qr-copy strong {
	font-size: clamp(20px, 1.5vw, 25px);
	line-height: 1.15;
	color: var(--ib-c-night, #1C1825);
	text-transform: lowercase;
}

.ibelsatermine-event__qr-copy span {
	font-size: 14px;
	line-height: 1.65;
	color: var(--ib-c-muted, rgba(28, 24, 37, .62));
}

.ibelsatermine-event__qr-error {
	padding: 16px;
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
	color: var(--ib-c-muted, rgba(28, 24, 37, .62));
}

@media (max-width: 620px) {
	.ibelsatermine-event__qr {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
	}

	.ibelsatermine-event__qr-code {
		width: min(260px, 100%);
		height: auto;
		aspect-ratio: 1;
	}
}

/* ================================================================
   Termin-Teaser / Informationstafel
   Shortcode: [ibelsatermine_teaser]
   Rein CSS-basiert, kein Ticker/kein zusaetzliches JavaScript.
   ================================================================ */
.ibelsatermine-board,
.ibelsatermine-board * {
	box-sizing: border-box;
}

.ibelsatermine-board {
	width: 100%;
	padding: clamp(22px, 3vw, 34px);
	border: 1px solid var(--ib-c-border, rgba(28,24,37,.10));
	border-radius: var(--ib-radius, 20px);
	background: #fff;
	box-shadow: 0 12px 38px rgba(28,24,37,.065);
	color: var(--ib-c-night, #1C1825);
}

.ibelsatermine-board__head {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: clamp(22px, 3vw, 32px);
}

.ibelsatermine-board__eyebrow {
	display: block;
	margin-bottom: 5px;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ib-c-pink, #FF2DB0);
}

.ibelsatermine-board__title {
	margin: 0 !important;
	font-size: clamp(22px, 2vw, 30px) !important;
	font-weight: 700 !important;
	line-height: 1.08 !important;
	letter-spacing: -.025em !important;
	text-transform: lowercase !important;
	color: var(--ib-c-night, #1C1825) !important;
}

.ibelsatermine-board__all {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	flex: 0 0 auto;
	padding: 8px 0;
	font-size: 13px;
	font-weight: 750;
	line-height: 1.2;
	color: var(--ib-c-teal, #2BA9C7) !important;
	text-decoration: none !important;
}

.ibelsatermine-board__all:hover {
	color: var(--ib-c-night, #1C1825) !important;
}

.ibelsatermine-board__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: 16px;
	align-items: stretch;
}

.ibelsatermine-board__column {
	min-width: 0;
	padding: 18px;
	border: 1px solid var(--ib-c-border, rgba(28,24,37,.10));
	border-radius: 18px;
	background: var(--ib-grey-bg, #f8f8fa);
}

.ibelsatermine-board__column-head {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 14px;
	padding-bottom: 13px;
	border-bottom: 1px solid var(--ib-c-border, rgba(28,24,37,.10));
}

.ibelsatermine-board__column-head h3 {
	margin: 0 !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	line-height: 1.25 !important;
	letter-spacing: .035em !important;
	text-transform: lowercase !important;
	color: var(--ib-c-night, #1C1825) !important;
}

.ibelsatermine-board__signal {
	width: 9px;
	height: 9px;
	flex: 0 0 9px;
	border-radius: 50%;
	background: var(--ib-c-teal, #2BA9C7);
	box-shadow: 0 0 0 5px var(--ib-teal-10, #DFF3F8);
}

.ibelsatermine-board__column--messen .ibelsatermine-board__signal {
	background: var(--ib-c-pink, #FF2DB0);
	box-shadow: 0 0 0 5px var(--ib-pink-10, #FFE0F3);
}

.ibelsatermine-board__column--roadshow .ibelsatermine-board__signal,
.ibelsatermine-board__column--extra .ibelsatermine-board__signal {
	background: var(--ib-c-violet, #7B2FBE);
	box-shadow: 0 0 0 5px rgba(123,47,190,.12);
}

.ibelsatermine-board__items {
	display: grid;
	gap: 10px;
}

.ibelsatermine-board__event {
	min-width: 0;
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) 26px;
	gap: 12px;
	align-items: center;
	padding: 12px;
	border-radius: 14px;
	background: #fff;
	color: inherit !important;
	text-decoration: none !important;
	box-shadow: 0 4px 16px rgba(28,24,37,.045);
	transition: transform var(--ib-trans, .22s ease), box-shadow var(--ib-trans, .22s ease);
}

.ibelsatermine-board__event:hover {
	transform: translateY(-2px);
	box-shadow: 0 9px 24px rgba(28,24,37,.085);
}

.ibelsatermine-board__date {
	width: 56px;
	min-height: 60px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 7px 4px;
	border-radius: 13px;
	background: var(--ib-c-night, #1C1825);
	color: #fff;
	line-height: 1;
	box-shadow: 0 6px 16px rgba(28,24,37,.14);
}

.ibelsatermine-board__date-part {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ibelsatermine-board__date strong {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -.04em;
	color: #fff;
}

.ibelsatermine-board__date small {
	margin-top: 4px;
	font-size: 8px;
	font-weight: 800;
	letter-spacing: .11em;
	text-transform: uppercase;
	color: var(--ib-c-yellow, #FFFD19);
}

.ibelsatermine-board__date--range {
	min-height: 88px;
	padding-block: 7px;
}

.ibelsatermine-board__date--range strong {
	font-size: 18px;
}

.ibelsatermine-board__date-separator {
	margin: 3px 0;
	font-size: 10px;
	font-weight: 800;
	color: rgba(255,255,255,.65);
}

.ibelsatermine-board__event-copy {
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.ibelsatermine-board__time {
	display: block;
	margin-bottom: 4px;
	font-size: 10px;
	font-weight: 750;
	line-height: 1.35;
	letter-spacing: .035em;
	text-transform: lowercase;
	color: var(--ib-c-teal, #2BA9C7);
}

.ibelsatermine-board__event-title {
	display: block;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -.01em;
	text-transform: lowercase;
	color: var(--ib-c-night, #1C1825);
	overflow-wrap: anywhere;
}

.ibelsatermine-board__excerpt {
	display: -webkit-box;
	margin-top: 5px;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	font-size: 11px;
	line-height: 1.45;
	color: var(--ib-c-muted, rgba(28,24,37,.62));
}

.ibelsatermine-board__arrow {
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--ib-pink-10, #FFE0F3);
	color: var(--ib-c-pink, #FF2DB0);
	font-size: 14px;
	font-weight: 800;
	transition: transform var(--ib-trans, .22s ease), background var(--ib-trans, .22s ease), color var(--ib-trans, .22s ease);
}

.ibelsatermine-board__event:hover .ibelsatermine-board__arrow {
	transform: translateX(2px);
	background: var(--ib-c-pink, #FF2DB0);
	color: #fff;
}

.ibelsatermine-board__empty {
	min-height: 92px;
	display: flex;
	align-items: center;
	padding: 14px;
	border-radius: 14px;
	background: rgba(255,255,255,.72);
	font-size: 12px;
	line-height: 1.5;
	color: var(--ib-c-muted, rgba(28,24,37,.62));
}

@media (max-width: 1100px) {
	.ibelsatermine-board__grid {
		grid-template-columns: 1fr;
	}

	.ibelsatermine-board__column {
		padding: 16px;
	}
}

@media (max-width: 620px) {
	.ibelsatermine-board {
		padding: 18px;
	}

	.ibelsatermine-board__head {
		align-items: flex-start;
		flex-direction: column;
		gap: 10px;
	}

	.ibelsatermine-board__event {
		grid-template-columns: 52px minmax(0, 1fr) 24px;
		gap: 10px;
		padding: 10px;
	}

	.ibelsatermine-board__date {
		width: 52px;
		min-height: 56px;
	}

	.ibelsatermine-board__date--range {
		min-height: 84px;
	}

	.ibelsatermine-board__excerpt {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ibelsatermine-board__event,
	.ibelsatermine-board__arrow {
		transition: none;
	}
}
