/* Interactive tests of the websites - [test:<code>] in a page body, walked by webTest.js
   (docs/obsah-webov.md, "Interaktívne testy"). The custom CSS of the websites
   (web_css_version) is printed after this file and can restyle any class below. */

.web-test {
	margin: 1.5rem 0;
	padding: 1.25rem;
	border: 1px solid #d6dde9;
	border-radius: 14px;
	background: #f7f9fc;
}

.web-test-name {
	margin-bottom: .75rem;
	color: #112b5d;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.3;
}

.web-test-progress {
	margin-bottom: .25rem;
	color: #5b6b85;
	font-size: .85rem;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
}

.web-test-question,
.web-test-result-title {
	margin-bottom: .5rem;
	color: #112b5d;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.35;
}

.web-test-question:focus,
.web-test-result-title:focus {
	outline: none;
}

.web-test-note,
.web-test-hint {
	margin-bottom: .75rem;
	color: #4a5568;
}

.web-test-image {
	display: block;
	max-width: 100%;
	height: auto;
	margin: .25rem 0 1rem;
	border-radius: 10px;
}

.web-test-answers {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	margin-bottom: 1rem;
}

.web-test-answer {
	display: flex;
	align-items: center;
	gap: .65rem;
	width: 100%;
	min-height: 48px;
	padding: .65rem 1rem;
	border: 1px solid #c9d3e3;
	border-radius: 10px;
	background: #fff;
	color: #1a202c;
	font-size: 1rem;
	text-align: left;
	cursor: pointer;
	touch-action: manipulation;
	transition: border-color .15s, background-color .15s;
}

.web-test-answer:hover,
.web-test-answer:focus-visible {
	border-color: #18448c;
	background: #eef3fb;
}

.web-test-answer.is-checked {
	border-color: #112b5d;
	background: #e3ebf8;
}

.web-test-answer-check input {
	flex: 0 0 auto;
	width: 1.2rem;
	height: 1.2rem;
	margin: 0;
}

.web-test-start,
.web-test-next,
.web-test-submit {
	min-height: 44px;
	touch-action: manipulation;
}

.web-test-nav {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-top: .75rem;
}

.web-test-nav .btn-link {
	min-height: 40px;
	padding-left: 0;
	padding-right: .75rem;
	touch-action: manipulation;
}

.web-test-result-text {
	margin-bottom: 1rem;
}

.web-test-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-bottom: 1rem;
}

.web-test-buttons .btn {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	touch-action: manipulation;
}

.web-test-contact {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #d6dde9;
}

.web-test-contact-title {
	margin-bottom: .25rem;
	color: #112b5d;
	font-weight: 700;
}

.web-test-field {
	margin-bottom: .75rem;
}

.web-test-consent {
	margin-bottom: .75rem;
}

.web-test-error {
	color: #b42318;
	font-weight: 600;
}

.web-test-thanks {
	margin-top: 1rem;
	color: #18ae41;
	font-weight: 700;
}

/* The modal window with the questions and the result (webTest.js, <dialog>) - centered on a
   computer, the whole screen on a phone. */

html.web-test-open,
html.web-test-open body {
	overflow: hidden;
}

.web-test-dialog {
	width: min(680px, calc(100vw - 2rem));
	max-width: none;
	max-height: calc(100vh - 2rem);
	max-height: calc(100dvh - 2rem);
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: #f7f9fc;
	color: #1a202c;
	box-shadow: 0 18px 50px rgba(17, 43, 93, .35);
}

.web-test-dialog[open] {
	display: flex;
	flex-direction: column;
}

.web-test-dialog::backdrop {
	background: rgba(17, 43, 93, .6);
}

.web-test-dialog-head {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: .75rem;
	padding: .5rem .5rem .5rem 1.25rem;
	border-bottom: 1px solid #d6dde9;
	background: #fff;
}

.web-test-dialog-name {
	flex: 1 1 auto;
	min-width: 0;
	color: #112b5d;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
}

.web-test-dialog-close {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #112b5d;
	cursor: pointer;
	touch-action: manipulation;
}

.web-test-dialog-close:hover,
.web-test-dialog-close:focus-visible {
	background: #eef3fb;
}

.web-test-dialog-body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 1.25rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

@media (max-width: 575px) {
	.web-test {
		padding: 1rem;
	}

	.web-test-buttons .btn {
		width: 100%;
		justify-content: center;
	}

	.web-test-dialog {
		width: 100%;
		height: 100%;
		max-height: none;
		margin: 0;
		border-radius: 0;
	}

	.web-test-dialog-body {
		padding: 1rem;
	}
}

@media (pointer: coarse) {
	.web-test-contact .form-control {
		font-size: 16px;
	}
}
