.wbm-webinare-liste {
	--wbm-accent: #7C4DFF;
	--wbm-accent-dark: #5B21B6;
	--wbm-header-bg: #EFEAFB;
	--wbm-badge-bg: #F7F5FE;
	--wbm-badge-border: #E4DBFB;
	--wbm-card-border: #ECE7FB;
	--wbm-card-radius: 20px;

	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 24px;
	margin: 24px 0;
}

.wbm-webinar-card {
	border: 1px solid var(--wbm-card-border);
	border-radius: var(--wbm-card-radius);
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
	box-shadow: 0 4px 18px rgba(84, 55, 168, 0.06);
}

/* ---------- Header (lila) ---------- */

.wbm-webinar-header {
	position: relative;
	background: var(--wbm-header-bg);
	padding: 24px 24px 28px;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.wbm-webinar-header-text {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.wbm-webinar-titel {
	margin: 0;
	font-size: 19px;
	line-height: 1.35;
	color: #241C40;
	font-weight: 700;
}

.wbm-titel-highlight {
	color: var(--wbm-accent);
}

.wbm-host-pill {
	display: inline-block;
	align-self: flex-start;
	background: #fff;
	border: 1px solid var(--wbm-badge-border);
	border-radius: 14px;
	padding: 8px 14px;
	font-size: 13px;
	line-height: 1.5;
	color: #4B4067;
	white-space: normal;
	max-width: 100%;
	box-sizing: border-box;
}

.wbm-host-pill strong {
	color: var(--wbm-accent-dark);
	margin: 0 3px;
}

.wbm-webinar-host-bild {
	position: relative;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	min-height: 88px;
}

.wbm-host-avatar {
	position: relative;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	overflow: hidden;
	border: 3px solid var(--wbm-header-bg);
	background: #fff;
	margin-left: -22px;
}

.wbm-host-avatar:first-child {
	margin-left: 0;
}

.wbm-host-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 20%;
	display: block;
}

.wbm-host-avatar-more {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--wbm-accent);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
}

/* Bei genau 1 Host: Foto füllt die volle Höhe des lila Headers (Seiten-
   verhältnis bleibt erhalten, keine feste Zuschnitt-Prozentzahl mehr nötig),
   sitzt unten UND rechts bündig ohne Padding – egal welches Bildformat
   hochgeladen wird. Kein Kreis, keine Deko. */
.wbm-webinar-header {
	overflow: hidden;
}

.wbm-webinar-host-bild.wbm-host-count-1 {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	min-height: 0;
	display: flex;
	align-items: flex-end;
}

.wbm-host-count-1 .wbm-host-avatar {
	height: 100%;
	width: auto;
	margin: 0;
	border: none;
	border-radius: 0;
	background: transparent;
	overflow: visible;
}

.wbm-webinar-header:has(.wbm-host-count-1) .wbm-webinar-header-text {
	padding-right: 140px;
}

.wbm-host-count-1 .wbm-host-avatar img {
	height: 100%;
	width: auto;
	max-width: 220px;
	object-fit: contain;
	object-position: bottom right;
	display: block;
}

/* ---------- Body (weiß) ---------- */

.wbm-webinar-body {
	padding: 20px 24px 24px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex: 1;
}

.wbm-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wbm-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--wbm-badge-bg);
	border: 1px solid var(--wbm-badge-border);
	color: var(--wbm-accent-dark);
	border-radius: 999px;
	padding: 5px 12px;
	font-size: 12.5px;
	font-weight: 600;
}

.wbm-webinar-beschreibung {
	color: #4B4667;
	font-size: 14.5px;
	line-height: 1.55;
}

.wbm-webinar-beschreibung p {
	margin: 0 0 8px;
}

.wbm-webinar-beschreibung p:last-child {
	margin-bottom: 0;
}

.wbm-details-toggle {
	align-self: flex-start;
	background: none;
	border: none;
	padding: 0;
	margin-top: -8px;
	color: #241C40;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.wbm-details-content {
	display: none;
	color: #4B4667;
	font-size: 14.5px;
	line-height: 1.55;
	margin-top: -6px;
}

.wbm-details-content.wbm-open {
	display: block;
}

.wbm-details-content p:last-child {
	margin-bottom: 0;
}

.wbm-webinar-plaetze {
	font-size: 13px;
	font-weight: 600;
	color: var(--wbm-accent-dark);
	margin: -4px 0 0;
}

