/**
 * Frontend-Styles: SlotPress
 * Design: clean, warm, modern – passend zu Wunderwerk Mensch
 * Author: herzigkev.in
 */

/* ── Custom Properties ────────────────────────────────────────────────────── */
.termin-booking-wrap {
	--termin-accent:      #7c3aed;   /* Violett – Spiritualität / Energie */
	--termin-accent-light:#f5f3ff;
	--termin-accent-mid:  #ddd6fe;
	--termin-btn-bg:      var(--termin-accent); /* überschreibbar per Backend */
	--termin-btn-text:    #ffffff;
	--termin-success:     #059669;
	--termin-success-bg:  #ecfdf5;
	--termin-error:       #dc2626;
	--termin-error-bg:    #fef2f2;
	--termin-text:        #1c1917;
	--termin-muted:       #78716c;
	--termin-border:      #e7e5e4;
	--termin-radius:      12px;
	--termin-shadow:      0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
.termin-booking-wrap *,
.termin-booking-wrap *::before,
.termin-booking-wrap *::after {
	box-sizing: border-box;
}

/* Neutralisiert Theme/Elementor-Overrides – ID-Selektor schlägt .elementor-section .widget button */
#termin-booking button,
#termin-booking [type="button"],
#termin-booking [type="submit"] {
	-webkit-appearance: none !important;
	appearance: none !important;
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 0;
	margin: 0;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	cursor: pointer;
	color: inherit;
	text-transform: none;
	letter-spacing: normal;
}

.termin-booking-wrap {
	width: 100%;
	max-width: 660px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--termin-text);
}

.termin-main-title {
	text-align: center;
	margin-bottom: 28px;
}

/* ── Fortschritts-Indikator ───────────────────────────────────────────────── */
.termin-progress {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin-bottom: 32px;
}

.termin-progress-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	position: relative;
}

.termin-progress-step:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 14px;
	left: calc(50% + 14px);
	width: calc(100% - 4px);
	height: 2px;
	background: var(--termin-border);
	z-index: 0;
}

.termin-progress-step.is-done:not(:last-child)::after,
.termin-progress-step.is-active:not(:last-child)::after {
	background: var(--termin-accent-mid);
}

.termin-progress-dot {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--termin-border);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: .75rem;
	font-weight: 700;
	color: var(--termin-muted);
	position: relative;
	z-index: 1;
	transition: background .2s, border-color .2s, color .2s;
}

.termin-progress-step.is-done .termin-progress-dot {
	background: var(--termin-accent);
	border-color: var(--termin-accent);
	color: #fff;
}

.termin-progress-step.is-active .termin-progress-dot {
	background: var(--termin-accent-light);
	border-color: var(--termin-accent);
	color: var(--termin-accent);
	box-shadow: 0 0 0 4px var(--termin-accent-mid);
}

.termin-progress-label {
	font-size: .7rem;
	color: var(--termin-muted);
	white-space: nowrap;
	font-weight: 500;
}

.termin-progress-step.is-active .termin-progress-label {
	color: var(--termin-accent);
	font-weight: 700;
}

.termin-progress-wrap {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	margin-bottom: 32px;
}

/* ── Schritte ─────────────────────────────────────────────────────────────── */
.termin-step {
	animation: termin-fadein .25s ease both;
}

.termin-step-hidden {
	display: none !important;
}

@keyframes termin-fadein {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.termin-step-title {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 20px;
	color: var(--termin-text);
}

/* ── Sitzungs-Karten ──────────────────────────────────────────────────────── */
.termin-sessions {
	display: grid;
	gap: 12px;
}

#termin-booking .termin-session-btn {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto auto;
	align-items: start;
	gap: 4px 12px;
	width: 100%;
	padding: 16px 18px;
	background: #fff !important;
	border: 2px solid var(--termin-border) !important;
	border-radius: var(--termin-radius) !important;
	cursor: pointer;
	text-align: left;
	transition: border-color .18s, box-shadow .18s, background .18s;
	box-shadow: var(--termin-shadow) !important;
}

#termin-booking .termin-session-btn:hover {
	border-color: var(--termin-accent) !important;
	background: var(--termin-accent-light) !important;
	box-shadow: 0 2px 8px rgba(0,0,0,.12) !important;
}

#termin-booking .termin-session-btn.termin-selected {
	border-color: var(--termin-accent) !important;
	background: var(--termin-accent-light) !important;
	box-shadow: 0 0 0 4px var(--termin-accent-mid) !important;
}

.termin-session-name {
	font-weight: 700;
	font-size: .95rem;
	grid-column: 1;
	grid-row: 1;
	color: var(--termin-text);
}

.termin-session-desc {
	font-size: .82rem;
	color: var(--termin-muted);
	line-height: 1.5;
	grid-column: 1;
	grid-row: 2;
}

