.gp-quiz {
	--gp-quiz-red: #E90F0F;
	--gp-quiz-red-hover: #911c14;
	--gp-quiz-bg: #EFEFEF;
	--gp-quiz-text: #3C3C3B;
	--gp-quiz-muted: #9a9a9a;
	--gp-quiz-line: #FFFFFF;
	position: fixed;
	inset: 0;
	z-index: 10000010;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	font-family: Montserrat, sans-serif;
	overflow: hidden;
}

.gp-quiz.is-open {
	display: flex;
}

.gp-quiz__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
}
#gp-quiz-form {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.gp-quiz__step {
	flex-grow: 1;
}
.gp-quiz__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1000px;
	overflow: hidden;
	background: var(--gp-quiz-bg);
	border-radius: 20px;
	padding: 37px 40px 40px;
	box-sizing: border-box;
	min-height: 626px;
	display: flex;
	flex-direction: column;
}

.gp-quiz--lead .gp-quiz__dialog {
	padding-bottom: 0;
}

.gp-quiz__close {
	position: absolute;
	top: 12px;
	right: 15px;
	width: 35px;
	height: 35px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--gp-quiz-red);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gp-quiz__close:hover {
	color: var(--gp-quiz-red-hover);
}

.gp-quiz__head {
	margin-bottom: 30px;
}

.gp-quiz__title {
	margin: 5px 0 10px;
	font-size: 28px;
	line-height: 1;
	font-weight: 700;
	color: var(--gp-quiz-text);
}

.gp-quiz__subtitle {
	margin: 0;
	font-size: 18px;
	line-height: 1;
	font-weight: 500;
	color: var(--gp-quiz-text);
}

.gp-quiz__progress--bar {
	display: none;
	margin-bottom: 24px;
}

.gp-quiz__progress--tabs {
	margin-bottom: 30px;
}

.gp-quiz__tabs {
	display: flex;
	gap: 0;
}

.gp-quiz__tab {
	position: relative;
	flex: 1;
	margin: 0 40px 0;
	padding: 0 0 14px;
	font-size: 18px;
	line-height: 1;
	font-weight: 400;
	text-align: center;
	box-sizing: border-box;
}

.gp-quiz__tab::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 6px;
	border-radius: 999px;
	background: var(--gp-quiz-line);
}

.gp-quiz__tab:first-child {
	margin-left: 0;
}

.gp-quiz__tab:last-child {
	margin-right: 0;
}

.gp-quiz__tab.is-active {
	color: var(--gp-quiz-text);
	font-weight: 600;
}

.gp-quiz__tab.is-active::after {
	background: var(--gp-quiz-text);
}

.gp-quiz__progress-label {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 1;
	font-weight: 600;
	color: var(--gp-quiz-text);
	text-align: center;
}

.gp-quiz__bar {
	height: 6px;
	border-radius: 999px;
	background: #fff;
	overflow: hidden;
}

.gp-quiz__bar-fill {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--gp-quiz-text);
	transition: width 0.25s ease;
}

.gp-quiz__question {
	margin: 0 0 20px;
	font-size: 28px;
	line-height: 1;
	font-weight: 500;
	color: var(--gp-quiz-text);
}

.gp-quiz__step[hidden] {
	display: none !important;
}

.gp-quiz__options {
	display: grid;
	gap: 20px;
}

.gp-quiz__options--grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gp-quiz__option--wide {
	grid-column: 1 / 2;
}

.gp-quiz__options--stack {
	grid-template-columns: 1fr;
}

.gp-quiz__option {
	display: block;
	cursor: pointer;
	margin-bottom: 0;
}

.gp-quiz__option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.gp-quiz__option-box {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 20px;
	background: #fff;
	border-radius: 8px;
	box-sizing: border-box;
}

.gp-quiz__radio {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin-top: 2px;
	border: 1px solid #EFEFEF;
	border-radius: 50%;
	box-sizing: border-box;
	position: relative;
	background: #EFEFEF;
}

.gp-quiz__option input:checked + .gp-quiz__option-box .gp-quiz__radio {
	border-color: var(--gp-quiz-text);
}

.gp-quiz__option input:checked + .gp-quiz__option-box .gp-quiz__radio::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	margin: -5px 0 0 -5px;
	border-radius: 50%;
	background: var(--gp-quiz-text);
}

