/* SE News-Eingabe - moderner Frontend Block-Editor
   On-brand (SE Audiotechnik Grün) · luftig · weiche Schatten */

.se-news-wrap {
	--se-accent: #5ab230;
	--se-accent-dark: #538d17;
	--se-accent-grad: linear-gradient(95deg, #71ac22 0%, #538d17 100%);
	--se-accent-soft: rgba(90, 178, 48, 0.10);
	--se-accent-ring: rgba(90, 178, 48, 0.22);
	--se-ink: #0f1714;
	--se-text: #4b5550;
	--se-muted: #8b938e;
	--se-line: #e7eae8;
	--se-line-2: #eef1ef;
	--se-bg: #ffffff;
	--se-bg-soft: #f7f9f8;
	--se-radius: 16px;
	--se-radius-sm: 11px;
	/* Einheitliche Höhe aller einzeiligen Bedienelemente, damit nebeneinander
	   stehende Felder exakt auf einer Linie liegen. */
	--se-control-h: 51px;
	--se-shadow: 0 1px 2px rgba(16, 23, 20, 0.05), 0 1px 1px rgba(16, 23, 20, 0.04);
	--se-shadow-lg: 0 18px 40px -20px rgba(16, 23, 20, 0.30);

	max-width: 780px;
	margin: 0 auto;
	/* Eigene weiße Karte: Palette ist auf hellen Grund ausgelegt,
	   Theme-Hintergrund (z. B. dunkel) darf nicht durchschlagen. */
	background: var(--se-bg);
	border: 1px solid var(--se-line);
	border-radius: var(--se-radius);
	box-shadow: var(--se-shadow-lg);
	padding: 36px 40px 40px;
	color: var(--se-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.se-news-wrap *,
.se-news-wrap *::before,
.se-news-wrap *::after { box-sizing: border-box; }

/* Kopf */
.se-news-heading {
	margin: 0 0 6px;
	font-size: 1.9rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--se-ink);
	line-height: 1.15;
}

.se-news-intro {
	margin: 0 0 30px;
	color: var(--se-muted);
	font-size: 0.96rem;
	line-height: 1.55;
	max-width: 60ch;
}

/* Section-Labels */
.se-news-blocks-label,
.se-news-field > label {
	display: block;
	font-size: 0.74rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--se-muted);
	margin-bottom: 9px;
}

.se-news-blocks-label { margin: 4px 0 12px; }

.se-news-field { margin-bottom: 20px; flex: 1 1 0; }
.se-news-row { display: flex; gap: 18px; flex-wrap: wrap; }
.se-news-field .req { color: var(--se-accent-dark); }

/* Hilfetext unter einem Feld */
.se-news-help {
	display: block;
	margin-top: 7px;
	font-size: 0.82rem;
	line-height: 1.5;
	color: var(--se-muted);
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
}

/* Inputs */
/* Ein Rahmen für alle Felder.
   YOOtheme setzt in theme.1.css `input { border: 1px solid #707070 !important }`.
   Das trifft jedes input, aber kein textarea – daher sahen Titel und
   Kurzbeschreibung unterschiedlich aus. Gegen ein !important der Gegenseite hilft
   nur ein eigenes; die Wrapper-Klasse im Selektor sorgt dafür, dass unseres
   gewinnt und die Wirkung auf diese Maske beschränkt bleibt. */
.se-news-wrap .se-news-field input[type="text"],
.se-news-wrap .se-news-field input[type="url"],
.se-news-wrap .se-news-field input[type="email"],
.se-news-wrap .se-news-field input[type="date"],
.se-news-wrap .se-news-field input[type="search"],
.se-news-wrap .se-news-field input[type="number"],
.se-news-wrap .se-news-field select,
.se-news-wrap .se-news-field textarea {
	width: 100%;
	padding: 13px 15px;
	border: 1.5px solid var(--se-line) !important;
	border-radius: var(--se-radius-sm) !important;
	font-size: 0.97rem;
	line-height: 1.4;
	color: var(--se-ink);
	background: var(--se-bg);
	font-family: inherit;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

/* Ein leeres Pflichtfeld ist für den Browser "ungültig". Ohne diese Zeile
   zeichnen manche Themes es abweichend, und die Maske sieht uneinheitlich aus. */
.se-news-wrap .se-news-field input:required,
.se-news-wrap .se-news-field input:invalid,
.se-news-wrap .se-news-field textarea:invalid,
.se-news-wrap .se-news-field select:invalid {
	border-color: var(--se-line) !important;
	box-shadow: none;
}

.se-news-field input::placeholder,
.se-news-field textarea::placeholder { color: #b3b9b5; }

.se-news-wrap .se-news-field input:focus,
.se-news-wrap .se-news-field select:focus,
.se-news-wrap .se-news-field textarea:focus {
	outline: none;
	border-color: var(--se-accent) !important;
	box-shadow: 0 0 0 4px var(--se-accent-ring);
}

.se-news-field textarea { resize: vertical; line-height: 1.55; }

#se_news_title {
	font-size: 1.25rem !important;
	font-weight: 650;
	padding: 15px 16px !important;
	letter-spacing: -0.01em;
}

/* Nebeneinander stehende Felder müssen auf einer Linie liegen. Das Datumsfeld
   rechnet für das Kalendersymbol etwas Höhe dazu, deshalb wird die Höhe gesetzt
   statt sie aus der Innenabstand-Rechnung zu übernehmen. Titel und Textfeld
   bleiben ausgenommen: eines ist größer gesetzt, das andere mehrzeilig. */
.se-news-wrap .se-news-field input[type="text"],
.se-news-wrap .se-news-field input[type="url"],
.se-news-wrap .se-news-field input[type="email"],
.se-news-wrap .se-news-field input[type="date"],
.se-news-wrap .se-news-field input[type="search"],
.se-news-wrap .se-news-field input[type="number"],
.se-news-wrap .se-news-field select {
	height: var(--se-control-h) !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.se-news-wrap #se_news_title { height: auto !important; padding-top: 15px !important; padding-bottom: 15px !important; }

.se-seg { min-height: var(--se-control-h); }

/* Segmented Control (Sprache) */
/* Volle Spaltenbreite: sonst endet der Schalter mitten in der Spalte, während
   jedes andere Feld bis zum Rand geht – nebeneinander sieht das schief aus. */
.se-seg {
	display: flex;
	width: 100%;
	padding: 4px;
	gap: 4px;
	background: var(--se-bg-soft);
	border: 1.5px solid var(--se-line);
	border-radius: 12px;
}

.se-seg input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.se-seg label {
	display: inline-flex;
	flex: 1 1 0;
	align-items: center;
	justify-content: center;
	padding: 9px 12px;
	margin: 0 !important;
	border-radius: 9px;
	font-size: 0.92rem !important;
	font-weight: 650 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	color: var(--se-text) !important;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.se-seg input[type="radio"]:checked + label {
	background: var(--se-accent-grad);
	color: #fff !important;
	box-shadow: 0 4px 10px -4px rgba(83, 141, 23, 0.7);
}

.se-seg input[type="radio"]:focus-visible + label {
	box-shadow: 0 0 0 3px var(--se-accent-ring);
}

/* Drop-Zonen (Hauptbild + Bildblock) */
.se-news-mainimage { margin-bottom: 26px; }

.se-news-droplabel {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 22px;
	border: 2px dashed #d3d8d5;
	border-radius: var(--se-radius);
	background: var(--se-bg-soft);
	cursor: pointer;
	position: relative;
	transition: border-color 0.18s ease, background 0.18s ease, transform 0.05s ease;
}

.se-news-droplabel:hover {
	border-color: var(--se-accent);
	background: var(--se-accent-soft);
}

.se-news-droplabel__icon {
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 13px;
	background: var(--se-accent-grad);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	box-shadow: 0 6px 14px -6px rgba(83, 141, 23, 0.7);
}

.se-news-droplabel__text { font-size: 0.9rem; color: var(--se-text); line-height: 1.45; }
.se-news-droplabel__text strong { color: var(--se-ink); font-size: 0.98rem; }

.se-news-droplabel input[type="file"] {
	position: absolute; inset: 0; opacity: 0; cursor: pointer;
}

.se-news-mainimage__preview,
.se-block__preview { position: relative; margin-top: 14px; }

.se-news-mainimage__preview img,
.se-block__preview img {
	max-width: 100%;
	border-radius: var(--se-radius-sm);
	display: block;
	box-shadow: var(--se-shadow);
}

.se-news-img-clear {
	position: absolute; top: 10px; right: 10px;
	width: 32px; height: 32px;
	border: none; border-radius: 50%;
	background: rgba(15, 23, 20, 0.7);
	color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer;
	backdrop-filter: blur(4px);
	transition: background 0.15s ease;
}
.se-news-img-clear:hover { background: rgba(15, 23, 20, 0.9); }

/* Block-Editor */
.se-news-blocks { display: flex; flex-direction: column; gap: 14px; }

.se-news-empty {
	margin: 0;
	padding: 30px 18px;
	text-align: center;
	color: var(--se-muted);
	font-size: 0.9rem;
	border: 1.5px dashed var(--se-line);
	border-radius: var(--se-radius);
	background: var(--se-bg-soft);
}

.se-block {
	position: relative;
	border: 1.5px solid var(--se-line);
	border-radius: var(--se-radius);
	background: var(--se-bg);
	box-shadow: var(--se-shadow);
	overflow: hidden;
	transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.se-block::before {
	content: "";
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 3px;
	background: transparent;
	transition: background 0.18s ease;
}

.se-block:focus-within {
	border-color: #d7ddd9;
	box-shadow: var(--se-shadow-lg);
}
.se-block:focus-within::before { background: var(--se-accent-grad); }

.se-block.is-dragging {
	opacity: 0.65;
	border-style: solid;
	border-color: var(--se-accent);
	box-shadow: var(--se-shadow-lg);
	transform: scale(1.01);
}

.se-block__bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px 10px 16px;
	background: #fbfcfb;
	border-bottom: 1px solid var(--se-line-2);
}

.se-block__handle {
	cursor: grab;
	color: #c2c8c4;
	font-size: 1.05rem;
	line-height: 1;
	user-select: none;
	padding: 2px 4px;
	border-radius: 6px;
	transition: color 0.15s ease, background 0.15s ease;
}
.se-block__handle:hover { color: var(--se-accent); background: var(--se-accent-soft); }
.se-block__handle:active { cursor: grabbing; }

.se-block__title {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--se-muted);
	flex: 1;
}

.se-block__del {
	border: none;
	background: transparent;
	color: #b9bfbb;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 8px;
	transition: color 0.15s ease, background 0.15s ease;
}
.se-block__del:hover { background: #fdecea; color: #d6453a; }

.se-block__text {
	width: 100%;
	border: none;
	padding: 16px;
	font-size: 1.0rem;
	line-height: 1.65;
	resize: vertical;
	min-height: 104px;
	font-family: inherit;
	color: var(--se-ink);
	background: transparent;
}
.se-block__text:focus { outline: none; }

.se-block__drop { margin: 14px; border-radius: var(--se-radius-sm); }
.se-block__preview { margin: 0 14px 14px; }

/* Add-Bar */
.se-news-addbar {
	display: flex;
	gap: 12px;
	margin: 16px 0 32px;
	flex-wrap: wrap;
}

.se-news-add {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 11px 18px;
	border: 1.5px solid var(--se-line);
	border-radius: 999px;
	background: var(--se-bg);
	color: var(--se-ink);
	font-size: 0.9rem;
	font-weight: 650;
	font-family: inherit;
	cursor: pointer;
	transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.05s ease;
}
.se-news-add span { color: var(--se-accent); font-size: 1.05rem; line-height: 1; }
.se-news-add:hover {
	border-color: var(--se-accent);
	background: var(--se-accent-soft);
}
.se-news-add:active { transform: translateY(1px); }

/* Submit */
.se-news-actions {
	margin-top: 14px;
	padding-top: 26px;
	border-top: 1px solid var(--se-line-2);
}

.se-news-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 34px;
	border: none;
	border-radius: 12px;
	background: var(--se-accent-grad);
	color: #fff;
	font-size: 1.02rem;
	font-weight: 700;
	font-family: inherit;
	letter-spacing: 0.01em;
	cursor: pointer;
	box-shadow: 0 12px 26px -12px rgba(83, 141, 23, 0.85);
	transition: transform 0.06s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.se-news-btn:hover { filter: brightness(1.05); box-shadow: 0 16px 30px -12px rgba(83, 141, 23, 0.95); }
.se-news-btn:active { transform: translateY(1px); }
.se-news-btn[disabled] { opacity: 0.65; cursor: not-allowed; box-shadow: none; }

/* Hinweise */
.se-news-notice {
	padding: 15px 18px;
	border-radius: var(--se-radius-sm);
	margin-bottom: 22px;
	font-size: 0.95rem;
	line-height: 1.5;
	border: 1px solid transparent;
}
.se-news-notice--success {
	background: var(--se-accent-soft);
	border-color: rgba(90, 178, 48, 0.35);
	color: #2f6b18;
}
.se-news-notice--error {
	background: #fdecea;
	border-color: #f5c2bd;
	color: #9b2c22;
}

.se-news-again a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	color: var(--se-accent-dark);
	text-decoration: none;
}
.se-news-again a:hover { text-decoration: underline; }

.se-news-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Vorschaltseite / Zugang (Gate) */
.se-news-gate { max-width: 460px; }
.se-news-gate .se-news-intro { margin-bottom: 22px; }
.se-news-gate .se-news-actions { margin-top: 6px; }
#se_gate_code {
	letter-spacing: 0.4em;
	font-size: 1.25rem;
	font-weight: 600;
	text-align: center;
}

/* Sprache der Maske (DE | EN | 中文) */
.se-news-uilang {
	display: flex;
	justify-content: flex-end;
	gap: 2px;
	margin: -8px 0 18px;
	font-size: 0.82rem;
}

.se-news-uilang__item {
	display: inline-block;
	padding: 5px 11px;
	border-radius: 999px;
	color: var(--se-muted);
	text-decoration: none;
	line-height: 1.3;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.se-news-uilang a.se-news-uilang__item:hover {
	color: var(--se-accent-dark);
	background: var(--se-accent-soft);
	text-decoration: none;
}

.se-news-uilang__item.is-active {
	color: var(--se-accent-dark);
	background: var(--se-accent-soft);
	font-weight: 600;
	cursor: default;
}

@media (max-width: 560px) {
	.se-news-wrap { padding: 24px 18px 28px; }
	.se-news-row { flex-direction: column; gap: 0; }
	.se-news-heading { font-size: 1.55rem; }
	.se-news-uilang { margin-top: -4px; }
}

/* Mehrfachauswahl (Beitragsländer) - gewählte Einträge als Zeilen, darunter Suche */
.se-multi { position: relative; }
.se-multi__chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
/* Ohne gewählte Einträge darf die Liste keinen Platz belegen, sonst sitzt das
   Feld tiefer als sein Nachbar in derselben Zeile. :empty scheitert hier,
   weil im Markup Zeilenumbrüche zwischen den <li> stehen. */
.se-multi__chips:has(li) { margin-bottom: 9px; }
.se-multi__chip {
	display: inline-flex; align-items: center; gap: 8px;
	margin: 0; padding: 6px 8px 6px 13px;
	background: #f1f4f2; border: 1px solid #e0e5e2; border-radius: 999px;
	font-size: .88rem; line-height: 1.2;
}
.se-multi__remove {
	background: none; border: 0; cursor: pointer; padding: 0 2px;
	font-size: 1.1rem; line-height: 1; color: #8b938e;
}
.se-multi__remove:hover { color: #b3261e; }

.se-multi__input { width: 100%; }
.se-multi__list {
	position: absolute; z-index: 30; left: 0; right: 0;
	max-height: 260px; overflow-y: auto;
	margin-top: 3px;
	background: #fff; border: 1px solid #e0e5e2; border-radius: 10px;
	box-shadow: 0 14px 34px -18px rgba(16,23,20,.5);
}
.se-multi__hit {
	display: block; width: 100%; text-align: left;
	padding: 9px 14px; border: 0; border-bottom: 1px solid #f2f4f3;
	background: none; cursor: pointer; font-size: .92rem; color: #0f1714;
}
.se-multi__hit:last-child { border-bottom: 0; }
.se-multi__hit:hover, .se-multi__hit.is-active { background: #f0f6ec; }
.se-multi__none { margin: 0; padding: 10px 14px; color: #8b938e; font-size: .86rem; }

/* Erklärung zum Sternchen an den Pflichtfeldern */
.se-news-required-note {
	margin: -8px 0 22px;
	font-size: 0.86rem;
	color: var(--se-muted, #7a827d);
}
.se-news-required-note::first-letter { color: var(--se-accent-dark); font-weight: 700; }
