/*******************************
 ********* LÁTÁSTESZT **********
 ******************************/

body {
	--fullw-margin: -2.7rem;
	--hlt-blue: #1c42ff;
	--hlt-lightblue: #6b82ff;
	--hlt-content-edge-padding: ;
}
@media (width > 600px) {
	body {
		--fullw-margin: calc(385px - 50dvw);
	}
}
body:has(.gform_wrapper) {
	background-color: #f3f3f3;
	line-height: 1.5;

	.black {
		background-color: #f3f3f3;
		color: #000;
	}
}
.content:has(.gform_wrapper) {padding-block: 0}
.eyetest-close {
	text-decoration: none !important;
	color: #000;
	font-size: 2.4rem;
	padding: 0 1rem;
	line-height: 1;
}
.eyetest-close:hover {
	color: var(--hlt-blue);
}

.eyetest-header {
	background: url(/wp-content/plugins/hoya-latasteszt/img/latasteszt-header1.webp) center / cover no-repeat;
	margin: calc(-1 * clamp(30px, (100dvh - 799px) * 99, 64px)) var(--fullw-margin) 30px;
	position: relative;
}
.eyetest-header.type2 {
	background: url(/wp-content/plugins/hoya-latasteszt/img/latasteszt-header2.webp) 50% 30% / cover no-repeat;
}
.eyetest-header::after {
	background: #333c9ce5;
	content: '';
	position: absolute;
	inset: 0;
}
.eyetest-header-content {
	margin-inline: auto;
	max-width: 700px;
	padding: 100px 24px 24px;
	position: relative;
	z-index: 1;
}
.eyetest-header > img {
	margin-inline: auto;
	min-height: 215px;
	padding: 50px 24px;
	position: relative;
	z-index: 1;
}
.eyetest-header-content h2 {
	color: #fff;
}
.lte-svg {
	display: block;
	margin: 0 auto 30px;
}

/*********** Gravity Forms *************/
.gform-theme .gform_body {
	color: #000;
	max-width: 800px;
	margin: 30px auto;
	padding-inline: 24px;
}
.gfield_visibility_hidden,
.gform_submission_error,
.gform_validation_errors,
.gfield_required,
.hidden_label .gfield_label,
.gform_validation_container,
.gform_required_legend {
	display: none;
}
.gform_wrapper .gform_fields {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	grid-template-rows: repeat(auto-fill, auto);
	gap: 12px;
}
.gform_wrapper .gfield {
	grid-column: 1/-1;
	position: relative;
}
.gform_wrapper .gfield.gfield--width-half {
	grid-column: span 6;
}
@media (max-width: 640px) {
	.gform_wrapper .gfield:not(.gfield--width-full) {
		grid-column: 1/-1;
	}
}
.gform_body fieldset {
	border: 0;
	margin: 0;
	padding: 0;
}

/* látásteszt */
.gf_progressbar_wrapper,
.button.gform_previous_button,
.gform_validation_errors {
	display: none;
}

.gform_page_fields :is(h2, p) {
	text-align: center;
}
.gform_page_fields h2 {
	font-size: 24px;
	font-weight: 700;
	text-transform: none;
}
.gfield p {
	font-size: 1.15rem;
	line-height: 1.5;
	margin-bottom: 1rem;
}
.gfield p.half-big {
	font-size: 20px;
	margin-bottom: 0;
	text-align: center;
}
.gfield p.lt-list {
	margin: 0 auto 0.2rem;
	max-width: 330px;
	text-align: left;
	text-indent: -0.95em;
}
.gform_page_fields img {
	display: block;
	height: auto;
	margin-inline: auto;
	max-width: 100%;
}
.gform_page_fields img.m4em {
	margin-block: 3rem;
	max-width: 80vw;
}

.lsz-blue-line {
	background: var(--hlt-blue);
	margin: 1.5em auto;
	width: clamp(62px, (100vw - 767px) * 99, 82px);
	height: clamp(2px, (100vw - 767px) * 9, 3px);
}

/* Calibration UI layout */
.calibration-wrap {
	position: relative;
	max-width: 720px;
	min-height: 300px;
}

.calibration-stage {
	position: absolute;
	top: 0;
	right: 0;
	min-height: 260px;
}

/* Card: bottom-right anchored, grows left/up */
.calibration-card {
	position: absolute;
	right: 4rem;
	bottom: -2rem;
	width: var(--cal-card-w, 320px);
	height: calc(var(--cal-card-w, 320px) / 1.586);
	background: #fff;
	border-radius: 16px;
	box-sizing: border-box;
	container-type: inline-size;
}

