/*
 * Hettstedt Live – Veranstaltungskalender
 * Gleiche Design-Sprache wie das Fundsachen-Plugin (weiße Kachel,
 * linker Farbakzent, mobile-first Grid).
 */

.hl-ev {
	--hl-ev-accent: #c9a26d;
	--hl-ev-text: #2b2b2b;
	--hl-ev-text-muted: #5a5a5a;
	--hl-ev-card-bg: #ffffff;
	--hl-ev-link: #1d4e89;
	--hl-ev-focus: #1d4e89;
	--hl-ev-radius: 12px;
	--hl-ev-gap: 0.85rem;

	color: var(--hl-ev-text);
	max-width: 1100px;
	margin: 0 auto;
	width: 100%;
}

.hl-ev,
.hl-ev *,
.hl-ev *::before,
.hl-ev *::after {
	box-sizing: border-box;
}

.hl-ev__heading {
	margin: 0 0 0.75rem;
}

.hl-ev__empty {
	padding: 1.5rem;
	background: #f7f7f7;
	border-radius: var(--hl-ev-radius);
}

/* Kachel-Grid: Mobile First = 1 Spalte.
   !important gegen Theme-Listenstile (Kadence überschreibt ul/li sonst). */
.hl-ev__grid {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--hl-ev-gap);
	width: 100%;
}

.hl-ev__grid li {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	width: 100%;
}

.hl-ev__card {
	background: var(--hl-ev-card-bg);
	border-left: 6px solid var(--hl-ev-accent);
	border-radius: var(--hl-ev-radius);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
	padding: 0.85rem 1rem;
	width: 100%;
	height: 100%;
}

/* Whitelist gegen Werbe-Einschleusung (z. B. Google Auto Ads, die eigene
   Wrapper-Divs zwischen Absätzen einfügen): nur explizit bekannte,
   erwartete direkte Kind-Elemente der Kachel werden angezeigt. Robuster
   als eine Liste bekannter Werbe-Klassennamen, da diese sich ständig
   ändern – hier ist es umgekehrt, es kommt nur rein, was wir kennen. */
.hl-ev__card > *:not(.hl-ev__title):not(.hl-ev__meta):not(.hl-ev__details) {
	display: none !important;
}

/* Gleiche Whitelist-Logik eine Ebene tiefer: falls eine Werbe-Einheit
   (z. B. ein Platzhalter-Wrapper gegen Layout-Sprünge, der auch bei
   ausgeblendetem Werbeinhalt bestehen bleibt) nicht als direktes
   Kind der Kachel, sondern innerhalb einer Meta-Zeile landet. */
.hl-ev__meta > *:not(span):not(.hl-ev__location-btn) {
	display: none !important;
}

.hl-ev__title > * {
	display: none !important;
}

/* Foto steckt jetzt im aufklappbaren "Mehr erfahren"-Bereich statt in der
   Übersicht (Community-Meldungen können Fotos haben, Stadt-Termine nicht –
   sonst wirkt die Übersicht uneinheitlich). */
.hl-ev__details-photo {
	display: block;
	width: 100%;
	height: auto;
	max-height: 420px;
	object-fit: contain;
	background: #f2f2f2;
	border-radius: 8px;
	margin-bottom: 0.7rem;
}

.hl-ev__title {
	font-size: 1rem;
	line-height: 1.3;
	margin: 0 0 0.4rem;
}

.hl-ev__meta {
	margin: 0 0 0.3rem;
	color: var(--hl-ev-text-muted);
	font-size: 0.88rem;
	line-height: 1.35;
}

.hl-ev__meta span:first-child {
	margin-right: 0.35rem;
}

.hl-ev__meta:last-of-type {
	margin-bottom: 0;
}

.hl-ev__location-btn {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	color: var(--hl-ev-link);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
	text-align: left;
}

.hl-ev__details {
	margin-top: 0.45rem;
}

.hl-ev__details summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--hl-ev-link);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.hl-ev__details-body {
	margin-top: 0.6rem;
	font-size: 0.92rem;
}

.hl-ev__details-body p {
	margin: 0 0 0.6rem;
}

.hl-ev__details-body p:last-child {
	margin-bottom: 0;
}

