/* KFZ-Technik-Brockmann Terminbuchung — nur die Buchungs-Card, gescoped mit .ktb-.
   Farben kommen als CSS-Variablen aus den Plugin-Einstellungen (Default = Elementor-Kit).
   Schrift wird bewusst geerbt (DM Sans vom Theme).

   Selektoren sind bewusst mit ".ktb "-Präfix verschachtelt und Buttons tragen
   !important auf Farbe/Hintergrund: das Elementor-Kit stylt button/label/h2
   global und würde sonst durchschlagen (grüner "Zurücksetzen"-Button etc.). */

.ktb {
	--ktb-primary: #23A455;
	--ktb-accent: #145B2F;
	--ktb-ink: #111111;
	--ktb-muted: #737271;
	--ktb-line: #e0e5e2;
	--ktb-soft: #F8F7F7;
	--ktb-white: #ffffff;
	color: var(--ktb-ink);
	font-family: inherit;
	line-height: 1.5;
}

.ktb * { box-sizing: border-box; }

.ktb .ktb-form,
.ktb .ktb-success {
	background: var(--ktb-white);
	border-radius: 20px;
	box-shadow: 0 18px 55px rgba(17, 46, 30, 0.10);
	padding: clamp(24px, 4vw, 44px);
	margin: 0;
}

.ktb .ktb-hidden { display: none !important; }
.ktb .ktb-hp { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }

