/**
 * Antidot Forms – Frontend-Styles.
 *
 * Optischer Stil: rahmenlose Felder mit kräftiger Unterlinie, fette Labels,
 * runder Outline-Button (Pill). Schriftart wird bewusst vom Theme geerbt.
 *
 * Alle Farben/Maße sind CSS-Variablen mit Fallback – ein Theme oder Kunde kann
 * sie ohne Eingriff ins Plugin überschreiben, z. B.:
 *   :root { --antidot-form-accent: #0b57d0; }
 * Ist der CSS-Schalter in den Einstellungen aus, wird diese Datei nicht geladen
 * und das Theme stylt die (stabilen) Klassen selbst.
 */

/* -------------------------------------------------------------------------
 * Grundgerüst
 * ---------------------------------------------------------------------- */

.antidot-form-wrap {
	width: 100%;
}

.antidot-form,
.antidot-form *,
.antidot-form *::before,
.antidot-form *::after {
	box-sizing: border-box;
}

.antidot-form {
	color: inherit;
	font: inherit;
}

/* -------------------------------------------------------------------------
 * Felder: Label + Unterlinie
 * ---------------------------------------------------------------------- */

.antidot-form__field {
	margin: 0 0 var(--antidot-form-gap, 2.25rem);
}

.antidot-form__label {
	display: block;
	margin: 0 0 var(--antidot-form-label-gap, 0.6rem);
	font-weight: 700;
	font-size: clamp(0.8125rem, 0.75rem + 0.3125vw, 1rem);
	line-height: 1.25;
	color: inherit;
}

/* Pflichtfeld-Stern: semantisch steckt „required" bereits im Markup.
   Zum Anzeigen die nächste Zeile entfernen. */