.wbm-webinar-footer {
	margin-top: auto;
	padding-top: 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}

.wbm-date-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #F5F4F8;
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 13.5px;
	color: #4B4667;
	white-space: nowrap;
}

/* ---------- Buttons ---------- */

.wbm-btn {
	display: inline-block;
	padding: 11px 20px;
	border-radius: 999px;
	border: 1.5px solid var(--wbm-accent);
	background: #fff;
	color: var(--wbm-accent);
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	font-size: 14.5px;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease;
}

.wbm-btn:hover {
	background: #173C60 !important;
	border-color: #173C60 !important;
	color: #fff !important;
}

.wbm-btn-disabled,
.wbm-btn-disabled:hover {
	background: #F0EEF4;
	border-color: #E0DCEA;
	color: #9993A8;
	cursor: not-allowed;
}

/* ---------- Anmelde-Modal ---------- */

.wbm-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(36, 28, 64, 0.55);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.wbm-modal-overlay.wbm-visible {
	display: flex;
}

.wbm-modal {
	background: #fff;
	border-radius: 20px;
	padding: 32px;
	max-width: 420px;
	width: 100%;
	position: relative;
}

.wbm-modal-close {
	position: absolute;
	top: 14px;
	right: 18px;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	line-height: 1;
	color: #9993A8;
}

.wbm-modal h3 {
	margin-top: 0;
	color: #241C40;
}

.wbm-modal-webinar-name {
	font-weight: 600;
	color: var(--wbm-accent);
	margin-top: -8px;
}

.wbm-form-field {
	margin-bottom: 16px;
}

.wbm-form-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
	color: #241C40;
}

.wbm-form-field input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--wbm-badge-border);
	border-radius: 10px;
	font-size: 15px;
	box-sizing: border-box;
}

.wbm-form-field input:focus {
	outline: none;
	border-color: var(--wbm-accent);
}

.wbm-btn-submit {
	width: 100%;
	background: var(--wbm-accent);
	color: #fff;
}

.wbm-btn-submit:hover {
	background: #173C60 !important;
	color: #fff !important;
}

.wbm-form-message {
	margin-top: 12px;
	font-size: 14px;
	text-align: center;
}

.wbm-form-message.wbm-erfolg {
	color: #1a7a3c;
}

.wbm-form-message.wbm-fehler {
	color: #c0392b;
}

/* ---------- Erfolgs-Ansicht nach Anmeldung ---------- */

.wbm-modal-success {
	display: none;
	text-align: center;
	padding: 8px 4px 4px;
}

.wbm-modal-success.wbm-visible {
	display: block;
	animation: wbm-success-in 0.35s ease;
}

@keyframes wbm-success-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.wbm-success-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 18px;
}

.wbm-success-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.wbm-modal-success h3 {
	margin: 0 0 10px;
	font-size: 21px;
}

.wbm-success-text {
	margin: 0 0 6px;
	font-weight: 600;
	color: #241C40;
	font-size: 15px;
}

.wbm-success-hint {
	margin: 0 0 22px;
	color: #6B6580;
	font-size: 13.5px;
}

/* ---------- Responsive (schmale Bildschirme / Mobile) ---------- */

@media (max-width: 560px) {

	.wbm-webinar-header {
		flex-direction: column;
		align-items: stretch;
	}

	.wbm-webinar-header:has(.wbm-host-count-1) .wbm-webinar-header-text {
		padding-right: 0;
	}

	.wbm-webinar-titel {
		width: 100%;
	}

	/* Einzel-Host-Foto: nicht mehr an der Kante andocken, sondern klein
	   und normal im Fluss unter den Text setzen. */
	.wbm-webinar-host-bild.wbm-host-count-1 {
		position: static;
		top: auto;
		right: auto;
		bottom: auto;
		margin-top: 16px;
		align-self: flex-start;
	}

	.wbm-host-count-1 .wbm-host-avatar {
		height: 72px;
		width: auto;
	}

	/* Mehrfach-Host-Kreise: ebenfalls kleiner und unter den Text. */
	.wbm-webinar-host-bild:not(.wbm-host-count-1) {
		margin-top: 14px;
		align-self: flex-start;
	}

	.wbm-host-avatar {
		width: 44px;
		height: 44px;
		margin-left: -14px;
	}
}
