.testForm {
	display: none;
	width: 100vw;
	height: 100vh;
	background: #0008;
	position: fixed;
	top: 0;
	z-index: 9999;
	justify-content: center;
	align-items: center;
}

.testForm.open {
	display: flex;
}

.testForm__card-wrapper {
	width: 80%;
	height: 80%;
	position: relative;
	background-color: var(--button-color);
	padding: 24px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transition: all .3s ease;
	gap: 16px;
}

.testForm__close {
	position: absolute;
	top: 20px;
	right: 20px;
	height: 48px;
	opacity: 0.2;
	cursor: pointer;
}

.testForm__card {
	flex-direction: column;
	display: flex;
	gap: 48px;
	overflow: hidden;
	align-items: center;
	order: 3;
	flex: 1;
}

.testForm p {
	margin: 0;
}

.testForm__respuestas {
	display: flex;
	flex-direction: column;
	width: 100%;
	gap: 24px;
	align-items: center;
	overflow-y: auto;
	flex-grow: 1;
}

.testForm__card-title {
	text-align: center;
	font-size: 36px;
	font-weight: bold;
	font-family: 'Montserrat';
	color: #000;
	text-wrap: balance;
}

.testForm__respuestas label {
	margin: 0;
	width: 50%;
	background-color: black;
	color: var(--button-color);
	padding: 16px 8px;
	border-radius: 4px;
	transition: all .3s ease;
	cursor: pointer;
}

.testForm__respuestas input {
	display: none;
}

.testForm__respuestas label:hover {
	background-color: white;
	color: black;
}

.testForm__respuestas label:has(input:checked) {
	background-color: #fff;
	color: black;
	border-left: 5px solid black;
}

.testForm__navigation {
	display: flex;
	justify-content: space-between;
	order: 4;
	flex: 0.5;
	align-items: flex-end;
}

.testForm__navigation button {
	border: none;
	color: black;
	cursor: pointer;
	background: none;
	padding: 0;
}

.testForm__navigation button:hover {
	background: none;
}

.testForm__navigation button:disabled {
	color: #0004;
	cursor: not-allowed;
}

.testForm__button {
	background-color: var(--button-color);
	color: #fff
}

.testForm__button:hover {
	background-color: transparent;
	color: var(--button-color) !important;
}

.testForm__progress {
	text-align: center;
	color: #000;
	order: 1;
}

.testForm__card-title-logo {
	order: 2;
	display: flex;
	justify-content: center;
	flex: 0.5;
	align-items: center;
}

.testForm__card-title-logo img {
	width: 114px;
	filter: brightness(0);
	height: fit-content;
}
.testForm__card {
	order: 3;
}

.testForm__summary .testForm__card {
	justify-content: space-between;
}

.testForm__summary .testForm__card-title-logo {
	flex: 0.25;
}

.testForm__summary .testForm__respuestas {
	flex-grow: 0;
	height: 50%;
}

.testForm__result {
	display: none;
}

.testForm__summary .testForm__result {
	display: block;
	font-size: 24px;
	color: #000;
	text-align: center;
	order: 4;
}

/* Orden del logo en summary: después del título */
.testForm__summary .testForm__progress {
	display: none;
}

.testForm__summary .testForm__card-title {
	order: 2;
}

.testForm__summary .testForm__card-title-logo {
	order: 3;
}

.testForm__summary .testForm__respuestas {
	order: 5;
}

.testForm__loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: inherit;
	z-index: 10;
}

.testForm__loading-overlay img {
	width: 24px;
	height: 24px;
}

/* Resumen del test */
.testForm__summary-container {
	width: 100%;
	text-align: left;
	color: #000
}

.testForm__summary-container .testForm__navigation {
	flex: 0;
}

.testForm__summary-item {
	margin-bottom: 20px;
}

.testForm__summary-item strong {
	display: block;
	margin-bottom: 4px;
}

.testForm__summary-item em {
	font-style: normal;
	color: #000;
}

/* Pregunta sin responder en el resumen */
.testForm__summary-item--unanswered {
	color: red;
}

.testForm__summary-item--unanswered .testForm__summary-answer {
	color: red;
	font-style: italic;
}

/* Cartas pares (fondo negro) */
.testForm__even-card.testForm__card-wrapper {
	background-color: black;
}

.testForm__even-card .testForm__card-title,
.testForm__even-card .testForm__progress,
.testForm__even-card .testForm__navigation button {
	color: #fff;
}

.testForm__even-card .testForm__card-title-logo {
	filter: var(--icon-filter-primary);
}

.testForm__even-card .testForm__navigation button:disabled {
	color: #fff4;
}

.testForm__even-card .testForm__respuestas label {
	background-color: var(--button-color);
	color: black;
}

.testForm__even-card .testForm__respuestas label:hover {
	background-color: #fff;
}

.testForm__even-card .testForm__respuestas label:has(input:checked) {
	border-color: var(--button-color);
}

.testForm__even-card .testForm__close {
	filter: brightness(0) invert(1);
	z-index: 1;
}

.testForm__even-card .testForm__summary-container {
	color: #fff;
}

.testForm__even-card .testForm__summary-item em {
	color: #aaa;
}

.testForm__even-card.testForm__summary .testForm__result {
	color: #fff;
}

/* RESPONSIVE */
@media (max-width: 991px) {
	.testForm__close {
		top: 0;
		right: 0;
	}

	.testForm__card-title {
		font-size: 24px;
	}

	.testForm__card {
		gap: 24px
	}

	.testForm__summary .testForm__result {
		font-size: 16px;
	}

	.testForm__summary .testForm__card {
		font-size: 16px;
		gap: 48px;
	}

	.testForm__card-title-logo {
		flex: 0.25;
	}

	.testForm__card-title-logo img {
		width: 88px;
	}

	.testForm__navigation {
		flex: none;
	}

	.testForm__card-wrapper {
		width: 95%;
		height: 95%;
	}

	.testForm__respuestas label {
		width: 100%;
	}
}