.termin-session-price {
	grid-column: 2;
	grid-row: 1 / 3;
	align-self: center;
	background: var(--termin-accent);
	color: #fff;
	font-weight: 700;
	font-size: .85rem;
	padding: 4px 12px;
	border-radius: 20px;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ── Info-Banner (Vorselektion / Datum) ───────────────────────────────────── */
.termin-selected-info {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--termin-accent-light);
	border: 1px solid var(--termin-accent-mid);
	border-radius: 8px;
	padding: 10px 14px;
	font-size: .9rem;
	font-weight: 600;
	color: var(--termin-accent);
	margin-bottom: 20px;
}

.termin-selected-info::before {
	content: '✓';
	width: 20px;
	height: 20px;
	background: var(--termin-accent);
	color: #fff;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: .7rem;
	flex-shrink: 0;
}

/* ── Vorselektion-Badge ───────────────────────────────────────────────────── */
.termin-preselect-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--termin-accent-light);
	border: 2px solid var(--termin-accent);
	border-radius: 8px;
	padding: 10px 16px;
	font-weight: 700;
	color: var(--termin-accent);
	margin-bottom: 20px;
}

.termin-preselect-badge::before {
	content: '✓';
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	background: var(--termin-accent);
	color: #fff;
	border-radius: 50%;
	font-size: .7rem;
	flex-shrink: 0;
}

/* ── Kalender ─────────────────────────────────────────────────────────────── */
.termin-calendar-wrap {
	margin-bottom: 20px;
}

/* Flatpickr inline */
.flatpickr-calendar.inline {
	margin-bottom: 20px;
	border-radius: 12px !important;
	box-shadow: var(--termin-shadow) !important;
	border: 1px solid var(--termin-border) !important;
	overflow: hidden;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
	background: var(--termin-accent) !important;
	border-color: var(--termin-accent) !important;
}

.flatpickr-day:hover {
	background: var(--termin-accent-light) !important;
}

/* ── Zeitslots ────────────────────────────────────────────────────────────── */
.termin-slots-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 20px;
}

#termin-booking .termin-slot-btn {
	padding: 11px 20px;
	background: #fff !important;
	border: 2px solid var(--termin-border) !important;
	border-radius: 8px !important;
	font-size: .9rem;
	font-weight: 700;
	cursor: pointer;
	transition: border-color .18s, background .18s, box-shadow .18s;
	font-variant-numeric: tabular-nums;
	color: var(--termin-text) !important;
	box-shadow: var(--termin-shadow) !important;
}

#termin-booking .termin-slot-btn:hover {
	border-color: var(--termin-accent) !important;
	background: var(--termin-accent-light) !important;
}

#termin-booking .termin-slot-btn.termin-selected {
	border-color: var(--termin-accent) !important;
	background: var(--termin-accent-light) !important;
	color: var(--termin-accent) !important;
	box-shadow: 0 0 0 3px var(--termin-accent-mid) !important;
}

/* ── Buchungs-Zusammenfassung ─────────────────────────────────────────────── */
.termin-booking-summary {
	background: var(--termin-accent-light);
	border: 1px solid var(--termin-accent-mid);
	border-radius: 10px;
	padding: 14px 18px;
	margin-bottom: 22px;
	font-size: .9rem;
	color: var(--termin-accent);
}

.termin-booking-summary p {
	margin: 0;
	font-weight: 600;
}

/* ── Formular ─────────────────────────────────────────────────────────────── */
.termin-form-group {
	margin-bottom: 18px;
}

.termin-form-group label {
	display: block;
	font-weight: 700;
	margin-bottom: 6px;
	font-size: .9rem;
	color: var(--termin-text);
}

.termin-form-group abbr {
	text-decoration: none;
	color: var(--termin-error);
}

.termin-form-group input {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid var(--termin-border);
	border-radius: 10px;
	font-size: 1rem;
	background: #fff;
	color: var(--termin-text);
	transition: border-color .18s, box-shadow .18s;
	-webkit-appearance: none;
}

.termin-form-group input:focus {
	outline: none;
	border-color: var(--termin-accent);
	box-shadow: 0 0 0 4px var(--termin-accent-mid);
}

/* ── Fehler ───────────────────────────────────────────────────────────────── */
.termin-form-error {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--termin-error-bg);
	border: 1px solid #fca5a5;
	border-radius: 8px;
	padding: 12px 16px;
	color: var(--termin-error);
	font-size: .9rem;
	margin-bottom: 16px;
}

.termin-form-error::before {
	content: '!';
	width: 20px;
	height: 20px;
	background: var(--termin-error);
	color: #fff;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	font-size: .75rem;
	flex-shrink: 0;
}

/* ── Absenden-Button ──────────────────────────────────────────────────────── */
#termin-booking .termin-submit-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 14px 24px;
	background: var(--termin-btn-bg) !important;
	color: var(--termin-btn-text) !important;
	border: none !important;
	border-radius: var(--termin-radius) !important;
	box-shadow: 0 2px 8px rgba(0,0,0,.2) !important;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: background .18s, transform .1s, box-shadow .18s, filter .18s;
	letter-spacing: .01em;
}

