/* SB Eventmanager – Frontend */
.sbem-listing,
.sbem-details,
.sbem-registration {
	--sbem-accent: #1e66f5;
	--sbem-accent-contrast: #fff;
	--sbem-border: rgba(0, 0, 0, .1);
	--sbem-muted: #6b7280;
	--sbem-radius: 10px;
	--sbem-bg: #fff;
	--sbem-soft: #f5f7fa;
	box-sizing: border-box;
}

/* Grid */
.sbem-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sbem-grid.sbem-cols-1 { grid-template-columns: minmax(0, 1fr); }
.sbem-grid.sbem-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sbem-grid.sbem-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sbem-grid.sbem-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) {
	.sbem-grid.sbem-cols-3, .sbem-grid.sbem-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.sbem-grid.sbem-cols-2, .sbem-grid.sbem-cols-3, .sbem-grid.sbem-cols-4 { grid-template-columns: minmax(0, 1fr); }
}

/* Karte */
.sbem-card {
	display: flex; flex-direction: column;
	background: var(--sbem-bg);
	border: 1px solid var(--sbem-border);
	border-radius: var(--sbem-radius);
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease;
}
.sbem-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.sbem-card__image { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--sbem-soft); }
.sbem-card__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sbem-card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--sbem-soft), #e5e9f0); }
.sbem-card__badge {
	position: absolute; top: 12px; left: 12px;
	padding: 4px 10px; border-radius: 999px;
	background: var(--sbem-accent); color: var(--sbem-accent-contrast);
	font-size: 12px; font-weight: 600; line-height: 1.4;
}
.sbem-card__badge--inline { position: static; align-self: flex-start; margin: 16px 20px 0; }
.sbem-card__body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 20px; }
.sbem-card__date { color: var(--sbem-accent); font-size: 14px; font-weight: 600; }
.sbem-card__title { margin: 0; font-size: 1.15em; line-height: 1.3; }
.sbem-card__title a { color: inherit; text-decoration: none; }
.sbem-card__title a:hover { text-decoration: underline; }
.sbem-card__meta { margin: 0; padding: 0; list-style: none; color: var(--sbem-muted); font-size: 14px; }
.sbem-card__meta-item { margin: 2px 0; }
.sbem-card__meta-item--price { font-weight: 600; color: inherit; }
.sbem-card__cats { color: var(--sbem-muted); font-size: 13px; }
.sbem-card__excerpt { font-size: 15px; line-height: 1.5; }
.sbem-card__button { margin-top: auto; align-self: flex-start; }

