/*
 * MP Ersttermin – Frontend
 * Schrift und Textfarbe kommen vom Theme. Eigene Farben nur über CSS-Variablen.
 * Akzentfarbe: Einstellung im Plugin, sonst Avada-Primärfarbe, sonst Fallback.
 */
.mp-et {
	--mp-et-accent: var(--primary_color, #1d5a8c);
	--mp-et-accent-contrast: #ffffff;
	--mp-et-border: rgba(0, 0, 0, 0.28);
	--mp-et-muted: inherit;
	--mp-et-error: #b3261e;
	--mp-et-success: #1e6b34;
	--mp-et-radius: 6px;
	--mp-et-gap: 0.75rem;
	--mp-et-focus: 3px solid var(--mp-et-accent);

	font: inherit;
	color: inherit;
	max-width: 46rem;
}

.mp-et *,
.mp-et *::before,
.mp-et *::after {
	box-sizing: border-box;
}

.mp-et [hidden] {
	display: none !important;
}

.mp-et p {
	margin: 0 0 var(--mp-et-gap);
}

.mp-et__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Termine ---------- */

.mp-et__day {
	margin: 0 0 1.25rem;
}

.mp-et__day-label {
	font-weight: 700;
	margin-bottom: 0.5rem !important;
}

.mp-et__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.5rem;
}

.mp-et__list li {
	margin: 0;
	padding: 0;
}

.mp-et__list li::before {
	content: none;
}

.mp-et .mp-et__slot,
.mp-et .mp-et__more,
.mp-et .mp-et__submit {
	font: inherit;
	line-height: 1.3;
	min-height: 44px;
	padding: 0.65rem 1rem;
	border-radius: var(--mp-et-radius);
	cursor: pointer;
	text-align: center;
	width: 100%;
	margin: 0;
	letter-spacing: normal;
	text-transform: none;
}

.mp-et .mp-et__slot {
	background: transparent;
	color: inherit;
	border: 2px solid var(--mp-et-accent);
}

.mp-et .mp-et__slot:hover {
	background: var(--mp-et-accent);
	color: var(--mp-et-accent-contrast);
}

.mp-et .mp-et__more {
	background: transparent;
	color: inherit;
	border: 1px solid var(--mp-et-border);
}

.mp-et .mp-et__more:hover {
	border-color: currentColor;
}

.mp-et .mp-et__submit {
	background: var(--mp-et-accent);
	color: var(--mp-et-accent-contrast);
	border: 2px solid var(--mp-et-accent);
	font-weight: 700;
}

.mp-et .mp-et__submit:hover {
	filter: brightness(0.92);
}

.mp-et button:disabled {
	opacity: 0.6;
	cursor: progress;
}

.mp-et button:focus-visible,
.mp-et a:focus-visible,
.mp-et input:focus-visible,
.mp-et textarea:focus-visible,
.mp-et [tabindex="-1"]:focus-visible {
	outline: var(--mp-et-focus);
	outline-offset: 2px;
}

.mp-et [tabindex="-1"]:focus:not(:focus-visible) {
	outline: none;
}

/* ---------- Gewählter Termin ---------- */

.mp-et__chosen {
	border-left: 4px solid var(--mp-et-accent);
	padding: 0.75rem 1rem;
	margin: 0 0 1.25rem;
	background: rgba(127, 127, 127, 0.08);
	border-radius: 0 var(--mp-et-radius) var(--mp-et-radius) 0;
}

.mp-et__chosen-label {
	font-size: 0.875em;
	margin-bottom: 0.25rem !important;
}

.mp-et__chosen-value {
	font-weight: 700;
	margin-bottom: 0.25rem !important;
}

.mp-et .mp-et__link {
	font: inherit;
	background: none;
	border: 0;
	padding: 0.25rem 0;
	min-height: 44px;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* ---------- Formular ---------- */

.mp-et__row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 var(--mp-et-gap);
}

.mp-et__field {
	margin: 0 0 1rem;
}

.mp-et__field label {
	display: block;
	font-weight: 600;
	margin: 0 0 0.3rem;
}

.mp-et__optional {
	font-weight: 400;
}

.mp-et .mp-et__field input[type="text"],
.mp-et .mp-et__field input[type="email"],
.mp-et .mp-et__field input[type="tel"],
.mp-et .mp-et__field textarea {
	display: block;
	width: 100%;
	font: inherit;
	color: inherit;
	background: transparent;
	min-height: 44px;
	padding: 0.55rem 0.75rem;
	border: 1px solid var(--mp-et-border);
	border-radius: var(--mp-et-radius);
	margin: 0;
}

.mp-et .mp-et__field textarea {
	min-height: 7rem;
	resize: vertical;
}

.mp-et .mp-et__field [aria-invalid="true"] {
	border-color: var(--mp-et-error);
	border-width: 2px;
}

.mp-et__field--check {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.6rem;
	align-items: start;
}

.mp-et__field--check input {
	width: 1.35rem;
	height: 1.35rem;
	margin: 0.15rem 0 0;
	accent-color: var(--mp-et-accent);
}

.mp-et__field--check label {
	font-weight: 400;
}

.mp-et__field--check .mp-et__error {
	grid-column: 1 / -1;
}

.mp-et__count,
.mp-et__hint {
	font-size: 0.875em;
	margin: 0.3rem 0 0 !important;
}

.mp-et__hint {
	margin: 0 0 1rem !important;
}

.mp-et__error {
	color: var(--mp-et-error);
	font-weight: 600;
	font-size: 0.925em;
	margin: 0.3rem 0 0 !important;
}

.mp-et__errors {
	border: 2px solid var(--mp-et-error);
	border-radius: var(--mp-et-radius);
	padding: 0.75rem 1rem;
	margin: 0 0 1rem;
}

.mp-et__errors p {
	font-weight: 700;
	margin: 0 0 0.25rem;
}

.mp-et__errors ul {
	margin: 0;
	padding-left: 1.2rem;
}

.mp-et__errors a {
	color: inherit;
}

/* Honeypot: für Menschen unsichtbar, für Screenreader ausgeblendet. */
.mp-et__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Meldungen ---------- */

.mp-et__notice {
	border: 1px solid var(--mp-et-border);
	border-radius: var(--mp-et-radius);
	padding: 0.75rem 1rem;
}

.mp-et__done {
	border: 2px solid var(--mp-et-success);
	border-radius: var(--mp-et-radius);
	padding: 1rem 1.25rem;
}

.mp-et__done-title {
	font-weight: 700;
	font-size: 1.15em;
}

.mp-et__phone {
	margin-top: 1rem !important;
}

/* ---------- Größere Bildschirme ---------- */

@media (min-width: 600px) {
	.mp-et__list {
		grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
	}

	.mp-et__row {
		grid-template-columns: 1fr 1fr;
	}

	.mp-et__row--zip {
		grid-template-columns: 8rem 1fr;
	}

	.mp-et .mp-et__more,
	.mp-et .mp-et__submit {
		width: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mp-et * {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