.gp-quiz__option-text {
	font-size: 18px;
	line-height: 1;
	font-weight: 400;
	color: var(--gp-quiz-text);
	opacity: 0.7;
}

.gp-quiz__option input:checked + .gp-quiz__option-box .gp-quiz__option-text {
	font-weight: 700;
}

.gp-quiz__field + .gp-quiz__field,
.gp-quiz__fields .gp-quiz__field + .gp-quiz__field {
	margin-top: 12px;
}

.gp-quiz__input {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	border: 0;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	font-family: inherit;
	font-size: 15px;
	color: var(--gp-quiz-text);
	box-sizing: border-box;
}

.gp-quiz__input::placeholder {
	color: var(--gp-quiz-muted);
}

.gp-quiz__input:focus {
	outline: 2px solid rgba(60, 60, 59, 0.25);
	outline-offset: 0;
}

.gp-quiz__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	/* margin-top: 28px; */
	flex-grow: 1;
}

.gp-quiz__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 300px;
	padding: 20px 50px;
	border: 0;
	border-radius: 999px;
	background: #C31718;
	color: #fff;
	font-family: inherit;
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
}

.gp-quiz__btn--back {
	min-width: auto;
	padding-left: 20px;
	padding-right: 20px;
	background: transparent;
	color: var(--gp-quiz-text);
	border: 1px solid var(--gp-quiz-line);
}

.gp-quiz__btn--back:hover {
	background: #fff;
}

.gp-quiz__btn[hidden] {
	display: none !important;
}

.gp-quiz--lead .gp-quiz__head,
.gp-quiz--lead [data-gp-quiz-progress],
.gp-quiz--lead [data-gp-quiz-actions] {
	display: none !important;
}

.gp-quiz__lead {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.gp-quiz__lead-main {
	flex: 1 1 auto;
	min-width: 0;
	padding-bottom: 40px;
}

.gp-quiz__lead-title {
	margin: 0 0 20px;
	font-size: 30px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--gp-quiz-text);
	/* font-family: Lato; */
}

.gp-quiz__lead-text {
	margin: 0 0 20px;
	font-size: 26px;
	line-height: 1.3;
	color: var(--gp-quiz-text);
}

.gp-quiz__lead-field {
	margin-bottom: 10px;
}

.gp-quiz__lead-label {
	display: block;
	margin-bottom: 10px;
	font-size: 16px;
	line-height: 1;
	font-weight: 500;
}

.gp-quiz__lead-input {
	width: 100%;
	max-width: 400px;
	padding: 20px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	font-family: inherit;
	font-size: 16px;
	line-height: 1;
	color: var(--gp-quiz-text);
	box-sizing: border-box;
}

.gp-quiz__lead-input::placeholder {
	color: var(--gp-quiz-text);
}

.gp-quiz__lead-input:focus {
	outline: none;
	outline-offset: 0;
}

.gp-quiz__btn--lead-submit {
	width: 100%;
	max-width: 400px;
	margin-bottom: 10px;
	font-weight: 700;
}

.gp-quiz__btn.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

.gp-quiz__form-error {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.35;
	color: var(--gp-quiz-red);
}

.gp-quiz__form-error[hidden] {
	display: none !important;
}

.gp-quiz__agree {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 36px;
	max-width: 450px;
	cursor: pointer;
}

.gp-quiz__agree input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.gp-quiz__agree-box {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	border: 2px solid #000000;
	border-radius: 4px;
	background: #fff;
	box-sizing: border-box;
	position: relative;
}

.gp-quiz__agree input:checked + .gp-quiz__agree-box {
	border-color: #DDDDDD;
	background: #fff;
}

.gp-quiz__agree input:checked + .gp-quiz__agree-box::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 5px;
	width: 5px;
	height: 9px;
	border: solid #000000;
	border-width: 0 1px 1px 0;
	transform: rotate(45deg);
}

.gp-quiz__agree-text {
	font-size: 14px;
	line-height: 1;
	color: var(--gp-quiz-text);
	font-weight: 400;
}

.gp-quiz__agree-text a {
	color: var(--gp-quiz-text);
	text-decoration: underline;
}

.gp-quiz__agree-text a:hover {
	color: var(--gp-quiz-red);
}

.gp-quiz__btn--dark {
	width: 100%;
	max-width: 400px;
	background: #3C3C3B;
	font-weight: 500;
}

.gp-quiz__lead-visual {
	flex: 0 0 42%;
	max-width: 454px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	pointer-events: none;
	user-select: none;
	align-content: flex-end;
}