/* Button */
.sbem-button {
	display: inline-block; padding: 10px 18px;
	border: 2px solid var(--sbem-accent, #1e66f5); border-radius: 6px;
	background: var(--sbem-accent, #1e66f5); color: #fff !important;
	font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
	transition: opacity .2s ease;
}
.sbem-button:hover, .sbem-button:focus { opacity: .88; color: var(--sbem-accent-contrast, #fff); }
.sbem-button--outline { background: transparent; color:  #1e66f5 !important; }
.sbem-button--outline:hover, .sbem-button--outline:focus { color: var(--sbem-accent, #1e66f5); }

/* Pagination */
.sbem-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 32px; }
.sbem-pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--sbem-border); border-radius: 6px; text-decoration: none; }
.sbem-pagination .page-numbers.current { background: var(--sbem-accent); border-color: var(--sbem-accent); color: var(--sbem-accent-contrast); }
.sbem-listing__empty { color: var(--sbem-muted); }

/* Details (Einzelansicht) */
.sbem-details { margin: 0 0 2em; padding: 20px 24px; border: 1px solid var(--sbem-border); border-radius: var(--sbem-radius); background: var(--sbem-soft); }
.sbem-details__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 24px; margin: 0; }
.sbem-details__row dt { margin: 0 0 2px; color: var(--sbem-muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.sbem-details__row dd { margin: 0; }

/* Anmeldung */
.sbem-registration { margin: 2.5em 0 0; padding: 24px; border: 1px solid var(--sbem-border); border-radius: var(--sbem-radius); }
.sbem-registration__title { margin-top: 0; }
.sbem-registration__seats { font-weight: 600; }
.sbem-form p { margin: 0 0 14px; }
.sbem-form label { display: block; margin-bottom: 4px; font-weight: 600; }
.sbem-form input[type="text"], .sbem-form input[type="email"], .sbem-form input[type="tel"], .sbem-form textarea {
	box-sizing: border-box; width: 100%; padding: 10px 12px;
	border: 1px solid var(--sbem-border); border-radius: 6px; font: inherit;
}
.sbem-form input[readonly] { background: var(--sbem-soft); }
.sbem-form__row--half { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 640px) { .sbem-form__row--half { grid-template-columns: minmax(0, 1fr); } }
.sbem-form__consent label { font-weight: 400; }
.sbem-form__consent input { margin-right: 6px; }
.sbem-form .required { color: #c0392b; }
.sbem-form__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.sbem-notice { margin: 0 0 16px; padding: 12px 16px; border-left: 4px solid var(--sbem-accent); border-radius: 4px; background: var(--sbem-soft); }
.sbem-notice p { margin: 0 0 6px; }
.sbem-notice p:last-child { margin-bottom: 0; }
.sbem-notice--success { border-color: #2e9e5b; background: #eefaf2; }
.sbem-notice--error { border-color: #c0392b; background: #fdf0ee; }
.sbem-notice--info { border-color: #1e66f5; background: #eef3fe; }

/* Meine Buchungen */
.sbem-my-registrations {
	--sbem-accent: #1e66f5;
	--sbem-accent-contrast: #fff;
	--sbem-border: rgba(0, 0, 0, .1);
	--sbem-muted: #6b7280;
	--sbem-radius: 10px;
	--sbem-soft: #f5f7fa;
}
.sbem-my-registrations__list { display: flex; flex-direction: column; gap: 14px; }
.sbem-booking {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
	padding: 16px 20px; border: 1px solid var(--sbem-border); border-radius: var(--sbem-radius);
}
.sbem-booking--past, .sbem-booking--cancelled { opacity: .65; }
.sbem-booking__main { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1 1 320px; }
.sbem-booking__image img { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.sbem-booking__title { margin: 0 0 4px; font-size: 1.05em; line-height: 1.3; }
.sbem-booking__title a { color: inherit; text-decoration: none; }
.sbem-booking__title a:hover { text-decoration: underline; }
.sbem-booking__meta { color: var(--sbem-muted); font-size: 14px; }
.sbem-booking__side { display: flex; align-items: center; gap: 12px; }
.sbem-booking__side .sbem-form--cancel { margin: 0; }
.sbem-booking__side .sbem-button { padding: 7px 14px; font-size: 14px; }
.sbem-my-registrations__empty { color: var(--sbem-muted); }

.sbem-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.sbem-status--confirmed { background: #e6f4ea; color: #1e7b34; }
.sbem-status--waitlist { background: #fff4e0; color: #9a5b00; }
.sbem-status--cancelled { background: #f0f0f1; color: #646970; }

/* Fertige Detailseite */
.sbem-single {
	--sbem-accent: #1e66f5;
	--sbem-accent-contrast: #fff;
	--sbem-border: rgba(0, 0, 0, .1);
	--sbem-muted: #6b7280;
	--sbem-radius: 10px;
	--sbem-soft: #f5f7fa;
	box-sizing: border-box;
}
.sbem-single__container {
	max-width: 1140px;
	margin: 0 auto;
	padding: 40px 20px 64px;
}
.sbem-single__back {
	display: inline-block;
	margin-bottom: 20px;
	color: var(--sbem-muted);
	font-size: 14px;
	text-decoration: none;
}
.sbem-single__back:hover { color: var(--sbem-accent); }
.sbem-single__header { margin-bottom: 24px; }
.sbem-single__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sbem-single__badges .sbem-card__badge--inline { margin: 0; }
.sbem-single__title { margin: 0 0 8px; line-height: 1.2; }
.sbem-single__subtitle { margin: 0; color: var(--sbem-muted); font-size: 1.05em; }
.sbem-single__image { margin: 0 0 32px; }
.sbem-single__image img {
	display: block;
	width: 100%;
	max-height: 520px;
	object-fit: cover;
	border-radius: var(--sbem-radius);
}
.sbem-single__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 40px;
	align-items: start;
}
.sbem-single--stacked .sbem-single__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.sbem-single--stacked .sbem-single__aside { order: -1; }
.sbem-single--sidebar .sbem-single__aside { position: sticky; top: 32px; }
.sbem-single--sidebar .sbem-details__list { grid-template-columns: minmax(0, 1fr); }
.sbem-single__aside .sbem-details { margin-bottom: 16px; }
.sbem-single__content > :first-child { margin-top: 0; }
.sbem-single__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 1.5em; }
.sbem-single--sidebar .sbem-single__actions .sbem-button { flex: 1 1 auto; text-align: center; }
.sbem-single .sbem-registration { margin-top: 48px; }
@media (max-width: 900px) {
	.sbem-single__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.sbem-single--sidebar .sbem-single__aside { position: static; order: -1; }
	.sbem-single--sidebar .sbem-details__list { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
.sbem-single--inline .sbem-details { margin-bottom: 16px; }
.sbem-single--inline .sbem-single__content { margin-top: 24px; }

/* Preisliste */
.sbem-prices { margin: 0; padding: 0; list-style: none; }
.sbem-prices__item { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.sbem-prices__item + .sbem-prices__item { border-top: 1px dashed var(--sbem-border, rgba(0, 0, 0, .1)); }
.sbem-prices__label { color: inherit; }
.sbem-prices__price { font-weight: 600; white-space: nowrap; }

/* Gruppenanmeldung */
.sbem-attendees {
	margin: 0 0 16px;
	padding: 16px;
	border: 1px solid var(--sbem-border, rgba(0, 0, 0, .1));
	border-radius: 8px;
}
.sbem-attendees legend { padding: 0 6px; font-weight: 600; }
.sbem-attendees__hint { margin: 0 0 12px; color: var(--sbem-muted, #6b7280); font-size: 14px; }
.sbem-attendees__list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.sbem-attendees__list:empty { display: none; }
.sbem-attendee {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0 12px;
	padding: 12px 12px 0;
	background: var(--sbem-soft, #f5f7fa);
	border-radius: 6px;
}
.sbem-attendee p { flex: 1 1 160px; min-width: 0; margin: 0 0 12px; }
.sbem-attendee select,
.sbem-form select {
	box-sizing: border-box; width: 100%; padding: 9px 10px;
	border: 1px solid var(--sbem-border, rgba(0, 0, 0, .1)); border-radius: 6px;
	background: #fff; font: inherit;
}

/* Buttons der Gruppenanmeldung: feste Farben, unabhängig vom Theme */
.sbem-registration .sbem-attendee .sbem-attendee__remove {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0 0 12px;
	padding: 0;
	border: 0 !important;
	border-radius: 6px;
	background: #c0392b !important;
	color: #fff !important;
	font-size: 24px;
	font-weight: 400;
	line-height: 1;
	box-shadow: none;
	cursor: pointer;
}
.sbem-registration .sbem-attendee .sbem-attendee__remove:hover,
.sbem-registration .sbem-attendee .sbem-attendee__remove:focus {
	background: #a93226 !important;
	color: #fff !important;
}
.sbem-registration .sbem-attendees .sbem-attendees__add {
	background: var(--sbem-accent, #1e66f5) !important;
	border-color: var(--sbem-accent, #1e66f5) !important;
	color: #fff !important;
}
.sbem-registration .sbem-attendees .sbem-attendees__add:hover,
.sbem-registration .sbem-attendees .sbem-attendees__add:focus {
	opacity: .88;
	color: #fff !important;
}
.sbem-attendees__add[hidden] { display: none; }
.sbem-attendees__count { margin: 8px 0 0; font-weight: 600; font-size: 14px; }
.sbem-attendees__count:empty { display: none; }
.sbem-booking__persons { color: var(--sbem-muted, #6b7280); font-size: 14px; }
