/**
 * Elementor Widget - Frage Quiz - ID: 3cf3dd9f
 *
 * Basis-Layout und Grundzustaende. Farben, Typografie, Abstaende, Rahmen und
 * Groessen kommen aus den Elementor-Controls und ueberschreiben diese Werte
 * automatisch, weil Elementor mit hoeherer Spezifitaet arbeitet.
 */

/* ---------------------------------------------------------------
   1. Grundgeruest
   --------------------------------------------------------------- */

.fq-quiz-wrapper {
	position: relative;
	box-sizing: border-box;
}

.fq-quiz-wrapper *,
.fq-quiz-wrapper *::before,
.fq-quiz-wrapper *::after,
.fq-popup-overlay-3cf3dd9f *,
.fq-popup-overlay-3cf3dd9f *::before,
.fq-popup-overlay-3cf3dd9f *::after {
	box-sizing: border-box;
}

.fq-quiz-container-wrapper {
	width: 100%;
}

.fq-quiz-container {
	position: relative;
	width: 100%;
	max-width: 720px;
	margin: 0 auto;
	padding: 32px;
	background-color: #ffffff;
	border-radius: 10px;
}

/* ---------------------------------------------------------------
   2. Trigger-Button (nur im Popup-Modus)
   --------------------------------------------------------------- */

.fq-trigger-wrapper {
	text-align: center;
}

.fq-popup-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	border: none;
	border-radius: 6px;
	background-color: #1f2937;
	color: #ffffff;
	font-size: 16px;
	line-height: 1.3;
	cursor: pointer;
	transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

.fq-popup-trigger:hover {
	background-color: #111827;
}

.fq-btn-icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.fq-btn-icon svg {
	width: 1em;
	height: 1em;
}

.fq-btn-icon-left {
	margin-right: 8px;
}

.fq-btn-icon-right {
	margin-left: 8px;
}

/* ---------------------------------------------------------------
   3. Popup-Modus und Overlay
   --------------------------------------------------------------- */

/* Vor dem Umbau durch das JS und im Elementor-Editor */
.fq-quiz-popup-mode .fq-quiz-container-wrapper {
	display: none;
}

.fq-popup-overlay-3cf3dd9f {
	display: none;
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background-color: rgba(15, 23, 42, .7);
	opacity: 0;
	overflow-y: auto;
	transition: opacity .3s ease;
}

.fq-popup-overlay-3cf3dd9f.fq-popup-visible {
	opacity: 1;
}

.fq-popup-overlay-3cf3dd9f .fq-popup-box {
	display: block;
	width: 100%;
	max-width: 720px;
	max-height: 90vh;
	overflow-y: auto;
	transform: translateY(20px);
	transition: transform .3s ease;
}

.fq-popup-overlay-3cf3dd9f.fq-popup-visible .fq-popup-box {
	transform: none;
}

/* Schliessen-Button */
.fq-popup-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: transparent;
	color: #6b7280;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: color .2s ease, background-color .2s ease;
}

.fq-popup-close:hover {
	color: #111827;
	background-color: rgba(0, 0, 0, .06);
}

.fq-close-icon {
	display: block;
	line-height: 1;
}

/* ---------------------------------------------------------------
   4. Schritt-Anzeige
   --------------------------------------------------------------- */

.fq-steps-indicator {
	/* Vertikale Position der Linie, entspricht der halben Kreisgroesse.
	   Wenn du die Kreisgroesse im Editor aenderst, hier mitziehen. */
	--fq-line-top: 20px;
	position: relative;
	margin-bottom: 32px;
}

/* Beide Schreibweisen abgedeckt, siehe Hinweis zur Klassen-Abweichung */
.fq-steps-line,
.fq-step-line {
	position: absolute;
	top: var(--fq-line-top);
	left: 0;
	right: 0;
	z-index: 0;
	height: 3px;
	background-color: #e5e7eb;
	border-radius: 99px;
	overflow: hidden;
}

.fq-step-line-fill {
	width: 0;
	height: 100%;
	background-color: #2563eb;
	border-radius: 99px;
	transition: width .4s ease;
}

.fq-steps-list-items {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px;
}

.fq-step-item {
	display: flex;
	flex: 1 1 0;
	min-width: 0;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
}

.fq-step-circle {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border: 2px solid #d1d5db;
	border-radius: 50%;
	background-color: #ffffff;
	color: #6b7280;
	font-size: 15px;
	font-weight: 600;
	transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}

.fq-step-circle.fq-square {
	border-radius: 6px;
}