/* --- Abschnitte: eine klare vertikale Rhythmik --- */
.ktb h2.ktb-section-title {
	font-size: 22px;
	font-weight: 800;
	line-height: 1.25;
	color: var(--ktb-accent);
	margin: 0 0 4px;
	padding: 0;
}
.ktb .ktb-hint { color: var(--ktb-muted); margin: 0 0 20px; font-size: 14px; }
.ktb hr.ktb-hr { border: 0; border-top: 1px solid var(--ktb-line); margin: 36px 0 28px; height: 0; background: none; }
.ktb .ktb-required { color: #b12d2d; }

/* --- Leistungs-Kacheln --- */
.ktb .ktb-service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 28px; }
.ktb .ktb-service { position: relative; }
.ktb .ktb-service input { position: absolute; opacity: 0; margin: 0; }
.ktb .ktb-service label {
	display: block; border: 1px solid var(--ktb-line); border-radius: 12px;
	padding: 14px 16px; background: var(--ktb-white); cursor: pointer; height: 100%;
	margin: 0; font-weight: 400;
}
.ktb .ktb-service input:checked + label { border-color: var(--ktb-primary); background: #f0f9f3; box-shadow: inset 0 0 0 1px var(--ktb-primary); }
.ktb .ktb-service input:focus-visible + label { outline: 2px solid var(--ktb-primary); outline-offset: 2px; }
.ktb .ktb-service strong { display: block; color: var(--ktb-accent); font-size: 14px; line-height: 1.3; }
.ktb .ktb-service span { display: block; color: var(--ktb-muted); font-size: 12px; margin-top: 3px; }

/* --- Terminwahl --- */
.ktb .ktb-availability { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; align-items: start; }
.ktb .ktb-slots { min-height: 118px; border: 1px dashed #c8d5cc; border-radius: 12px; padding: 14px; background: #fbfcfb; }
.ktb .ktb-slot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ktb button.ktb-slot {
	appearance: none; -webkit-appearance: none;
	border: 1px solid var(--ktb-line) !important; background: var(--ktb-white) !important;
	color: var(--ktb-ink) !important; border-radius: 9px !important;
	padding: 8px 12px !important; margin: 0; cursor: pointer;
	font-family: inherit; font-weight: 700; font-size: 13px; line-height: 1.3;
	text-transform: none; box-shadow: none;
}
.ktb button.ktb-slot.ktb-selected { background: var(--ktb-primary) !important; border-color: var(--ktb-primary) !important; color: #fff !important; }
.ktb button.ktb-slot:disabled { background: #eff1ef !important; color: #97a29a !important; border-color: #e4e8e5 !important; cursor: not-allowed; text-decoration: line-through; }
.ktb .ktb-empty { color: var(--ktb-muted); font-size: 13px; margin: 2px 0 0; }

/* --- Formularfelder --- */
.ktb .ktb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.ktb .ktb-field { display: flex; flex-direction: column; gap: 6px; }
.ktb .ktb-field.ktb-full { grid-column: 1 / -1; }
.ktb .ktb-field label { font-weight: 700; font-size: 13px; line-height: 1.3; margin: 0; padding: 0; color: var(--ktb-ink); }
.ktb .ktb-form input[type="text"],
.ktb .ktb-form input[type="tel"],
.ktb .ktb-form input[type="email"],
.ktb .ktb-form input[type="date"],
.ktb .ktb-form input:not([type]) {
	width: 100%; min-height: 46px; font: inherit; font-size: 15px;
	border: 1px solid var(--ktb-line); border-radius: 10px;
	padding: 10px 14px; margin: 0; background: #fbfcfb; color: var(--ktb-ink); outline: none;
	box-shadow: none;
}
.ktb .ktb-form input:focus { border-color: var(--ktb-primary); box-shadow: 0 0 0 3px rgba(35, 164, 85, 0.15); }
.ktb .ktb-form input[type="file"] {
	width: 100%; font: inherit; font-size: 14px; border: 1px solid var(--ktb-line);
	border-radius: 10px; padding: 10px; margin: 0; background: #fbfcfb;
}
.ktb .ktb-filehint { color: var(--ktb-muted); font-size: 12px; }

/* --- HU/AU-Hinweis --- */
.ktb .ktb-notice { border-radius: 12px; padding: 14px 16px; background: #eef7ee; color: #23532f; font-size: 13px; margin: 20px 0 0; }
.ktb .ktb-radio-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ktb label.ktb-radio {
	display: flex; align-items: center; gap: 8px; border: 1px solid var(--ktb-line);
	border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 13px;
	background: #fff; margin: 0; cursor: pointer;
}
.ktb label.ktb-radio input { width: auto; margin: 0; }

/* --- Einwilligung, Fehler, Aktionen --- */
.ktb label.ktb-check {
	display: flex; gap: 10px; align-items: flex-start;
	font-size: 13px; font-weight: 400; line-height: 1.5; color: #44534d;
	margin: 26px 0 0; cursor: pointer;
}
.ktb label.ktb-check input { width: auto; margin: 3px 0 0; flex: none; }
.ktb label.ktb-check span { font-weight: 400; }
.ktb .ktb-errorbox { border-radius: 12px; padding: 13px 15px; background: #fbeeee; color: #a52c2c; font-size: 14px; margin: 20px 0 0; }

.ktb .ktb-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.ktb button.ktb-btn {
	appearance: none; -webkit-appearance: none;
	border: 0 !important; border-radius: 999px !important;
	padding: 14px 26px !important; margin: 0;
	font-family: inherit; font-weight: 800; font-size: 15px; line-height: 1.2;
	cursor: pointer; text-transform: none; letter-spacing: 0; box-shadow: none;
	transition: background 0.15s ease;
}
.ktb button.ktb-btn-primary { background: var(--ktb-primary) !important; color: #fff !important; }
.ktb button.ktb-btn-primary:hover { background: var(--ktb-accent) !important; }
.ktb button.ktb-btn-primary:disabled { opacity: 0.6; cursor: wait; }
.ktb button.ktb-btn-secondary { background: var(--ktb-soft) !important; color: var(--ktb-accent) !important; }
.ktb button.ktb-btn-secondary:hover { background: #ecefec !important; }

/* --- Erfolgsansicht --- */
.ktb .ktb-success { text-align: center; padding: 48px 24px; }
.ktb .ktb-success-icon { font-size: 42px; color: var(--ktb-primary); }
.ktb .ktb-success h2 { color: var(--ktb-accent); font-size: 28px; margin: 10px 0 6px; }
.ktb .ktb-success p { color: var(--ktb-muted); margin: 0; }

@media (max-width: 700px) {
	.ktb .ktb-form, .ktb .ktb-success { padding: 20px 16px; border-radius: 16px; }
	.ktb .ktb-grid, .ktb .ktb-availability { grid-template-columns: 1fr; gap: 16px; }
	.ktb .ktb-service-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
	.ktb hr.ktb-hr { margin: 28px 0 22px; }
	.ktb .ktb-actions { flex-direction: column-reverse; margin-top: 24px; }
	.ktb button.ktb-btn { width: 100%; }
}
