/* Modal popup overlay. */
.popup-overlay {
	position: fixed;
	inset: 0;
	background-color: hsla(0, 0%, 50%, 45%);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1001; /* Above the loader. */
}

.popup-panel {
	background-color: var(--purple-bg);
	border-radius: 10px;
	padding: 1.25em;
	margin: 1em;
	max-width: 20em;
	text-align: center;
	text-shadow: 1px 1px black;
	max-height: calc(100svh - 2em);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.popup-title {
	font-size: 2rem;
	font-weight: bold;
	margin-bottom: 0.25em;
}

.popup-body {
	font-size: 1.25rem;
	margin-bottom: 1em;
	overflow-y: auto;
}

.test-setup-form {
	display: flex;
	flex-direction: column;
	gap: 0.75em;
	text-align: left;
}

.test-setup-form label {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
}

.test-setup-form input {
	width: 1.25em;
	height: 1.25em;
	flex: none;
}

.test-results-summary,
.test-results-percentage {
	margin: 0.25em 0;
	font-weight: 700;
}

.test-results-percentage {
	font-size: 2rem;
}

.test-results-list {
	margin: 1em 0 0;
	padding-left: 1.75em;
	text-align: left;
}

.test-results-list li {
	padding: 0.45em 0;
	border-top: 1px solid currentColor;
}

.test-results-list li::marker {
	color: color-mix(in srgb, currentColor 65%, transparent);
	font-size: 0.8em;
}

.test-result-status {
	font-size: 0.85em;
	font-weight: 700;
}

.test-result-status.is-correct {
	color: lightgreen;
}

.test-result-status.is-incorrect {
	color: lightsalmon;
}

@media (max-width: 30em) {
	.popup-panel {
		width: calc(100% - 2em);
		margin: 0.5em;
		padding: 1em;
	}
}

.popup-buttons {
	display: flex;
	flex-direction: column;
	row-gap: 0.5em;
	font-size: 1.5rem;
}

.popup-buttons button {
	border: 0;
	border-radius: 1em;
	padding: 0.5em 1em;
	text-shadow: 1px 1px black;
}

.popup-button-positive {
	background-color: var(--correct-bg);
}

.popup-button-negative {
	background-color: var(--incorrect-bg);
}

.popup-button-main {
	background-color: var(--action-blue);
}

.popup-button-secondary {
	background-color: transparent;
	color: inherit;
}


.spinner {
	border: 8px solid rgba(0, 0, 0, 0.1);
	border-top: 8px solid #3498db;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	animation: spin 0.5s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0);
	}
	100% {
		transform: rotate(360deg);
	}
}
