/* =========================================================================
   Seminarplaner – Buttons, Event-Karte, Anmeldeformular, Erfolg, Spamschutz
   ========================================================================= */

/* --- Buttons / CTA --- */
.sp-button,
a.sp-button {
	display: inline-block;
	background: #81a80b;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
	border: 0;
	border-radius: 8px;
	padding: 0.85rem 1.6rem;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.05s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.sp-button:hover,
a.sp-button:hover { background: #6f9209; }
.sp-button:active { transform: translateY(1px); }
.sp-button-lg { font-size: 1.15rem; padding: 1rem 2rem; }

/* --- "Zurück zur Liste"-Link --- */
.sp-back { margin: 0 0 1rem; }
.sp-back a {
	display: inline-block;
	color: #6f9209;
	font-weight: 600;
	text-decoration: none;
}
.sp-back a:hover { text-decoration: underline; }
.sp-success-back { margin-top: 1.5rem; }

/* --- Event-Karte (Einzelseite) --- */
.sp-event {
	border: 1px solid #e6e6e6;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.sp-event-header {
	background: linear-gradient(135deg, #81a80b 0%, #91bd0d 100%);
	color: #fff;
	padding: 1.5rem 1.75rem;
}
.sp-event-title { margin: 0 0 1rem; color: #fff; }
.sp-event-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.sp-event-meta .sp-meta { display: flex; flex-direction: column; }
.sp-meta-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.85; }
.sp-meta-value { font-weight: 700; font-size: 1.05rem; }
.sp-event-info { padding: 1.5rem 1.75rem; }
.sp-event-info h3 { margin-top: 0; }
.sp-event-cta { padding: 0 1.75rem 1.75rem; text-align: center; }
.sp-cta-hint { margin: 0.6rem 0 0; color: #777; font-size: 0.9rem; }

/* --- Anmeldeformular --- */
.sp-form-wrap {
	max-width: 720px;
	margin: 0 auto;
	border: 1px solid #e6e6e6;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	overflow: hidden;
}
.sp-form-head {
	background: linear-gradient(135deg, #81a80b 0%, #91bd0d 100%);
	color: #fff;
	padding: 1.25rem 1.75rem;
}
.sp-form-title { margin: 0; color: #fff; }
.sp-form-sub { margin: 0.25rem 0 0; color: #fff; opacity: 0.95; }
.sp-form { padding: 1.5rem 1.75rem; }

.sp-form .row { margin: 0 0 1.1rem; }
.sp-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
	color: #333;
}
.sp-form input[type="text"],
.sp-form input[type="email"],
.sp-form input[type="tel"],
.sp-form input[type="number"],
.sp-form textarea,
.sp-form select {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid #cfcfcf;
	border-radius: 8px;
	font-size: 1rem;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sp-form input:focus,
.sp-form textarea:focus,
.sp-form select:focus {
	outline: none;
	border-color: #81a80b;
	box-shadow: 0 0 0 3px rgba(129, 168, 11, 0.18);
}
.sp-form input::placeholder,
.sp-form textarea::placeholder { color: #aaa; }
.sp-form .error { border-color: #d50000 !important; background: #fff6f6; }
.sp-form textarea { min-height: 80px; resize: vertical; }

/* Checkbox-Zeile (AGB) – Häkchen + Text nebeneinander */
.sp-form .row:has(input[type="checkbox"]) {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	background: #f6f7f0;
	border-radius: 8px;
	padding: 0.85rem 1rem;
}
.sp-form .row:has(input[type="checkbox"]) input[type="checkbox"] {
	width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; flex: 0 0 auto;
}
.sp-form .row:has(input[type="checkbox"]) label { margin: 0; font-weight: 400; }

/* Pflichtfeld-Hinweis (aus dem $fields-„info") */
.sp-form .info { color: #777; font-size: 0.9rem; margin: 0.25rem 0 1rem; }

.sp-submit-row { margin-top: 0.5rem; text-align: center; }

/* Fehlerbox */
.sp-errors:empty { display: none; }
.sp-errors {
	background: #fff3f3;
	border: 1px solid #f3c2c2;
	border-radius: 8px;
	padding: 0.9rem 1.1rem;
	margin-bottom: 1.25rem;
	color: #b00000;
}

/* Erfolgsmeldung */
.sp-success {
	text-align: center;
	max-width: 600px;
	margin: 0 auto;
	padding: 2rem 1.5rem;
	border: 1px solid #cfe6a8;
	border-radius: 12px;
	background: #f6fbef;
}
.sp-success-icon {
	width: 64px; height: 64px; line-height: 64px;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background: #81a80b;
	color: #fff;
	font-size: 2rem;
}
.sp-success h2 { margin: 0 0 0.5rem; }

/* Honeypot – für echte Besucher unsichtbar, von Bots gerne ausgefüllt */
.sp-hp {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	width: 1px; height: 1px;
	overflow: hidden;
}

/* Formular auf kleinen Bildschirmen */
@media (max-width: 600px) {
	.sp-form, .sp-event-info, .sp-event-cta { padding-left: 1.1rem; padding-right: 1.1rem; }
	.sp-event-header, .sp-form-head { padding-left: 1.1rem; padding-right: 1.1rem; }
	.sp-button-lg { display: block; width: 100%; box-sizing: border-box; }
}

/* Seminarplaner – Suche, Trefferanzahl & Reset-Link */
#seminar_list .seminar_count {
	margin: 0.25rem 0 1rem;
	font-weight: 600;
	color: #555;
}
#seminar_list .plz_reset {
	display: inline-block;
	margin-left: 0.75rem;
	font-size: 0.9em;
	text-decoration: underline;
}
#seminar_list .plz_input::placeholder {
	color: #999;
}

/* Seminarplaner – mobile Darstellung der Lehrgangsliste (Karten-Layout) */
@media (max-width: 680px) {
	#seminar_list { overflow: visible; }

	#seminar_list table,
	#seminar_list tbody,
	#seminar_list tr,
	#seminar_list td {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}

	/* Kopfzeile (erste Zeile mit <th>) auf Mobil ausblenden */
	#seminar_list table tr:first-child {
		display: none;
	}

	#seminar_list table tr {
		margin: 0 0 1rem 0;
		padding: 0.25rem 0.85rem;
		border: 1px solid #e5e5e5;
		border-radius: 6px;
		background: #fff;
	}

	#seminar_list table td {
		text-align: right;
		padding: 0.55rem 0;
		margin: 0;
		border: none;
		border-bottom: 1px solid #f0f0f0;
		position: relative;
		padding-left: 42%;
		min-height: 1.4em;
	}

	#seminar_list table td::before {
		content: attr(data-label);
		position: absolute;
		left: 0;
		width: 40%;
		text-align: left;
		font-weight: 700;
		color: #555;
	}

	#seminar_list table td.lastchild {
		text-align: center;
		padding-left: 0;
		border-bottom: 0;
	}

	#seminar_list table td.lastchild::before {
		content: "";
	}
}
