/* QuizPansa — style front-endu. Tożsamość PANSA, brandowalne przez zmienne CSS. */
.qp-quiz {
	--qp-primary: #0f304d;       /* granat PANSA */
	--qp-primary-dark: #0a2438;
	--qp-accent: #1c6fb8;        /* błękit lotniczy */
	--qp-correct: #1f9d57;
	--qp-wrong: #d23b3b;
	--qp-bg: #ffffff;
	--qp-surface: #f4f7fb;
	--qp-border: #dbe2ec;
	--qp-text: #14202e;
	--qp-muted: #56616f;

	max-width: 760px;
	margin: 1.5rem auto;
	padding: 1.75rem;
	background: var(--qp-bg);
	border: 1px solid var(--qp-border);
	border-top: 4px solid var(--qp-primary);
	border-radius: 4px;
	box-shadow: 0 4px 18px rgba( 15, 48, 77, 0.08 );
	color: var(--qp-text);
	font-size: 16px;
	line-height: 1.55;
}

.qp-quiz--notice {
	color: var(--qp-muted);
	text-align: center;
}

.qp-quiz__header {
	border-bottom: 2px solid var(--qp-primary);
	padding-bottom: 0.75rem;
	margin-bottom: 1.25rem;
}

.qp-quiz__title {
	margin: 0 0 0.25rem;
	color: var(--qp-primary);
	font-size: 1.6rem;
	line-height: 1.2;
}

.qp-quiz__intro {
	margin: 0;
	color: var(--qp-muted);
}

.qp-question {
	border: 1px solid var(--qp-border);
	border-left: 3px solid var(--qp-primary);
	border-radius: 4px;
	padding: 1rem 1.1rem;
	margin: 0 0 1rem;
}

.qp-question.is-unanswered {
	border-color: var(--qp-wrong);
	border-left-color: var(--qp-wrong);
}

.qp-question__text {
	font-weight: 600;
	padding: 0;
	margin-bottom: 0.6rem;
	display: block;
}

.qp-question__num {
	color: var(--qp-primary);
	font-weight: 700;
	margin-right: 0.35rem;
}

.qp-answers {
	list-style: none;
	margin: 0;
	padding: 0;
}

.qp-answer {
	margin: 0.4rem 0;
}

.qp-answer__label {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--qp-border);
	border-radius: 3px;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}

.qp-answer__content {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex: 1 1 auto;
	min-width: 0;
}

/* --- Obrazek w treści pytania --- */
.qp-question__image {
	margin: 0 0 0.85rem;
}

.qp-question__image img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	border: 1px solid var(--qp-border);
}

/* --- Obrazek jako element odpowiedzi --- */
.qp-answer__media {
	display: block;
	margin: 0;
}

.qp-answer__media img {
	display: block;
	width: 100%;
	max-height: 220px;
	object-fit: cover;
	border-radius: 3px;
	border: 1px solid var(--qp-border);
}

.qp-answer__label:hover {
	border-color: var(--qp-accent);
	background: var(--qp-surface);
}

.qp-answer input {
	margin-top: 0.25rem;
	accent-color: var(--qp-primary);
}

.qp-answer.is-correct .qp-answer__label {
	border-color: var(--qp-correct);
	background: #eaf7ef;
}

.qp-answer.is-wrong .qp-answer__label {
	border-color: var(--qp-wrong);
	background: #fbeaea;
}

.qp-quiz__actions {
	margin-top: 1.25rem;
}

.qp-quiz__submit,
.qp-quiz__retry {
	appearance: none;
	border: 0;
	background: var(--qp-primary);
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 0.8rem 1.75rem;
	border-radius: 3px;
	cursor: pointer;
	transition: background-color 0.15s;
}

.qp-quiz__submit:hover,
.qp-quiz__retry:hover {
	background: var(--qp-primary-dark);
}

.qp-quiz__submit:disabled {
	opacity: 0.6;
	cursor: progress;
}

/* --- Formularz uczestnika (tryb konkursu) --- */
.qp-contest {
	margin-top: 1.5rem;
	padding: 1.25rem;
	background: var(--qp-surface);
	border: 1px solid var(--qp-border);
	border-radius: 4px;
}

.qp-contest__title {
	margin: 0 0 0.25rem;
	color: var(--qp-primary);
	font-size: 1.15rem;
}

.qp-contest__lead {
	margin: 0 0 1rem;
	color: var(--qp-muted);
	font-size: 0.95rem;
}

.qp-field {
	margin-bottom: 0.9rem;
}

.qp-field label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.3rem;
}

.qp-field .qp-req {
	color: var(--qp-wrong);
	margin-left: 0.15rem;
}

.qp-field input[type="text"],
.qp-field input[type="email"],
.qp-field input[type="tel"] {
	width: 100%;
	box-sizing: border-box;
	padding: 0.6rem 0.7rem;
	border: 1px solid var(--qp-border);
	border-radius: 3px;
	font-size: 1rem;
	background: #fff;
	color: var(--qp-text);
}

.qp-field input:focus {
	outline: 2px solid var(--qp-accent);
	outline-offset: 1px;
	border-color: var(--qp-accent);
}

/* Honeypot — ukryty przed ludźmi, łapie boty. */
.qp-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.qp-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.9rem;
	color: var(--qp-text);
}

.qp-consent input {
	margin-top: 0.2rem;
	accent-color: var(--qp-primary);
}

.qp-field__error {
	display: block;
	color: var(--qp-wrong);
	font-size: 0.85rem;
	margin-top: 0.25rem;
}

.qp-form-message {
	margin-top: 0.75rem;
	font-size: 0.95rem;
}

.qp-form-message.is-error {
	color: var(--qp-wrong);
}

/* --- Ekran wyniku --- */
.qp-quiz__result {
	margin-top: 1.5rem;
	padding: 1.25rem;
	border-radius: 4px;
	background: var(--qp-surface);
	border: 1px solid var(--qp-border);
	border-top: 3px solid var(--qp-primary);
	text-align: center;
}

.qp-result__score {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--qp-primary);
	margin-bottom: 0.4rem;
}

.qp-result__message {
	font-size: 1.05rem;
	margin-bottom: 1rem;
}

.qp-result__message.is-high {
	color: var(--qp-correct);
}

.qp-result__message.is-mid {
	color: var(--qp-primary);
}

.qp-result__message.is-low {
	color: var(--qp-wrong);
}

@media ( max-width: 600px ) {
	.qp-quiz {
		padding: 1.1rem;
	}
	.qp-quiz__title {
		font-size: 1.3rem;
	}
}