.fq-step-item.fq-step-active .fq-step-circle {
	background-color: #2563eb;
	border-color: #2563eb;
	color: #ffffff;
}

.fq-step-item.fq-step-completed .fq-step-circle {
	background-color: #16a34a;
	border-color: #16a34a;
	color: #ffffff;
}

.fq-step-shorttext {
	font-size: 12px;
	line-height: 1.3;
	color: #6b7280;
	hyphens: auto;
}

/* Variante: nur Punkte */
.fq-steps-indicator-dots {
	--fq-line-top: 6px;
}

.fq-steps-indicator-dots .fq-step-circle {
	width: 14px;
	height: 14px;
	border-width: 2px;
	font-size: 0;
	border-radius: 50%;
}

/* Variante: Fortschrittsbalken */
.fq-progress-bar {
	width: 100%;
	height: 8px;
	background-color: #e5e7eb;
	border-radius: 99px;
	overflow: hidden;
}

.fq-progress-bar-fill {
	height: 100%;
	background-color: #2563eb;
	border-radius: 99px;
	transition: width .4s ease;
}

/* ---------------------------------------------------------------
   5. Fragen und Antworten
   --------------------------------------------------------------- */

.fq-questions-container {
	position: relative;
}

.fq-question-slide {
	display: none;
}

.fq-question-slide.fq-active {
	display: block;
	animation: fq-fade-in .35s ease;
}

@keyframes fq-fade-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.fq-question-title {
	margin: 0 0 20px;
	font-size: 20px;
	line-height: 1.35;
}

.fq-answers-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.fq-answers-list > * {
	min-width: 0;
}

.fq-answer-button {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding: 16px 20px;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	background-color: #ffffff;
	color: #1f2937;
	font-size: 16px;
	line-height: 1.4;
	text-align: left;
	cursor: pointer;
	white-space: normal;
	overflow-wrap: break-word;
	word-break: break-word;
	hyphens: auto;
	transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.fq-answer-button:hover {
	border-color: #2563eb;
}

.fq-answer-button.fq-selected {
	border-color: #2563eb;
	background-color: #eff6ff;
}

.fq-answer-text {
	display: block;
	max-width: 100%;
	white-space: normal;
	overflow-wrap: break-word;
	word-break: break-word;
	hyphens: auto;
}

/* ---------------------------------------------------------------
   6. Zurueck-Button
   --------------------------------------------------------------- */

.fq-back-button-wrapper {
	margin-top: 24px;
}

.fq-back-button {
	padding: 10px 18px;
	border: none;
	border-radius: 6px;
	background-color: transparent;
	color: #6b7280;
	font-size: 14px;
	line-height: 1.3;
	cursor: pointer;
	transition: color .2s ease, background-color .2s ease;
}

.fq-back-button:hover {
	color: #1f2937;
	background-color: rgba(0, 0, 0, .05);
}

/* ---------------------------------------------------------------
   7. Ergebnisse
   --------------------------------------------------------------- */

.fq-results-wrapper {
	animation: fq-fade-in .35s ease;
}

.fq-result-container {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin: 0 auto;
}

.fq-template-placeholder {
	padding: 24px;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	background-color: #f8fafc;
	color: #64748b;
	font-size: 14px;
	text-align: center;
}

/* ---------------------------------------------------------------
   8. Fokus und Barrierefreiheit
   --------------------------------------------------------------- */

.fq-answer-button:focus-visible,
.fq-back-button:focus-visible,
.fq-popup-trigger:focus-visible,
.fq-popup-close:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.fq-question-slide.fq-active,
	.fq-results-wrapper {
		animation: none;
	}

	.fq-popup-overlay-3cf3dd9f,
	.fq-popup-overlay-3cf3dd9f .fq-popup-box,
	.fq-step-line-fill,
	.fq-progress-bar-fill,
	.fq-answer-button,
	.fq-step-circle {
		transition: none;
	}
}

/* ---------------------------------------------------------------
   9. Mobil
   --------------------------------------------------------------- */

@media (max-width: 767px) {
	.fq-quiz-container {
		padding: 24px 20px;
	}

	.fq-popup-overlay-3cf3dd9f {
		align-items: flex-start;
		padding: 12px;
	}

	.fq-popup-overlay-3cf3dd9f .fq-popup-box {
		max-height: calc(100vh - 24px);
	}

	.fq-question-title {
		font-size: 18px;
	}

	.fq-answer-button {
		padding: 14px 16px;
		font-size: 15px;
	}

	.fq-step-shorttext {
		display: none;
	}

	.fq-steps-indicator {
		margin-bottom: 24px;
	}
}