.calibration-card-border {
	position: absolute;
	inset: 0;
	border: 4px dashed rgba(0, 0, 0, 0.35);
	border-radius: 12px;

	display: grid;
	place-items: center;
	text-align: center;
	font-size: 14px;
	line-height: 1.4;
	text-wrap: balance;
}
@container (max-width: 199px) {
	.calibration-card span {
		display: none;
	}
}

/* Slider column */
.calibration-slider-col {
}

/* Vertical range input (best-effort cross-browser) */
input[type='range'].calibration-slider,
input[type='range'].calibration-slider:focus {
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	border: 0;
	box-shadow: none;
	width: 240px; /* becomes height after rotation */
	height: 36px;
	transform: rotate(-90deg);
	transform-origin: 50% 50%;
	padding: 0;

	position: absolute;
	top: 50%;
	right: -6rem;
}

.calibration-slider::-webkit-slider-container {
	width: 240px;
}
.calibration-slider::-webkit-slider-runnable-track {
	height: 6px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.18);
}
.calibration-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	background: var(--hlt-blue);
	border-radius: 999px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	width: 1rem;
	height: 1rem;
	margin-top: -0.3rem;
}

/* Firefox track */
.calibration-slider::-moz-range-track {
	height: 6px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.18);
}
.calibration-slider::-moz-range-thumb {
	width: 28px;
	height: 28px;
	border-radius: 999px;
	background: #ffffff;
	border: 2px solid rgba(0, 0, 0, 0.25);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
#gform_next_button_1_46 {
	margin-top: 3rem;
}

/* animation */
#anim-wrap {
	background-color: #fff;
	border-radius: min(5vw, 30px);
	box-shadow: 0px 5px 5px 0px #0000001a;
	max-width: 385px;
	height: 500px;
	margin: 1rem auto 2rem;
	padding: 0;
	position: relative;
}
#anim-wrap > :is(svg, div) {
	position: absolute;
}
.anim-landolt {
	top: 50%;
	left: 50%;
	transform: translate(-50%, calc(-30px - 50%));
	width: 192.5px;
}
.anim-see {
	width: 0px;
	height: 0px;
	background: #1c42ff;
	border-radius: 50%;
	top: 50%;
	left: 50%;
	transform: translate(calc(5px - 50%), calc(-152px - 50%));
	animation: anim1-see 6s linear 2s forwards;
}
.anim-cursor {
	top: 50%;
	left: 50%;
	transform: translate3D(calc(167px - 50%), calc(120px - 50%), 0);
	animation: anim2-move 2.4s linear 3s forwards;
}
.anim-btn {
	background: #6b82ff;
	border-radius: 10px;
	width: 180px;
	height: 50px;
	left: 50%;
	bottom: 50px;
	transform: translateX(-50%);
}
.anim-landolt .clicked {
	animation: anim3-select 10ms linear 4s forwards;
}
.anim-click,
.anim-click2 {
	border-radius: 50%;
	width: 0px;
	height: 0px;
	top: 50%;
	left: 50%;
}
.anim-click {
	background: #1c42ff;
	transform: translate(calc(50px - 50%), calc(-35px - 50%));
	animation: anim4-click 0.4s linear 4s forwards;
}
.anim-click2 {
	background: #000;
	transform: translate3D(calc(20px - 50%), calc(177px - 50%), 0);
	animation: anim4-click 0.4s linear 5.4s forwards;
}

@keyframes anim1-see {
	12%,
	24% {
		opacity: 0.2;
		width: 30px;
		height: 30px;
	}
	100% {
		opacity: 0;
		width: 30px;
		height: 30px;
	}
}
@keyframes anim2-move {
	41%,
	59% {
		transform: translate3D(calc(67px - 50%), calc(-16px - 50%), 0);
	}
	100% {
		transform: translate3D(calc(37px - 50%), calc(195px - 50%), 0);
	}
}
@keyframes anim3-select {
	to {
		filter: invert(1);
	}
}
@keyframes anim4-click {
	to {
		opacity: 0;
		width: 50px;
		height: 50px;
	}
}

/* fields */
.gfield :is(input[type='text'], input[type='email']) {
	border-radius: 10px;
	font-size: clamp(16px, 2.5dvw, 20px);
	padding: 0.7em 1em;
	width: 100%;
}

.gfield_label {
	font-size: 0.8em;
	font-weight: 700;
}
#field_1_3 .gfield_label {
	margin-bottom: 1.5em;
}

