/* Termin-Switcher – Frontend */

.cts {
	--cts-accent: #2d6cb5;
	--cts-accent-soft: rgba(45, 108, 181, .1);
	--cts-text: #1f2933;
	--cts-muted: #5b6672;
	--cts-card: #fff;
	--cts-line: rgba(31, 41, 51, .14);
	--cts-radius: 12px;
	position: relative;
	max-width: 1100px;
	color: var(--cts-text);
	text-align: left;
}

@supports (background: color-mix(in srgb, red 10%, white)) {
	.cts {
		--cts-accent-soft: color-mix(in srgb, var(--cts-accent) 11%, transparent);
	}
}

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

/* Screenreader-Ansage */
.cts .cts__live {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Schritte: inaktive bleiben im Layout (Breite), damit Embeds wie meetergo korrekt initialisieren */
.cts .cts__step {
	scroll-margin-top: 120px;
}

.cts .cts__step:not(.is-active) {
	position: absolute !important;
	top: 0;
	left: 0;
	right: 0;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	visibility: hidden;
	pointer-events: none;
}

.cts .cts__step.is-active.is-entering {
	animation: cts-in .3s ease both;
}

@keyframes cts-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}

/* Kopf */
.cts .cts__title {
	margin: 0 0 8px;
	color: var(--cts-text);
	font-size: clamp(20px, 2.2vw, 26px);
	line-height: 1.25;
	outline: none;
}

.cts .cts__text {
	max-width: 62ch;
	margin: 0 0 24px;
	color: var(--cts-muted);
	font-size: 16px;
	line-height: 1.55;
}

.cts .cts__title + .cts__options,
.cts .cts__title + .cts__embed,
.cts .cts__title + .cts__empty {
	margin-top: 20px;
}

/* Zurück-Button */
.cts button.cts__back {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 16px;
	padding: 6px 10px 6px 4px;
	border-radius: 8px;
	color: var(--cts-muted);
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: color .2s ease;
}

.cts button.cts__back:hover {
	color: var(--cts-accent);
}

.cts button.cts__back .cts__svg {
	width: 18px;
	height: 18px;
	transition: transform .2s ease;
}

.cts button.cts__back:hover .cts__svg {
	transform: translateX(-3px);
}

/* Auswahl-Karten */
.cts .cts__options {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	max-width: 820px;
}

.cts button.cts__option {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 16px;
	width: 100%;
	padding: 20px;
	border: 1px solid var(--cts-line);
	border-radius: var(--cts-radius);
	background: var(--cts-card);
	color: var(--cts-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.cts button.cts__option:hover {
	border-color: var(--cts-accent);
	box-shadow: 0 6px 20px rgba(31, 41, 51, .08);
}

.cts button.cts__option:active {
	box-shadow: none;
}

.cts .cts__option-icon {
	display: flex;
	flex: 0 0 48px;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--cts-accent-soft);
	color: var(--cts-accent);
}

.cts .cts__option-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.cts .cts__option-label {
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
}

.cts .cts__option-desc {
	color: var(--cts-muted);
	font-size: 14px;
	line-height: 1.4;
}

.cts .cts__option-arrow {
	display: flex;
	flex: 0 0 auto;
	color: var(--cts-muted);
	transition: color .2s ease, transform .2s ease;
}

.cts .cts__option-arrow .cts__svg {
	width: 20px;
	height: 20px;
}

.cts button.cts__option:hover .cts__option-arrow {
	color: var(--cts-accent);
	transform: translateX(3px);
}

/* Fokus */
.cts button.cts__option:focus-visible,
.cts button.cts__back:focus-visible {
	outline: 2px solid var(--cts-accent);
	outline-offset: 3px;
}

/* Embed – linksbündig */
.cts .cts__embed {
	width: 100%;
}

.cts .cts__embed iframe {
	display: block;
	max-width: 100%;
	margin-left: 0 !important;
	margin-right: auto !important;
}

.cts .cts__empty {
	margin: 0;
	padding: 16px 20px;
	border: 1px dashed var(--cts-line);
	border-radius: var(--cts-radius);
	color: var(--cts-muted);
	font-size: 15px;
}

/* Mobile */
@media (max-width: 640px) {
	.cts .cts__options {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.cts button.cts__option {
		gap: 14px;
		padding: 16px;
	}

	.cts .cts__option-icon {
		flex-basis: 42px;
		width: 42px;
		height: 42px;
	}

	.cts .cts__embed .meetergo-iframe {
		min-width: 0 !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cts .cts__step.is-active.is-entering {
		animation: none;
	}

	.cts button.cts__option,
	.cts .cts__option-arrow,
	.cts button.cts__back .cts__svg {
		transition: none;
	}
}
