/* ============================================================
   E&R Kontakt-Freischaltung — Frontend-Styles

   Nutzt die CSS-Variablen des Themes (--accent, --muted, --line …)
   mit Fallback-Werten, damit das Plugin auch mit einem anderen
   Theme nicht kaputt aussieht.
   ============================================================ */

.er-cr-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1px;
	background: var(--line, #E6E4DC);
	border: 1px solid var(--line, #E6E4DC);
	max-width: 820px;
	margin-inline: auto;
}

.er-cr-grid .er-cr {
	background: var(--bg, #FBFAF6);
}

.er-cr {
	padding: clamp(30px, 4vw, 50px);
	text-align: center;
}

.er-cr__role {
	font-size: 0.72rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--faint, #A8A79E);
	margin-bottom: 8px;
}

.er-cr__name {
	font-size: 1.4rem;
	font-weight: 400;
	margin-bottom: 18px;
}

/* Variante für Fließtext (z. B. in der FAQ-Liste): links ausgerichtet,
   ohne Rahmenpolster, kleinere Schrift. Über class="er-cr--inline" am
   Shortcode. */
.er-cr--inline {
	padding: 0;
	text-align: left;
}

.er-cr--inline .er-cr__role {
	margin-bottom: 4px;
}

.er-cr--inline .er-cr__name {
	font-size: 1.05rem;
	margin-bottom: 10px;
}

.er-cr--inline .er-cr__btn {
	font-size: 0.7rem;
	padding: 9px 18px;
}

.er-cr--inline .er-cr__widget:not(:empty) {
	justify-content: flex-start;
}

.er-cr--inline .er-cr__out {
	margin-top: 10px;
}

/* ---------- Button ---------- */

.er-cr__btn {
	display: inline-block;
	font: inherit;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	padding: 12px 26px;
	cursor: pointer;
	color: var(--accent-dp, #4A6150);
	background: transparent;
	border: 1px solid var(--accent, #7D9B84);
	border-radius: 2px;
	transition: background 0.2s ease, color 0.2s ease;
}

.er-cr__btn:hover:not(:disabled),
.er-cr__btn:focus-visible {
	background: var(--accent, #7D9B84);
	color: #fff;
}

.er-cr__btn:focus-visible {
	outline: 2px solid var(--accent-dp, #4A6150);
	outline-offset: 3px;
}

.er-cr__btn:disabled {
	opacity: 0.55;
	cursor: progress;
}

/* ---------- Turnstile-Widget ---------- */

/* Im „interaction-only“-Modus bleibt der Container leer und soll dann
   auch keinen Abstand erzeugen. */
.er-cr__widget:not(:empty) {
	margin-top: 16px;
	display: flex;
	justify-content: center;
}

/* ---------- Ergebnis und Meldungen ---------- */

.er-cr__out {
	margin-top: 14px;
}

.er-cr__out:focus {
	outline: none;
}

.er-cr__line {
	margin-bottom: 4px;
}

.er-cr__label {
	display: block;
	font-size: 0.68rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--faint, #A8A79E);
	margin-bottom: 2px;
}

.er-cr__line a {
	color: var(--muted, #6E6D66);
	font-size: 0.98rem;
	transition: color 0.2s ease;
}

.er-cr__line a:hover,
.er-cr__line a:focus-visible {
	color: var(--accent-dp, #4A6150);
}

.er-cr__note,
.er-cr__msg {
	color: var(--muted, #6E6D66);
	font-size: 0.9rem;
	margin-top: 6px;
}

.er-cr__msg--error {
	color: #A4453C;
}

.er-cr__noscript a {
	color: var(--accent-dp, #4A6150);
	font-size: 0.9rem;
}

.er-cr-hint {
	color: #A4453C;
	font-size: 0.85rem;
}

/* Nur für Screenreader. */
.er-cr__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 620px) {
	.er-cr-grid {
		grid-template-columns: 1fr;
	}
}