/* Tablet: 2 Spalten */
@media (min-width: 600px) {
	.hl-ev__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Desktop: 3 Spalten */
@media (min-width: 900px) {
	.hl-ev__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* "Weitere anzeigen" (progressive enhancement per JS) */
.hl-ev__item--hidden,
.hl-ev__item--filtered-out {
	display: none !important;
}

.hl-ev__reveal-btn {
	display: block;
	margin: 1rem auto 0;
	background: var(--hl-ev-card-bg);
	border: 2px solid var(--hl-ev-accent);
	border-radius: 999px;
	padding: 0.6rem 1.4rem;
	font-weight: 600;
	color: var(--hl-ev-text);
	cursor: pointer;
}

.hl-ev__reveal-btn:hover {
	background: var(--hl-ev-accent);
}

/* Orts-Filter */
.hl-ev__filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	background: #f4ead9;
	border-radius: var(--hl-ev-radius);
	padding: 0.6rem 1rem;
	margin-bottom: var(--hl-ev-gap);
	font-size: 0.92rem;
}

.hl-ev__filter-reset {
	background: var(--hl-ev-link);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 0.3rem 0.9rem;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
}

/* Barrierefreiheit: sichtbarer Fokus */
.hl-ev a:focus-visible,
.hl-ev__details summary:focus-visible,
.hl-ev__location-btn:focus-visible,
.hl-ev__reveal-btn:focus-visible,
.hl-ev__filter-reset:focus-visible,
.hl-ev__report-summary:focus-visible,
.hl-ev__submit-btn:focus-visible,
.hl-ev__editor-btn:focus-visible,
.hl-ev__editor:focus-visible,
.hl-ev__field input:focus-visible,
.hl-ev__field select:focus-visible,
.hl-ev__field textarea:focus-visible {
	outline: 3px solid var(--hl-ev-focus);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.hl-ev * {
		transition: none !important;
		animation: none !important;
	}
}

/* Werbe-Hardblock: keine Google/AdSense-/Advanced-Ads-Einblendungen
   innerhalb des Veranstaltungs-Bereichs (zusätzlich zur Whitelist oben). */
.hl-ev ins.adsbygoogle,
.hl-ev .adsbygoogle,
.hl-ev .google-auto-placed,
.hl-ev [data-anchor-status],
.hl-ev [data-ad-status],
.hl-ev [id^="google_ads_iframe"],
.hl-ev [id^="div-gpt-ad"],
.hl-ev [id^="aswift_"],
.hl-ev [name^="aswift_"],
.hl-ev .advads,
.hl-ev .advads_ad_wrapper,
.hl-ev [class*="advads-"],
.hl-ev [data-ad-slot],
.hl-ev [class*="ad-slot"],
.hl-ev [class*="ad-unit"],
.hl-ev iframe[src*="googlesyndication"],
.hl-ev iframe[src*="doubleclick"],
.hl-ev iframe[src*="googleadservices"] {
	display: none !important;
	height: 0 !important;
	width: 0 !important;
	overflow: hidden !important;
}

/* ------------------------------------------------------------------ *
 *  "Veranstaltung melden"-Formular
 * ------------------------------------------------------------------ */

.hl-ev__report {
	margin-bottom: var(--hl-ev-gap);
	border: 2px solid var(--hl-ev-accent);
	border-radius: var(--hl-ev-radius);
	background: var(--hl-ev-card-bg);
	overflow: hidden;
}

.hl-ev__report-summary {
	cursor: pointer;
	list-style: none;
	padding: 0.9rem 1.1rem;
	font-weight: 700;
	font-size: 1.02rem;
	background: var(--hl-ev-accent);
	color: #fff;
}

.hl-ev__report-summary::-webkit-details-marker {
	display: none;
}

.hl-ev__report-body {
	padding: 1rem 1.1rem 1.2rem;
}

/* Honeypot: für Menschen unsichtbar, aber nicht per display:none (manche
   Bots überspringen das gezielt) – off-screen positioniert. */
.hl-ev__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.hl-ev__field {
	margin-bottom: 0.9rem;
}

.hl-ev__field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.3rem;
	font-size: 0.9rem;
}

.hl-ev__field input[type="text"],
.hl-ev__field input[type="date"],
.hl-ev__field input[type="time"],
.hl-ev__field input[type="file"],
.hl-ev__field select,
.hl-ev__field textarea {
	width: 100%;
	padding: 0.55rem 0.7rem;
	border: 1px solid #ccc;
	border-radius: 8px;
	font-size: 1rem;
	font-family: inherit;
	background: #fff;
	color: var(--hl-ev-text);
}

.hl-ev__field textarea {
	resize: vertical;
}

.hl-ev__field-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.7rem;
}

@media (min-width: 400px) {
	.hl-ev__field-row {
		grid-template-columns: 1fr 1fr;
	}
}

.hl-ev__location-other {
	margin-top: 0.5rem;
}

.hl-ev__title-warning {
	margin-top: 0.4rem;
	padding: 0.55rem 0.7rem;
	background: #fdecea;
	color: #7a1f16;
	border-radius: 8px;
	font-size: 0.86rem;
}

.hl-ev__submit-btn {
	background: var(--hl-ev-link);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 0.7rem 1.6rem;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
}

.hl-ev__submit-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.hl-ev__form-note {
	margin-top: 0.6rem;
	font-size: 0.82rem;
	color: var(--hl-ev-text-muted);
}

.hl-ev__notice {
	padding: 0.7rem 1rem;
	border-radius: 8px;
	margin-bottom: 1rem;
	font-size: 0.92rem;
}

.hl-ev__notice--success {
	background: #e8f5e9;
	color: #1b5e20;
}

.hl-ev__notice--warning {
	background: #fff3e0;
	color: #7a4a00;
}

.hl-ev__notice--error {
	background: #fdecea;
	color: #7a1f16;
}

/* Rich-Text-Mini-Editor (fett/kursiv/unterstrichen) */
.hl-ev__editor-toolbar {
	display: flex;
	gap: 0.4rem;
	margin-bottom: 0.4rem;
}

.hl-ev__editor-btn {
	background: #f0f0f0;
	border: 1px solid #ccc;
	border-radius: 6px;
	width: 34px;
	height: 34px;
	font-size: 0.9rem;
	cursor: pointer;
}

.hl-ev__editor-btn:hover {
	background: var(--hl-ev-accent);
	color: #fff;
	border-color: var(--hl-ev-accent);
}

.hl-ev__editor {
	width: 100%;
	min-height: 100px;
	padding: 0.55rem 0.7rem;
	border: 1px solid #ccc;
	border-radius: 8px;
	font-size: 1rem;
	font-family: inherit;
	background: #fff;
	color: var(--hl-ev-text);
}

.hl-ev__editor p {
	margin: 0 0 0.6rem;
}

.hl-ev__editor a {
	color: var(--hl-ev-link);
}