.gp-quiz__lead-phone {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	object-fit: contain;
	object-position: right bottom;
	margin-bottom: -20px;
}

body.gp-quiz-open {
	overflow: hidden;
}


@media (max-width: 768px) {
	.gp-quiz {
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		padding: 12px;
		padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
	}

	.gp-quiz__dialog {
		flex: 0 0 auto;
		width: 100%;
		max-width: none;
		max-height: none;
		min-height: 0;
		margin: auto;
		overflow: visible;
		border-radius: 20px;
		padding: 16px 20px 20px;
	}

	#gp-quiz-form,
	.gp-quiz__step,
	.gp-quiz__step--lead .gp-quiz__lead {
		min-height: 0;
	}

	.gp-quiz__actions {
		position: sticky;
		bottom: 0;
		z-index: 2;
		margin-top: auto;
		padding-top: 16px;
		background: linear-gradient(180deg, rgba(239, 239, 239, 0) 0%, var(--gp-quiz-bg) 28%);
	}

	.gp-quiz--lead .gp-quiz__dialog {
		padding-bottom: 20px;
	}

	.gp-quiz--lead .gp-quiz__lead-main {
		padding-bottom: 13px;
	}

	.gp-quiz__lead {
		flex-direction: column;
		gap: 0;
	}

	.gp-quiz__lead-main {
		padding-bottom: 18px;
	}

	.gp-quiz__lead-title {
		font-size: 19px;
		margin: 0 0 10px;
	}

	.gp-quiz__lead-text {
		font-size: 18px;
		margin-bottom: 20px;
	}
	.gp-quiz__lead-label{
		font-size: 14px;
	}
	.gp-quiz__lead-input{
		padding: 16px 20px;
	}

	.gp-quiz__btn--lead-submit,
	.gp-quiz__btn--dark {
		max-width: none;
	}

	.gp-quiz__agree {
		max-width: none;
		margin: 0 0 22px;
	}
	.gp-quiz__agree-box{
		width: 15px;
		height: 15px;
	}
	.gp-quiz__agree input:checked + .gp-quiz__agree-box::after{
		top: 0px;
		left: 3px;
	}
	.gp-quiz__agree-text{
		font-size: 12px;
	}
	.gp-quiz__lead-visual {
		flex: 0 0 auto;
		max-width: 155px;
		width: 100%;
		justify-content: center;
		margin: 0 auto -20px;
	}

	.gp-quiz__lead-phone {
		max-width: 280px;
		margin: 0 auto;
		margin-bottom: 0;
	}

	.gp-quiz__close {
		top: 30px;
		right: 15px;
		width: 15px;
		height: 15px;
	}

	.gp-quiz__head {
		margin-bottom: 20px;
	}

	.gp-quiz__title {
		font-size: 16px;
		margin-bottom: 5px;
		margin-top: 0;
	}

	.gp-quiz__subtitle {
		font-size: 15px;
	}

	.gp-quiz__progress--tabs {
		display: none;
	}

	.gp-quiz__progress--bar {
		display: block;
		margin-bottom: 20px;
	}

	.gp-quiz__question {
		font-size: 16px;
		margin-bottom: 10px;
	}

	.gp-quiz__options--grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.gp-quiz__option--wide {
		grid-column: auto;
	}
	.gp-quiz__radio{
		width: 14px;
		height: 14px;
	}
	.gp-quiz__option input:checked + .gp-quiz__option-box .gp-quiz__radio::after{
		width: 6px;
		height: 6px;
		margin: -3px 0 0 -3px;
	}

	.gp-quiz__option-box {
		padding: 13px 30px 13px 20px;
		border-radius: 8px;
		gap: 15px;
	}

	.gp-quiz__option-text {
		font-size: 15px;
	}

	.gp-quiz__option input:checked + .gp-quiz__option-box .gp-quiz__option-text {
		color: var(--gp-quiz-text);
	}

	.gp-quiz__btn {
		width: 100%;
		min-width: 0;
		padding: 18px;
		font-size: 14px;
	}

	.gp-quiz__btn--back {
		width: auto;
		flex: 0 0 auto;
	}
}

@media (min-width: 769px) {
	.gp-quiz__progress--bar {
		display: none !important;
	}

	.gp-quiz,
	.gp-quiz__dialog {
		overflow: hidden;
	}
}