#termin-booking .termin-submit-btn:hover:not(:disabled) {
	filter: brightness(.9);
	box-shadow: 0 4px 16px rgba(0,0,0,.28) !important;
}

#termin-booking .termin-submit-btn:active:not(:disabled) {
	transform: scale(.98);
}

#termin-booking .termin-submit-btn:disabled {
	opacity: .6;
	cursor: not-allowed;
}

.termin-btn-spinner {
	display: inline-block;
	width: 17px;
	height: 17px;
	border: 2px solid rgba(255,255,255,.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: termin-spin .7s linear infinite;
}

@keyframes termin-spin { to { transform: rotate(360deg); } }

/* ── Zurück-Button ────────────────────────────────────────────────────────── */
#termin-booking .termin-back-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 12px;
	padding: 6px 0;
	background: none !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--termin-muted) !important;
	font-size: .87rem;
	cursor: pointer;
	transition: color .15s;
}

#termin-booking .termin-back-btn:hover {
	color: var(--termin-accent) !important;
}

/* ── DOI-Ausstehend-Screen (Schritt 5 pending) ────────────────────────────── */
.termin-doi-pending {
	text-align: center;
	padding: 36px 24px;
	background: var(--termin-accent-light);
	border: 1px solid var(--termin-accent-mid);
	border-radius: var(--termin-radius);
}

.termin-doi-pending-icon {
	font-size: 3rem;
	margin-bottom: 16px;
	line-height: 1;
}

.termin-doi-pending h3 {
	color: var(--termin-accent);
	margin: 0 0 12px;
	font-size: 1.25rem;
}

.termin-doi-pending-msg {
	color: var(--termin-accent);
	line-height: 1.6;
	margin: 0 0 16px;
	font-size: .95rem;
}

.termin-doi-steps {
	display: grid;
	gap: 8px;
	text-align: left;
	background: #fff;
	border-radius: 8px;
	padding: 14px 16px;
	margin-bottom: 16px;
}

.termin-doi-step {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: .88rem;
	color: var(--termin-text);
}

.termin-doi-step-num {
	width: 22px;
	height: 22px;
	background: var(--termin-accent);
	color: #fff;
	border-radius: 50%;
	font-size: .7rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.termin-payment-notice {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #fefce8;
	border: 1px solid #fde047;
	border-radius: 6px;
	padding: 8px 14px;
	font-size: .85rem;
	color: #713f12;
}

/* ── Hilfstexte ───────────────────────────────────────────────────────────── */
.termin-loading {
	color: var(--termin-muted);
	font-style: italic;
	font-size: .9rem;
}

.termin-notice {
	padding: 12px 16px;
	background: #fef3c7;
	border: 1px solid #fcd34d;
	border-radius: 8px;
	color: #92400e;
	font-size: .9rem;
}

/* ── DOI-Bestätigungsseite [termin_doi_result] ────────────────────────────── */
.termin-doi-result-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40vh;
	padding: 48px 20px;
}

.termin-doi-result-card {
	max-width: 520px;
	width: 100%;
	border-radius: 16px;
	padding: 44px 40px;
	text-align: center;
	box-shadow: 0 4px 32px rgba(0,0,0,.10);
}

.termin-doi-result-icon {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	font-size: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
}

.termin-doi-result-card h2 {
	font-size: 1.5rem;
	margin: 0 0 12px;
}

.termin-doi-result-card p {
	margin: 0 0 10px;
	line-height: 1.6;
	color: #4b5563;
}

.termin-doi-result-table {
	width: 100%;
	border-collapse: collapse;
	margin: 20px 0;
	text-align: left;
}

.termin-doi-result-table td {
	padding: 8px 10px;
	border-bottom: 1px solid #e5e7eb;
	font-size: .9rem;
}

.termin-doi-result-table td:first-child {
	font-weight: 700;
	color: #374151;
	width: 40%;
}

.termin-doi-result-payment {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #fefce8;
	border: 1px solid #fde047;
	border-radius: 6px;
	padding: 8px 16px;
	font-size: .9rem;
	color: #713f12;
	margin-bottom: 20px;
}

.termin-doi-result-btn {
	display: inline-block;
	margin-top: 16px;
	padding: 10px 24px;
	background: #2563eb;
	color: #fff !important;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 700;
	font-size: .95rem;
}

.termin-doi-result-btn:hover {
	background: #1d4ed8;
	color: #fff !important;
}

.termin-doi-result-success {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
}

.termin-doi-result-success .termin-doi-result-icon {
	background: #16a34a;
	color: #fff;
}

.termin-doi-result-success h2 { color: #166534; }

.termin-doi-result-already {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
}

.termin-doi-result-already .termin-doi-result-icon {
	background: #2563eb;
	color: #fff;
}

.termin-doi-result-already h2 { color: #1e40af; }

.termin-doi-result-error {
	background: #fff5f5;
	border: 1px solid #fecaca;
}

.termin-doi-result-error .termin-doi-result-icon {
	background: #dc2626;
	color: #fff;
}

.termin-doi-result-error h2 { color: #991b1b; }