.antidot-form__req {
	display: none;
	margin-left: 0.15em;
	color: var(--antidot-form-accent, #2E0FDB);
}

.antidot-form__input {
	display: block;
	width: 100%;
	margin: 0;
	padding: var(--antidot-form-input-pad, 0.5rem 0);
	font: inherit;
	font-size: clamp(1rem, 0.9583rem + 0.2083vw, 1.125rem);
	color: inherit;
	background: transparent;
	border: 0;
	border-bottom: var(--antidot-form-line-width, 2px) solid var(--antidot-form-line, #111111);
	border-radius: 0;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.antidot-form__input::placeholder {
	color: var(--antidot-form-placeholder, #9a9a9a);
	opacity: 1;
}

.antidot-form__input:focus {
	outline: 0!important;
	border-bottom-color: var(--antidot-form-accent, #2E0FDB);
}

/* Autofill-Kasten der Browser für den rahmenlosen Look neutralisieren. */
.antidot-form__input:-webkit-autofill,
.antidot-form__input:-webkit-autofill:focus {
	-webkit-text-fill-color: inherit;
	transition: background-color 100000s ease-in-out 0s;
}

.antidot-form__textarea {
	min-height: var(--antidot-form-textarea-min, 8rem);
	line-height: 1.5;
	resize: vertical;
}

/* -------------------------------------------------------------------------
 * Datei-Upload
 * ---------------------------------------------------------------------- */

.antidot-form__file {
	display: block;
	width: 100%;
	font: inherit;
	color: inherit;
	padding: 0.5rem 0;
	font-size: clamp(0.8125rem, 0.75rem + 0.3125vw, 1rem);
}

.antidot-form__file::file-selector-button {
	margin-right: 0.75rem;
	padding: 0.2rem .75rem;
	font: inherit;
	font-weight: 500;
	font-size: clamp(0.8125rem, 0.75rem + 0.3125vw, 1rem);
	background: var(--antidot-form-accent, #2E0FDB);
	color:#FFF;
	border: 1px solid var(--antidot-form-accent, #2E0FDB);
	border-radius: 999px;
	cursor: pointer;
}
.antidot-form__file:focus {
	outline: 0!important;
}


/* -------------------------------------------------------------------------
 * Einwilligung (Checkbox)
 * ---------------------------------------------------------------------- */

.antidot-form__field--consent {
	margin-bottom: var(--antidot-form-gap, 2.25rem);
}

.antidot-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-weight: 400;
	line-height: 1.4;
	font-size: clamp(0.8125rem, 0.75rem + 0.3125vw, 1rem);
	cursor: pointer;
}

.antidot-form__consent input[type="checkbox"] {
	flex: 0 0 auto;
	width: 1.15rem;
	height: 1.15rem;
	margin: 0.1rem 0 0;
	accent-color: var(--antidot-form-accent, #2E0FDB);
}
.antidot-form__consent input[type="checkbox"]:focus {
	outline: 0!important;
}

/* -------------------------------------------------------------------------
 * Fehlerzustände
 * ---------------------------------------------------------------------- */

.antidot-form__field.is-error .antidot-form__input,
.antidot-form__field.is-error .antidot-form__file {
	border-bottom-color: var(--antidot-form-error, #d61f1f);
}

.antidot-form__error {
	margin: 0.4rem 0 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--antidot-form-error, #d61f1f);
}

/* Globaler Hinweis (z. B. „Sitzung abgelaufen"). */
.antidot-form__notice {
	font-weight: 600;
	color: var(--antidot-form-error, #d61f1f);
}

/* -------------------------------------------------------------------------
 * Erfolgsmeldung (nur formatierter Text – keine Box)
 * ---------------------------------------------------------------------- */

.antidot-form__message-title {
	margin: 0 0 0.5rem;
}

.antidot-form__message-text {
	margin: 0;
	line-height: 1.5;
}

/* -------------------------------------------------------------------------
 * Aktionen + Senden-Button (Outline-Pill)
 * ---------------------------------------------------------------------- */

.antidot-form__actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 0.5rem;
}

.antidot-form__submit {
	display: inline-block;
	padding: var(--antidot-form-btn-pad, 0.85rem 2.5rem);
	font: inherit;
	font-weight: 700;
	font-size: var(--antidot-form-btn-size, 1.125rem);
	line-height: 1;
	color: var(--antidot-form-accent, #2E0FDB);
	background: transparent;
	border: 1px solid var(--antidot-form-accent, #2E0FDB);
	border-radius: 999px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.antidot-form__submit:hover,
.antidot-form__submit:focus-visible {
	color: var(--antidot-form-btn-hover-text, #ffffff);
	background: var(--antidot-form-accent, #2E0FDB);
	outline: 0!important;
}

.antidot-form__submit:disabled,
.antidot-form__submit.is-disabled,
.antidot-form__submit[aria-disabled="true"] {
	background: #DFDFDF;
	border-color: #DFDFDF;
	color: #595959;
	cursor: not-allowed;
}

/* Im gesperrten Zustand keinen „Fill"-Hover vortäuschen. */
.antidot-form__submit.is-disabled:hover,
.antidot-form__submit[aria-disabled="true"]:hover {
	background: #DFDFDF;
	border-color: #DFDFDF;
	color: #595959;
}

/* -------------------------------------------------------------------------
 * Honeypot: für Menschen unsichtbar, aber nicht display:none (Bots meiden das).
 * ---------------------------------------------------------------------- */

.antidot-form__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* -------------------------------------------------------------------------
 * Klein / mobil
 * ---------------------------------------------------------------------- */

@media (max-width: 480px) {
	.antidot-form__actions {
		justify-content: stretch;
	}

	.antidot-form__submit {
		width: 100%;
		text-align: center;
	}
}

/* -------------------------------------------------------------------------
 * Hinweis hinter Labels (z. B. Upload-Format/-Größe) + Sende-Zustand
 * ---------------------------------------------------------------------- */

.antidot-form__hint {
	margin-left: 0.4em;
	font-weight: 400;
	font-size: 0.85em;
	color: var(--antidot-form-placeholder, #9a9a9a);
}

.antidot-form__submit.is-sending {
	cursor: progress;
}