.gfield .gfield_consent_label {
	display: block;
	font-size: 0.8em;
	cursor: pointer;
	position: relative;
	left: 2em;
	line-height: 1.4em;
}
.gfield--type-consent input[type='checkbox'] {
	position: absolute;
	left: -9999px;
	width: 1px;
}
.gfield .gfield_consent_label::before {
	content: '';
	position: absolute;
	left: -2em;
	top: 0;
	width: 18px;
	height: 18px;
	margin-right: 15px;
	background-color: rgba(0, 0, 0, 0);
	background-clip: content-box;
	border: 1px solid #000;
}
#gform_2 .gfield .gfield_consent_label::before {
	background-color: #fff;
}
.gfield .gfield_consent_label::after {
	content: '';
	border-right: 2px solid var(--hlt-blue);
	border-top: 2px solid var(--hlt-blue);
	width: 6px;
	height: 11px;
	position: absolute;
	top: 10px;
	left: -1.75em;
	transform: scaleX(-1) rotate(135deg);
	transform-origin: left top;
	display: none;
}
.gform_wrapper .ginput_container_consent input[type='checkbox']:checked + label:after {
	animation: checkm 0.5s ease 0s running;
	display: block;
}
@keyframes checkm {
	0% {
		height: 0;
		width: 0;
	}
	25% {
		height: 0;
		width: 6px;
	}
	50% {
		height: 11px;
		width: 6px;
	}
}

/* radio */
.gfield_radio:not(#input_1_35):not(#input_1_40) input[type='radio'] {
	appearance: none;
	background-color: transparent;
	border: 0.1em solid currentColor;
	border-radius: 50%;
	cursor: pointer;
	width: 1rem;
	height: 1rem;
	margin: 0 0.5rem 0 0;
	position: relative;
	transform: translateY(0.1em);
}

.gfield_radio:not(#input_1_35):not(#input_1_40) input[type='radio']::before {
	content: '';
	display: block;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	box-shadow: inset 1em 1em var(--hlt-blue);
	position: absolute;
	top: 0.2rem;
	left: 0.2rem;
	transform: scale(0);
	transition: 120ms transform ease-in-out;
}
.gfield_radio:not(#input_1_35):not(#input_1_40) input[type='radio']:checked::before {
	transform: scale(1);
}
.gfield_radio label {
	cursor: pointer;
}

#field_1_3 {
	margin-inline: auto;
	width: max-content;
}

/* eredmény */
h2.big-blue-line {
	color: #fff;
	font-weight: 400;
	line-height: 1.05em;
	margin-block: 100px 40px !important;
	position: relative;
	text-align: center;
}
h2.big-blue-line::after {
	content: '';
	width: 150px;
	height: 8px;
	background: var(--hlt-blue);
	position: absolute;
	bottom: -30px;
	left: 50%;
	transform: translateX(-50%);
}
#field_2_10 {
	text-align: center;
}
#field_2_10 .gfield_label {
	color: #fff;
	display: block;
	margin-bottom: 12px;
}
#field_2_10 input {
	text-align: center;
}

/* validation */
.gfield_validation_message {
	color: #e70620;
	font-size: 0.75em;
}
#gform_2 .gfield_validation_message {
	color: #ff8391;
}
.gfield--type-consent .gfield_validation_message {
	margin-left: 33px;
}

/* landolt */
.landolt-widget:focus-visible{
	outline:0;
}
.landolt-wrap {
	background-color: #fff;
	border-radius: min(5vw, 30px);
	box-shadow: 0px 5px 5px 0px #0000001a;
	max-width: 385px;
	margin: 0 auto 1rem;
	padding: min(5vw, 50px);

	position: relative;
	display: grid;
	grid-template-rows: auto auto auto;
	row-gap: 1rem;
	justify-items: center;
}

.landolt-next-hidden {
	display: none !important;
}

/* footer */
.gform_page_footer,
#gform_2 .gform-footer {
	display: flex;
	justify-content: center;
	margin-top: 32px;
}
#gform_page_1_2 .gform-page-footer {
	margin-top: 60px;
}
div:is(#gform_page_1_4, #gform_page_1_10, #gform_page_1_12) .gform-page-footer {
	margin-top: 0;
}
:is(#gform_1, #gform_2) :is(button, input.button) {
	background: var(--hlt-blue);
	border: 0;
	border-radius: 10px;
	color: #fff;
	cursor: pointer;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	padding: 1em 2em;
	text-transform: uppercase;
	&:hover {
		background: var(--hlt-lightblue);
		border: 0;
		color: #fff;
	}
}
