/* ==========================================================================
   HM-i Events Anmelde-Form
   --------------------------------------------------------------------------
   Schlankes, brand-konformes Form-Styling. Setzt auf bestehende HM-i CSS-
   Variablen (--hmi-teal-500, --hmi-violet-500, --hmi-ink) — fallt zurueck
   auf neutrale Werte wenn Variablen fehlen.
   ========================================================================== */

.hmi-events-form {
	max-width: 540px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	font-family: inherit;
}

.hmi-events-form-row {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.hmi-events-form-row label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--hmi-ink, #002528);
}

.hmi-events-form-row input,
.hmi-events-form-row textarea {
	width: 100%;
	padding: 0.625rem 0.875rem;
	border: 1px solid rgba(0, 37, 40, 0.15);
	border-radius: 8px;
	background: #fff;
	font-size: 1rem;
	font-family: inherit;
	color: var(--hmi-ink, #002528);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hmi-events-form-row input:focus,
.hmi-events-form-row textarea:focus {
	outline: none;
	border-color: var(--hmi-teal-500, #007078);
	box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.hmi-events-form-row textarea {
	resize: vertical;
	min-height: 100px;
}

/* Honeypot komplett verstecken (auch fuer Screen-Reader nicht relevant
   da hidden — aber als a11y-safe absolute-position-Variante). */
.hmi-events-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.hmi-events-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--hmi-ink-light, #4a5568);
	cursor: pointer;
}

.hmi-events-consent input[type="checkbox"] {
	margin-top: 0.25rem;
	flex-shrink: 0;
}

.hmi-events-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.625rem;
	padding: 0.875rem 1.75rem;
	background: var(--hmi-violet-500, #7c3aed);
	color: #fff;
	border: none;
	border-radius: 9999px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.hmi-events-submit:hover:not(:disabled),
.hmi-events-submit:focus-visible:not(:disabled) {
	background: var(--hmi-violet-600, #6d28d9);
	transform: translateY(-1px);
	outline: none;
}

.hmi-events-submit:disabled {
	cursor: not-allowed;
	opacity: 0.7;
}

.hmi-events-submit.is-submitting .hmi-events-submit-label {
	opacity: 0.6;
}

.hmi-events-submit-spinner {
	display: none;
	width: 1rem;
	height: 1rem;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: hmi-events-spin 0.8s linear infinite;
}

.hmi-events-submit.is-submitting .hmi-events-submit-spinner {
	display: inline-block;
}

@keyframes hmi-events-spin {
	to { transform: rotate(360deg); }
}

/* Status-Bereich (Erfolg / Fehler) */
.hmi-events-status {
	display: none;
	padding: 0.875rem 1rem;
	border-radius: 8px;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.hmi-events-status-visible {
	display: block;
}

.hmi-events-status[data-type="success"] {
	background: rgba(20, 184, 166, 0.1);
	color: var(--hmi-teal-600, #00585f);
	border: 1px solid rgba(20, 184, 166, 0.3);
}

.hmi-events-status[data-type="error"] {
	background: rgba(220, 38, 38, 0.08);
	color: #b91c1c;
	border: 1px solid rgba(220, 38, 38, 0.3);
}

/* Status-Hinweise wenn Anmeldung nicht moeglich (Event voll, Vergangen, etc.) */
.hmi-events-form-status {
	padding: 1.25rem 1.5rem;
	border-radius: 12px;
	background: rgba(0, 37, 40, 0.04);
	color: var(--hmi-ink-light, #4a5568);
	font-size: 0.9375rem;
	line-height: 1.55;
	text-align: center;
}

.hmi-events-form-status-full {
	background: rgba(220, 38, 38, 0.06);
	color: #b91c1c;
}

.hmi-events-form-status-canceled {
	background: rgba(220, 38, 38, 0.08);
	color: #b91c1c;
}

.hmi-events-form-status-past {
	background: rgba(100, 116, 139, 0.08);
	color: #475569;
}

.hmi-events-form-error {
	padding: 1rem;
	border: 1px dashed rgba(220, 38, 38, 0.4);
	border-radius: 8px;
	color: #b91c1c;
	background: rgba(220, 38, 38, 0.04);
	font-size: 0.875rem;
}

/* =========================================================================
   Fieldsets — visuelle Gruppierung (Bucher vs. Mit-Teilnehmer)
   ========================================================================= */
.hmi-events-fieldset {
	border: 0;
	margin: 0 0 1.5rem;
	padding: 0;
}
.hmi-events-fieldset-legend {
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hmi-teal-500, #007078);
	margin-bottom: 0.75rem;
	padding: 0;
}
.hmi-events-fieldset-hint {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	color: var(--hmi-ink-light, #4a5568);
}

/* =========================================================================
   Mit-Teilnehmer — Repeatable-Block
   ========================================================================= */
.hmi-events-additional-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}
.hmi-events-additional-list:empty {
	margin-bottom: 0;
}
.hmi-events-additional-row {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	padding: 0.875rem 1rem;
	background: rgba(0, 112, 120, 0.04);
	border: 1px solid rgba(0, 112, 120, 0.12);
	border-radius: 8px;
}
.hmi-events-additional-fields {
	flex: 1 1 auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}
@media (max-width: 540px) {
	.hmi-events-additional-fields {
		grid-template-columns: 1fr;
	}
}
.hmi-events-additional-row .hmi-events-form-row {
	margin: 0;
}
.hmi-events-additional-row label {
	font-size: 0.75rem;
	color: var(--hmi-ink-light, #4a5568);
}
.hmi-events-additional-remove {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--hmi-ink-light, #4a5568);
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.hmi-events-additional-remove:hover,
.hmi-events-additional-remove:focus-visible {
	background: rgba(220, 38, 38, 0.08);
	color: #b91c1c;
	outline: none;
}

.hmi-events-additional-add {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.5rem 1rem;
	border: 1px dashed rgba(0, 112, 120, 0.5);
	border-radius: 8px;
	background: transparent;
	color: var(--hmi-teal-500, #007078);
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
.hmi-events-additional-add:hover:not(:disabled),
.hmi-events-additional-add:focus-visible:not(:disabled) {
	background: rgba(0, 112, 120, 0.06);
	border-color: var(--hmi-teal-500, #007078);
	border-style: solid;
	outline: none;
}
.hmi-events-additional-add:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	color: var(--hmi-ink-light, #4a5568);
	border-color: rgba(0, 0, 0, 0.15);
}

/* =========================================================================
   Danke-Seite — [hmi_event_thanks]-Output
   ========================================================================= */
.hmi-events-thanks {
	max-width: 720px;
	margin: 0 auto;
	padding: 2rem 0;
}
.hmi-events-thanks-eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--hmi-teal-500, #007078);
}
.hmi-events-thanks-title {
	margin: 0 0 1.5rem;
	font-size: clamp(1.5rem, 3.5vw, 2.25rem);
	line-height: 1.25;
	font-weight: 700;
	color: var(--hmi-ink, #002528);
}
.hmi-events-thanks-title strong {
	color: var(--hmi-teal-500, #007078);
}
.hmi-events-thanks-lead {
	margin: 0 0 1.5rem;
	font-size: 1.125rem;
	line-height: 1.6;
	color: var(--hmi-ink-light, #4a5568);
}
.hmi-events-thanks-meta {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0 0 1.5rem;
	padding: 1.25rem 1.5rem;
	background: rgba(0, 112, 120, 0.04);
	border-left: 3px solid var(--hmi-teal-500, #007078);
	border-radius: 0 6px 6px 0;
}
.hmi-events-thanks-meta-row {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 0.75rem;
	margin: 0;
}
.hmi-events-thanks-meta-row dt {
	font-weight: 600;
	color: var(--hmi-ink, #002528);
}
.hmi-events-thanks-meta-row dt i {
	margin-right: 0.375rem;
	color: var(--hmi-teal-500, #007078);
}
.hmi-events-thanks-meta-row dd {
	margin: 0;
	color: var(--hmi-ink, #002528);
}
.hmi-events-thanks-meta-secondary {
	color: var(--hmi-ink-light, #4a5568);
}
@media (max-width: 540px) {
	.hmi-events-thanks-meta-row {
		grid-template-columns: 1fr;
		gap: 0.125rem;
	}
}
.hmi-events-thanks-note {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	background: rgba(76, 62, 128, 0.06);
	border-left: 3px solid var(--hmi-violet-500, #4C3E80);
	border-radius: 0 6px 6px 0;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--hmi-ink, #002528);
}
.hmi-events-thanks-note p:last-child {
	margin-bottom: 0;
}
.hmi-events-thanks-steps {
	margin-top: 2rem;
}
.hmi-events-thanks-steps-heading {
	margin: 0 0 1rem;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--hmi-ink, #002528);
}
.hmi-events-thanks-steps-list {
	margin: 0;
	padding: 0 0 0 1.25rem;
	font-size: 1rem;
	line-height: 1.7;
	color: var(--hmi-ink, #002528);
}
.hmi-events-thanks-steps-list li {
	margin-bottom: 0.5rem;
}


/* ============================================================================
   Billing-Block (Land + VAT-ID + Reverse-Charge-Hinweise)
   ============================================================================
   Wird nur bei kostenpflichtigen Events oder explizit via show_billing="yes"
   eingeblendet. EU-Hinweis erscheint bei EU-Auslandsbuchungen, Drittland-
   Hinweis bei aussereuropaeischen Laendern. */
.hmi-events-fieldset-billing select[name="country"] {
	width: 100%;
	padding: 0.625rem 0.75rem;
	font-size: 0.9375rem;
	border: 1px solid var(--hmi-border, #d1d5db);
	border-radius: 6px;
	background: #fff;
	color: var(--hmi-ink, #002528);
}
.hmi-events-fieldset-billing input[name="vat_id"] {
	text-transform: uppercase;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	letter-spacing: 0.5px;
}
.hmi-events-fieldset-billing .hmi-events-form-hint {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.8125rem;
	color: var(--hmi-ink-light, #4a5568);
	line-height: 1.5;
}
.hmi-events-vat-notice {
	margin-top: 0.75rem;
	padding: 0.875rem 1rem;
	border-radius: 6px;
	font-size: 0.875rem;
	line-height: 1.55;
}
.hmi-events-vat-notice[hidden] {
	display: none !important;
}
.hmi-events-vat-notice strong {
	display: block;
	margin-bottom: 0.25rem;
}
.hmi-events-vat-notice--eu {
	background: rgba(3, 105, 161, 0.08);
	border-left: 3px solid #0369a1;
	color: #0c4a6e;
}
.hmi-events-vat-notice--third {
	background: rgba(217, 119, 6, 0.08);
	border-left: 3px solid #d97706;
	color: #78350f;
}

/* ==========================================================================
   Bundle-Picker (v1.4.2): "Bundle-Buchung" — Premium-Card-Style
   Eigene Identität als Wahl-Card statt als Info-Note. Top-Stripe, weißer
   Background, sanfter Shadow, großzügiges Padding, klare Hierarchie.
   ========================================================================== */

.hmi-events-bundle {
	position: relative;
	margin: 1.5rem 0;
	border: 1px solid var(--hmi-border, #d1d5db);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Hover-Lift NUR im eingeklappten Zustand — signalisiert „klickbar".
   Bei offenem Picker wäre Lift irreführend, weil dann die Modul-Cards
   das primäre Klickziel sind, nicht der Toggle. */
.hmi-events-bundle:not([open]):hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* Top-Stripe wie .hmi-card-stripe (4 px Teal-Gradient) — Signature-Akzent. */
.hmi-events-bundle::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--hmi-teal-500, #007078) 0%, var(--hmi-teal-600, #00585f) 100%);
	pointer-events: none;
}

.hmi-events-bundle-toggle {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.25rem 1.5rem 1rem;
	transition: background 0.15s ease;
}

.hmi-events-bundle-toggle::-webkit-details-marker { display: none; }
.hmi-events-bundle-toggle::marker { content: ''; }

.hmi-events-bundle-toggle:hover {
	background: rgba(0, 112, 120, 0.03);
}

.hmi-events-bundle-toggle:focus-visible {
	outline: 2px solid var(--hmi-teal-500, #007078);
	outline-offset: -2px;
}

.hmi-events-bundle-toggle-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	flex: 1;
}

.hmi-events-bundle-title {
	margin: 0;
	padding: 0;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--hmi-ink, #1B2029);
	line-height: 1.3;
	letter-spacing: -0.005em;
}

.hmi-events-bundle-subtitle {
	margin: 0;
	padding: 0;
	font-size: 0.875rem;
	color: var(--hmi-ink-light, #4A5568);
	line-height: 1.5;
}

.hmi-events-bundle-subtitle strong {
	color: var(--hmi-teal-600, #00585f);
	font-weight: 700;
}

/* Chevron: dezenter CSS-Indikator, rotiert beim Öffnen. */
.hmi-events-bundle-chevron {
	flex-shrink: 0;
	width: 10px;
	height: 10px;
	border-right: 2px solid var(--hmi-teal-500, #007078);
	border-bottom: 2px solid var(--hmi-teal-500, #007078);
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	margin-right: 0.5rem;
	margin-top: -4px;
}

.hmi-events-bundle[open] .hmi-events-bundle-chevron {
	transform: rotate(-135deg);
	margin-top: 4px;
}

/* ----- Picker-Content ----- */

.hmi-events-bundle-content {
	padding: 0 1.5rem 1.5rem;
}

.hmi-events-bundle-intro {
	margin: 0.25rem 0 1.25rem;
	padding: 0;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--hmi-ink-light, #4A5568);
	font-style: normal;
	background: none;
	border: none;
	border-radius: 0;
}

.hmi-events-bundle-intro strong {
	color: var(--hmi-ink, #1B2029);
}

/* ----- Modul-Liste ----- */

.hmi-events-bundle-modules {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	display: grid;
	gap: 0.5rem;
}

.hmi-events-bundle-module {
	margin: 0;
	padding: 0;
	position: relative;
}

.hmi-events-bundle-module-label {
	display: block;
	cursor: pointer;
	margin: 0;
}

.hmi-events-bundle-module.is-unavailable .hmi-events-bundle-module-label {
	cursor: not-allowed;
}

.hmi-events-bundle-module.is-current .hmi-events-bundle-module-label {
	cursor: default;
}

.hmi-events-bundle-checkbox {
	/* visually-hidden (sr-only) statt opacity:0 — manche Browser (Safari)
	   rendern disabled-checked Checkboxen sonst weiterhin als OS-Default,
	   was als Geister-Haken in der Card-Ecke erschienen ist. */
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.hmi-events-bundle-module-card {
	display: grid;
	grid-template-columns: 22px 1fr auto;
	gap: 1rem;
	align-items: center;
	padding: 1rem 1.125rem;
	border: 1px solid var(--hmi-border, #d1d5db);
	border-radius: 10px;
	background: #fff;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.hmi-events-bundle-module-label:hover .hmi-events-bundle-module-card {
	border-color: rgba(0, 112, 120, 0.45);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.hmi-events-bundle-module.is-unavailable .hmi-events-bundle-module-card,
.hmi-events-bundle-module.is-unavailable .hmi-events-bundle-module-label:hover .hmi-events-bundle-module-card {
	opacity: 0.55;
	background: #f8f9fa;
	border-color: var(--hmi-border, #d1d5db);
}

.hmi-events-bundle-module-check {
	width: 18px;
	height: 18px;
	border: 2px solid #cbd5e1;
	border-radius: 4px;
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s ease;
	position: relative;
}

.hmi-events-bundle-module-check::after {
	content: '✓';
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	opacity: 0;
	transform: scale(0.8);
	transition: all 0.15s ease;
}

.hmi-events-bundle-checkbox:checked + .hmi-events-bundle-module-card .hmi-events-bundle-module-check {
	background: var(--hmi-teal-500, #007078);
	border-color: var(--hmi-teal-500, #007078);
}

.hmi-events-bundle-checkbox:checked + .hmi-events-bundle-module-card .hmi-events-bundle-module-check::after {
	opacity: 1;
	transform: scale(1);
}

.hmi-events-bundle-checkbox:checked + .hmi-events-bundle-module-card {
	border-color: var(--hmi-teal-500, #007078);
	background: rgba(0, 112, 120, 0.04);
	box-shadow: 0 0 0 1px var(--hmi-teal-500, #007078), 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(0, 112, 120, 0.08);
}

.hmi-events-bundle-checkbox:focus-visible + .hmi-events-bundle-module-card {
	outline: 2px solid var(--hmi-teal-500, #007078);
	outline-offset: 2px;
}

.hmi-events-bundle-module-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.hmi-events-bundle-module-title {
	font-weight: 700;
	font-size: 0.9375rem;
	color: var(--hmi-ink, #1B2029);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.hmi-events-bundle-module-tag {
	display: inline-block;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--hmi-teal-500, #007078);
	color: #fff;
}

.hmi-events-bundle-module-meta {
	font-size: 0.8125rem;
	color: var(--hmi-ink-light, #4A5568);
}

.hmi-events-bundle-module-unavailable {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	color: #b91c1c;
	margin-top: 2px;
}

.hmi-events-bundle-module-price {
	text-align: right;
	flex-shrink: 0;
	white-space: nowrap;
}

.hmi-events-bundle-module-price-net {
	display: block;
	font-weight: 700;
	font-size: 1rem;
	color: var(--hmi-ink, #1B2029);
}

.hmi-events-bundle-module-price-sub {
	display: block;
	font-size: 0.6875rem;
	color: #94a3b8;
	margin-top: 1px;
}

/* ----- Live-Summary ----- */

.hmi-events-bundle-summary {
	margin: 1rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
	background: none;
	border: none;
	border-radius: 0;
}

.hmi-events-bundle-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	font-size: 0.875rem;
}

.hmi-events-bundle-summary-row[hidden] {
	display: none;
}

.hmi-events-bundle-summary-row span:first-child {
	color: var(--hmi-ink-light, #4A5568);
}

.hmi-events-bundle-summary-value {
	color: var(--hmi-ink, #1B2029);
	font-weight: 600;
}

.hmi-events-bundle-summary-value--strike {
	text-decoration: line-through;
	color: #94a3b8;
	font-weight: 400;
}

.hmi-events-bundle-summary-row-savings span:first-child,
.hmi-events-bundle-summary-row-savings .hmi-events-bundle-summary-value {
	color: var(--hmi-teal-600, #00585f);
	font-weight: 700;
}

.hmi-events-bundle-summary-row-total {
	padding-top: 0.5rem;
	border-top: 1px dashed rgba(0, 112, 120, 0.25);
}

.hmi-events-bundle-summary-row-total strong {
	color: var(--hmi-ink, #1B2029);
	font-size: 1rem;
}

.hmi-events-bundle-summary-row-total small {
	color: var(--hmi-ink-light, #4A5568);
	font-weight: 400;
	font-size: 0.75rem;
}

.hmi-events-bundle-summary-row-total .hmi-events-bundle-summary-value strong {
	font-size: 1.125rem;
	color: var(--hmi-teal-600, #00585f);
}

.hmi-events-bundle-summary-row-brutto {
	font-size: 0.8125rem;
}

.hmi-events-bundle-summary-row-brutto span:first-child {
	font-style: italic;
}

.hmi-events-bundle-summary-badge {
	display: inline-flex;
	align-items: center;
	margin-top: 0.5rem;
	padding: 4px 10px;
	background: var(--hmi-teal-500, #007078);
	color: #fff;
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.hmi-events-bundle-summary-badge[hidden] { display: none; }

@media (max-width: 600px) {
	.hmi-events-bundle-toggle { padding: 0.75rem 1rem; gap: 0.625rem; }
	.hmi-events-bundle-content { padding: 0 1rem 1rem; }
	.hmi-events-bundle-module-card { grid-template-columns: 20px 1fr; padding: 0.75rem 0.875rem; gap: 0.625rem; }
	.hmi-events-bundle-module-price { grid-column: 1 / -1; text-align: left; padding-left: calc(20px + 0.625rem); }
	.hmi-events-bundle-module-price-net { display: inline; }
	.hmi-events-bundle-module-price-sub { display: inline; margin-left: 0.375rem; }
}

/* ==========================================================================
   Sticky-Buchungsleiste (v1.4.1): Live-Preis + Anmelden-CTA immer im
   Sichtfeld. Erweiterbar zu Mini-Picker (Hybrid-Variante).
   ========================================================================== */

.hmi-events-stickybar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-top: 1px solid rgba(0, 112, 120, 0.18);
	/* Subtiler Schatten — die Bar soll „angedockt" wirken, nicht „schweben". */
	box-shadow: 0 -4px 16px rgba(0, 37, 40, 0.06);
	transition: transform 0.25s ease, opacity 0.25s ease;
	transform: translateY(0);
	opacity: 1;
}

.hmi-events-stickybar[hidden] {
	display: none !important;
}

.hmi-events-stickybar.is-near-form {
	transform: translateY(100%);
	opacity: 0;
	pointer-events: none;
}

.hmi-events-stickybar-row {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	padding: 0.75rem 1.25rem;
	max-width: 1280px;
	margin: 0 auto;
}

.hmi-events-stickybar-expand {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.5rem 0.75rem;
	background: transparent;
	border: 1px solid var(--hmi-teal-500, #007078);
	color: var(--hmi-teal-600, #00585f);
	border-radius: 8px;
	cursor: pointer;
	font-size: 0.8125rem;
	font-weight: 600;
	flex-shrink: 0;
	transition: background 0.15s ease;
}

.hmi-events-stickybar-expand:hover,
.hmi-events-stickybar-expand:focus-visible {
	background: rgba(0, 112, 120, 0.08);
	outline: none;
}

.hmi-events-stickybar-expand-icon {
	display: inline-block;
	transition: transform 0.2s ease;
	font-size: 0.875rem;
	line-height: 1;
}

.hmi-events-stickybar.is-expanded .hmi-events-stickybar-expand-icon {
	transform: rotate(180deg);
}

.hmi-events-stickybar-summary {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.hmi-events-stickybar-title {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--hmi-ink, #002528);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hmi-events-stickybar-price {
	font-size: 0.875rem;
	color: var(--hmi-ink-light, #4a5568);
	display: flex;
	gap: 0.5rem;
	align-items: baseline;
	flex-wrap: wrap;
}

.hmi-events-stickybar-price strong {
	color: var(--hmi-teal-500, #007078);
	font-size: 1.0625rem;
	font-weight: 700;
}

.hmi-events-stickybar-price small {
	font-size: 0.75rem;
	color: #94a3b8;
}

/* Höhere Spezifität via Element + Klasse PLUS !important — das HM-i-Theme
   hat globale `a:hover { color: teal }`-Regeln, die teilweise mit !important
   gesetzt sind und auch bei chained-class-Selektoren noch greifen. */
a.hmi-events-stickybar-cta,
a.hmi-events-stickybar-cta:link,
a.hmi-events-stickybar-cta:visited {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.75rem 1.25rem;
	background: var(--hmi-violet-500, #4C3E80) !important;
	color: #fff !important;
	border-radius: 999px;
	text-decoration: none !important;
	font-weight: 700;
	font-size: 0.9375rem;
	flex-shrink: 0;
	transition: background 0.15s ease, transform 0.15s ease;
	box-shadow: 0 4px 12px rgba(76, 62, 128, 0.22);
}

a.hmi-events-stickybar-cta:hover,
a.hmi-events-stickybar-cta:focus,
a.hmi-events-stickybar-cta:focus-visible,
a.hmi-events-stickybar-cta:active {
	background: var(--hmi-violet-600, #3F3369) !important;
	color: #fff !important;
	text-decoration: none !important;
	transform: translateY(-1px);
	outline: none;
}

/* ----- Expanded Mini-Picker ----- */

.hmi-events-stickybar-expanded {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 1.25rem 0.875rem;
	border-top: 1px dashed rgba(0, 112, 120, 0.15);
	max-height: 50vh;
	overflow-y: auto;
}

.hmi-events-stickybar-expanded[hidden] {
	display: none;
}

.hmi-events-stickybar-expanded-intro {
	margin: 0.625rem 0;
	font-size: 0.8125rem;
	color: var(--hmi-ink-light, #4a5568);
}

.hmi-events-stickybar-modules {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.375rem;
}

.hmi-events-stickybar-module {
	display: grid;
	grid-template-columns: 22px 1fr auto;
	gap: 0.75rem;
	align-items: center;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--hmi-border, #d1d5db);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	font-size: 0.875rem;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.hmi-events-stickybar-module:hover {
	border-color: rgba(0, 112, 120, 0.4);
}

.hmi-events-stickybar-module.is-checked {
	border-color: var(--hmi-teal-500, #007078);
	background: rgba(0, 112, 120, 0.04);
}

.hmi-events-stickybar-module.is-disabled,
.hmi-events-stickybar-module.is-unavailable {
	opacity: 0.55;
	cursor: not-allowed;
}

.hmi-events-stickybar-module.is-current {
	opacity: 1;
	cursor: default;
}

.hmi-events-stickybar-module-check {
	width: 18px;
	height: 18px;
	border: 2px solid #cbd5e1;
	border-radius: 4px;
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: all 0.15s ease;
}

.hmi-events-stickybar-module-check::after {
	content: '✓';
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	opacity: 0;
	transform: scale(0.8);
	transition: all 0.15s ease;
}

.hmi-events-stickybar-module.is-checked .hmi-events-stickybar-module-check {
	background: var(--hmi-teal-500, #007078);
	border-color: var(--hmi-teal-500, #007078);
}

.hmi-events-stickybar-module.is-checked .hmi-events-stickybar-module-check::after {
	opacity: 1;
	transform: scale(1);
}

.hmi-events-stickybar-module-title {
	min-width: 0;
	color: var(--hmi-ink, #002528);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hmi-events-stickybar-module-title small {
	color: var(--hmi-ink-light, #4a5568);
	font-weight: 400;
}

.hmi-events-stickybar-module-price {
	font-weight: 700;
	color: var(--hmi-ink, #002528);
	white-space: nowrap;
}

.hmi-events-stickybar-expanded-hint {
	margin: 0.625rem 0 0;
	font-size: 0.75rem;
	color: #94a3b8;
	font-style: italic;
}

/* Body-Padding, damit der letzte Content nicht hinter der Bar verschwindet.
   JS setzt diese Klasse, sobald die Bar tatsächlich sichtbar wird. */
body.has-hmi-stickybar {
	padding-bottom: 96px;
}

body.has-hmi-stickybar.has-hmi-stickybar-expanded {
	padding-bottom: 380px;
}

/* ==========================================================================
   Status-Badges (v1.4.1) — Single Source of Truth fuer Event-Status-Anzeige.
   PHP: HMI_Events_CPT::get_status_info($status) liefert den class-Suffix.
   ========================================================================== */

.hmi-events-status-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
	letter-spacing: 0.02em;
}
.hmi-events-status-badge--open     { background: #16a34a; }
.hmi-events-status-badge--full     { background: #f59e0b; }
.hmi-events-status-badge--closed   { background: #94a3b8; }
.hmi-events-status-badge--canceled { background: #dc2626; }
.hmi-events-status-badge--past     { background: #cbd5e1; color: #475569; }
.hmi-events-status-badge--draft    { background: #eab308; color: #422006; }
.hmi-events-status-badge--unknown  { background: #64748b; }

/* ==========================================================================
   Capacity-Indikator (v1.4.1) — visueller Fortschrittsbalken für die
   Plätze-Auslastung. Rendert im Frontend (Event-Single) und Admin-Liste.
   ========================================================================== */

.hmi-events-capacity {
	margin: 0.875rem 0;
	font-size: 0.875rem;
	color: var(--hmi-ink-light, #4a5568);
}

.hmi-events-capacity-track {
	position: relative;
	height: 10px;
	background: #e2e8f0;
	border-radius: 999px;
	overflow: hidden;
	margin-top: 0.375rem;
}

.hmi-events-capacity-fill {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	background: linear-gradient(90deg, var(--hmi-teal-500, #007078), var(--hmi-teal-600, #00585f));
	border-radius: 999px;
	transition: width 0.3s ease;
}

.hmi-events-capacity.is-warning .hmi-events-capacity-fill {
	background: linear-gradient(90deg, #f59e0b, #d97706);
}

.hmi-events-capacity.is-critical .hmi-events-capacity-fill {
	background: linear-gradient(90deg, #dc2626, #b91c1c);
}

.hmi-events-capacity-label {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	font-weight: 600;
	color: var(--hmi-ink, #002528);
}

.hmi-events-capacity-label small {
	font-weight: 400;
	color: var(--hmi-ink-light, #4a5568);
}

/* ==========================================================================
   Urgency-Banner (v1.4.1) — über dem Anmeldeformular, wenn wenige Plätze
   übrig sind oder das Event ausgebucht ist.
   ========================================================================== */

.hmi-events-urgency {
	margin: 1rem 0;
	padding: 0.875rem 1.125rem;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 0.625rem;
}

.hmi-events-urgency-icon {
	font-size: 1.25rem;
	flex-shrink: 0;
}

.hmi-events-urgency--warning {
	background: #fef3c7;
	border-left: 4px solid #f59e0b;
	color: #78350f;
}

.hmi-events-urgency--critical {
	background: #fee2e2;
	border-left: 4px solid #dc2626;
	color: #7f1d1d;
}

.hmi-events-urgency--full {
	background: #f1f5f9;
	border-left: 4px solid #64748b;
	color: #334155;
}

@media (max-width: 760px) {
	.hmi-events-stickybar-row { padding: 0.625rem 0.875rem; gap: 0.5rem; }
	.hmi-events-stickybar-title { font-size: 0.8125rem; }
	.hmi-events-stickybar-price strong { font-size: 1rem; }
	.hmi-events-stickybar-cta { padding: 0.625rem 0.875rem; font-size: 0.875rem; }
	.hmi-events-stickybar-expand-label { display: none; }
	.hmi-events-stickybar-expand { padding: 0.5rem 0.625rem; }
	.hmi-events-stickybar-expanded { padding: 0 0.875rem 0.75rem; max-height: 60vh; }
	body.has-hmi-stickybar { padding-bottom: 80px; }
	body.has-hmi-stickybar.has-hmi-stickybar-expanded { padding-bottom: 340px; }
}

