/* Festquiz - scoped under .festquiz. Kategori-accent saettes inline (--fq-accent)
   af festquiz.js pr. spoergsmaal. Bruger Festbogens design-tokens med fallbacks. */
.festquiz {
	--fq-accent: #00457c;
	--fq-bg: var(--color-bg, #ffffff);
	--fq-surface: var(--color-surface, #f8fafc);
	--fq-border: var(--color-border, #e5e7eb);
	--fq-text: var(--color-text, #1f2937);
	--fq-text-muted: var(--color-text-muted, #6b7280);
	--fq-radius: var(--radius-lg, 12px);

	font-family: var(--font-body, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	color: var(--fq-text);
	max-width: 680px;
	margin: 2rem auto;
	line-height: 1.5;
}

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

/* --- Skaerme --- */
.festquiz .fq-screen[hidden] {
	display: none;
}

/* --- Start --- */
.festquiz .fq-start {
	text-align: center;
	background: var(--fq-surface);
	border: 1px solid var(--fq-border);
	border-radius: var(--fq-radius);
	padding: 2rem 1.5rem;
}

.festquiz .fq-mascot {
	width: 120px;
	height: auto;
	margin: 0 auto 0.5rem;
	display: block;
}

.festquiz .fq-start-title {
	margin: 0.25rem 0 0.5rem;
	font-size: 1.6rem;
}

.festquiz .fq-start-lead {
	margin: 0 auto 1.25rem;
	max-width: 42ch;
	color: var(--fq-text-muted);
}

/* --- Knapper --- */
.festquiz .fq-btn {
	font: inherit;
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: var(--radius, 8px);
	padding: 0.7rem 1.4rem;
	transition: background 150ms ease, border-color 150ms ease;
}

.festquiz .fq-btn-primary {
	background: var(--fq-accent);
	color: #fff;
	font-weight: 600;
}

.festquiz .fq-btn-primary:hover {
	filter: brightness(0.93);
	/* Temaets globale button:hover saetter color:#fff - vi bevarer hvid tekst. */
	color: #fff;
}

.festquiz .fq-btn:focus-visible,
.festquiz .fq-option:focus-visible {
	outline: 3px solid var(--fq-accent);
	outline-offset: 2px;
}

/* --- Selve quiz-runden --- */
.festquiz .fq-progress {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.6rem;
}

.festquiz .fq-cat-badge {
	display: inline-block;
	background: var(--fq-accent);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 0.25rem 0.7rem;
	border-radius: 999px;
}

.festquiz .fq-count {
	font-size: 0.85rem;
	color: var(--fq-text-muted);
}

.festquiz .fq-card {
	position: relative;
	background: var(--fq-bg);
	border: 1px solid var(--fq-border);
	border-top: 4px solid var(--fq-accent);
	border-radius: var(--fq-radius);
	padding: 1.5rem 1.25rem 1.25rem;
	box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
}

.festquiz .fq-qid {
	position: absolute;
	top: 0.5rem;
	right: 0.75rem;
	font-size: 0.7rem;
	color: #b8bcc4;
	letter-spacing: 0.03em;
}

.festquiz .fq-question {
	margin: 0.25rem 0 1rem;
	font-size: 1.2rem;
	font-weight: 600;
}

.festquiz .fq-question:focus {
	outline: none;
}

.festquiz .fq-term {
	display: block;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fq-accent);
	margin-bottom: 0.35rem;
}

.festquiz .fq-kicker {
	display: block;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--fq-accent);
	margin-bottom: 0.35rem;
}

.festquiz .fq-statement {
	display: block;
	font-style: italic;
}

/* --- Svarmuligheder --- */
.festquiz .fq-options {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.festquiz .fq-option {
	font: inherit;
	text-align: left;
	cursor: pointer;
	background: var(--fq-surface);
	border: 1.5px solid var(--fq-border);
	border-radius: var(--radius, 8px);
	padding: 0.85rem 1rem;
	color: var(--fq-text);
	transition: border-color 150ms ease, background 150ms ease;
}

.festquiz .fq-option:not(:disabled):hover {
	border-color: var(--fq-accent);
	background: #fff;
}

.festquiz .fq-option:disabled {
	cursor: default;
	opacity: 1;
}

.festquiz .fq-option.fq-correct {
	border-color: #2f855a;
	background: #eaf5ef;
	color: #22543d;
	font-weight: 600;
}

.festquiz .fq-option.fq-wrong {
	border-color: #c0392b;
	background: #fdecea;
	color: #822b22;
}

.festquiz .fq-option.fq-correct::after {
	content: " \2713";
	font-weight: 700;
}

/* --- Feedback --- */
.festquiz .fq-feedback {
	margin-top: 1rem;
	font-size: 0.95rem;
	min-height: 1.2em;
}

.festquiz .fq-feedback.fq-fb-correct {
	color: #2f855a;
	font-weight: 600;
}

.festquiz .fq-feedback.fq-fb-wrong {
	color: #b23b2e;
}

/* Auto-advance: tynd nedtaellingsbjaelke + diskret skip-hint under feedback. */
.festquiz .fq-advancebar {
	height: 4px;
	margin-top: 0.9rem;
	background: var(--fq-border);
	border-radius: 999px;
	overflow: hidden;
}

.festquiz .fq-advancebar > span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--fq-accent);
}

.festquiz .fq-advance-hint {
	margin: 0.5rem 0 0;
	font-size: 0.8rem;
	color: var(--fq-text-muted);
}

@keyframes fq-fill {
	from { width: 0; }
	to { width: 100%; }
}

/* Reduceret bevaegelse: ingen udfyldnings-animation - bjaelken staar bare fuld.
   Timeren gaar stadig videre af sig selv. */
@media (prefers-reduced-motion: reduce) {
	.festquiz .fq-advancebar > span {
		animation: none !important;
		width: 100%;
	}
}

/* --- Resultat --- */
.festquiz .fq-result {
	text-align: center;
	background: var(--fq-surface);
	border: 1px solid var(--fq-border);
	border-radius: var(--fq-radius);
	padding: 2rem 1.5rem;
}

.festquiz .fq-result-title {
	margin: 0 0 0.5rem;
	font-size: 1.4rem;
}

.festquiz .fq-result-title:focus {
	outline: none;
}

.festquiz .fq-score {
	font-size: 2rem;
	font-weight: 700;
	color: var(--color-primary, #00457c);
	margin: 0.25rem 0;
}

.festquiz .fq-comment {
	max-width: 44ch;
	margin: 0 auto 1.25rem;
	color: var(--fq-text-muted);
}

.festquiz .fq-readmore {
	margin-top: 1.5rem;
	font-size: 0.95rem;
}

.festquiz .fq-readmore p {
	margin: 0 0 0.4rem;
	color: var(--fq-text-muted);
}

.festquiz .fq-readmore ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	justify-content: center;
}

/* --- Mobil --- */
@media (max-width: 600px) {
	.festquiz {
		margin: 1.25rem auto;
	}
	.festquiz .fq-start,
	.festquiz .fq-result {
		padding: 1.5rem 1rem;
	}
	.festquiz .fq-question {
		font-size: 1.1rem;
	}
	.festquiz .fq-btn-primary {
		width: 100%;
	}
}

/* --- Sidebar-variant: kompakt + KUN desktop ---
   PHP returnerer allerede '' paa mobil-UAs (wp_is_mobile). Dette skjuler den
   ogsaa i smalle desktop-vinduer, saa den aldrig braekker en smal spalte. */
.festquiz--sidebar {
	margin: 0 0 1.5rem;
	max-width: none;
	font-size: 0.95rem;
}

.festquiz--sidebar .fq-start,
.festquiz--sidebar .fq-result {
	padding: 1.25rem 1rem;
}

.festquiz--sidebar .fq-start-title {
	font-size: 1.3rem;
}

.festquiz--sidebar .fq-question {
	font-size: 1.05rem;
}

.festquiz--sidebar .fq-score {
	font-size: 1.6rem;
}

@media (max-width: 1023px) {
	.festquiz--sidebar {
		display: none !important;
	}
}
