/* Quiz Component Styles */

/* Mobile-friendly input hiding override for style.css */
.section-quiz .wrapper_box .content_box .form_box .radio_box .item input {
	display: block !important;
	position: absolute !important;
	opacity: 0 !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	pointer-events: none !important;
}

/* Touch-friendly label styling */
.section-quiz .radio_box label,
.section-quiz .checkbox_box label {
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	user-select: none;
	-webkit-user-select: none;
}

/* Title Override - smaller size for better readability */
.section-quiz .content_box .title {
	font-size: 38px;
}

/* Progress Bar */
.quiz-progress {
	margin-bottom: 30px;
}
.quiz-progress__bar {
	width: 100%;
	height: 6px;
	background: rgba(255, 255, 255, 0.3);
	border-radius: 3px;
	overflow: hidden;
}
.quiz-progress__fill {
	height: 100%;
	background: #fff;
	border-radius: 3px;
	transition: width 0.3s ease;
}
.quiz-progress__text {
	display: block;
	margin-top: 10px;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.7);
}
.quiz-progress__current {
	font-weight: 700;
	color: #fff;
}

/* Quiz Screens */
.quiz-screens {
	position: relative;
}
.quiz-screen {
	display: none;
}
.quiz-screen.active {
	display: block;
	animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Checkbox Styles (extends radio) */
.section-quiz .checkbox_box {
	max-width: 570px;
	display: flex;
	justify-content: flex-start;
	align-items: center;
	flex-wrap: wrap;
	gap: 30px;
}
.section-quiz .checkbox_box .item {
	width: calc(100% / 2 - 30px / 2);
	position: relative;
}
.section-quiz .radio_box .item {
	position: relative;
}
.section-quiz .checkbox_box input {
	position: absolute !important;
	opacity: 0 !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	pointer-events: none !important;
}

/* Radio inputs - mobile-friendly hiding */
.section-quiz .radio_box input {
	position: absolute !important;
	opacity: 0 !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	pointer-events: none !important;
}
.section-quiz .checkbox_box input:checked + label .ico {
	background: #3D3D3D;
}
.section-quiz .checkbox_box input:checked + label .ico:before {
	opacity: 1;
}
.section-quiz .checkbox_box label {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 20px;
	cursor: pointer;
	transition: 0.2s;
}
.section-quiz .checkbox_box label:hover {
	opacity: 0.85;
}
.section-quiz .checkbox_box label .ico {
	display: block;
	position: relative;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: #fff;
	transition: 0.2s;
}
.section-quiz .checkbox_box label .ico:before {
	content: '';
	display: block;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 12px;
	height: 7px;
	border-left: 3px solid #fff;
	border-bottom: 3px solid #fff;
	transform: translate(-50%, -60%) rotate(-45deg);
	opacity: 0;
	transition: 0.2s;
}
.section-quiz .checkbox_box label .value {
	font-size: 22px;
	color: #fff;
	line-height: 1.2;
}

/* "Other" Option with Text Input */
.section-quiz .checkbox_box .item--other {
	width: 100%;
	flex-direction: column;
	align-items: flex-start;
}
.section-quiz .checkbox_box .item--other label {
	width: 100%;
}
.section-quiz .checkbox_box .item--other .other-input-box {
	display: none;
	width: 100%;
	margin-top: 15px;
	padding-left: 52px;
}
.section-quiz .checkbox_box .item--other input[type="checkbox"]:checked ~ .other-input-box {
	display: block;
}
.section-quiz .checkbox_box .item--other .other-input-box input {
	width: 100%;
	max-width: 400px;
	height: 48px;
	padding: 0 20px;
	border: none;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.9);
	font-size: 16px;
	color: #3D3D3D;
	font-family: inherit;
	box-sizing: border-box;
}
.section-quiz .checkbox_box .item--other .other-input-box input::placeholder {
	color: #A7A7A7;
}
.section-quiz .checkbox_box .item--other .other-input-box input:focus {
	outline: none;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Grid Layout for Problems (Screen 2) */
.quiz-options--grid {
	max-width: 100% !important;
	gap: 20px !important;
}
.quiz-options--grid .item {
	width: calc(100% / 2 - 20px / 2) !important;
}

/* 3 columns when image is hidden (more space) */
.section-quiz[data-screen="2"] .quiz-options--grid .item {
	width: calc(100% / 3 - 20px * 2 / 3) !important;
}
/* "Other" item spans full width */
.section-quiz[data-screen="2"] .quiz-options--grid .item--other {
	width: 100% !important;
}

/* Contact Form Styles */
.quiz-contact-form {
	max-width: 500px;
}
.quiz-contact-form .input_box {
	margin-bottom: 20px;
}
.quiz-contact-form .input_box label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.8);
	font-weight: 500;
}
.quiz-contact-form .input_box input,
.quiz-contact-form .input_box select {
	width: 100%;
	height: 56px;
	padding: 0 20px;
	border: none;
	border-radius: 12px;
	background: #fff;
	font-size: 16px;
	color: #3D3D3D;
	font-family: inherit;
	box-sizing: border-box;
	transition: 0.2s;
}
.quiz-contact-form .input_box input::placeholder {
	color: #A7A7A7;
}
.quiz-contact-form .input_box input:focus,
.quiz-contact-form .input_box select:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}
.quiz-contact-form .input_box input.error {
	box-shadow: 0 0 0 2px #e74c3c;
}
.quiz-contact-form .input_box .error-message {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	color: #fff;
	background: rgba(231, 76, 60, 0.8);
	padding: 4px 10px;
	border-radius: 4px;
}
.quiz-contact-form .input_box select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233D3D3D' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 15px center;
	padding-right: 45px;
	cursor: pointer;
}

.quiz-contact-form .attention {
	width: fit-content;
	max-width: 100%;
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 10px;
	padding: 10px 15px;
	border-radius: 50px;
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
	font-size: 14px;
	margin-top: 20px;
	box-sizing: border-box;
}
.quiz-contact-form .attention svg {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	fill: transparent;
	stroke: #fff;
	stroke-width: 1.25;
}
.quiz-contact-form .politic {
	margin-top: 15px;
	padding-left: 10px;
}

/* Final Screen Styles */
.quiz-final {
	text-align: center;
	padding: 40px 0;
	max-width: 700px;
	margin: 0 auto;
}
.quiz-final__icon {
	margin-bottom: 30px;
}
.quiz-final__icon svg {
	width: 80px;
	height: 80px;
}
.quiz-final .title {
	font-size: 48px !important;
	color: #fff !important;
	font-weight: 800 !important;
	text-transform: uppercase;
}
.quiz-final .subtitle {
	font-size: 20px !important;
	color: #fff !important;
	opacity: 0.9;
	max-width: 100% !important;
	margin: 20px auto 0 !important;
}
.quiz-final__order {
	margin-top: 25px;
	font-size: 18px;
	color: rgba(255, 255, 255, 0.7);
}
.quiz-final__order strong {
	color: #fff;
	font-weight: 800;
}

.quiz-final__phone-block {
	margin-top: 30px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	padding: 20px;
	display: inline-block;
}
.quiz-final__phone-block p {
	font-size: 16px;
	color: #fff;
	margin-bottom: 10px;
}
.quiz-final__phone-block .phone {
	font-size: 32px;
	font-weight: 800;
	color: #fff;
	text-decoration: none;
	transition: 0.2s;
}
.quiz-final__phone-block .phone:hover {
	color: #3D3D3D;
	background: #fff;
	padding: 5px 15px;
	border-radius: 8px;
}

.quiz-final__hours {
	margin-top: 15px;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.5);
}

/* Offers Section */
.quiz-offers {
	margin-top: 40px;
	padding: 0;
	background: transparent;
}
.quiz-offer {
	display: none;
	padding: 20px 30px;
	background: #fff;
	border-radius: 18px;
	margin-bottom: 15px;
	text-align: left;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
	transition: 0.3s;
}
.quiz-offer:hover {
	transform: translateY(-3px);
	box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.quiz-offer.active {
	display: block;
}
.quiz-offer__title {
	font-size: 18px;
	font-weight: 700;
	color: var(--black_color);
	margin-bottom: 6px;
}
.quiz-offer__text {
	font-size: 15px;
	color: var(--gray_text);
}

.quiz-final__actions {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	margin-top: 45px;
	flex-wrap: wrap;
}
.quiz-final__actions .btn {
	min-width: 280px;
	height: 64px !important;
	padding: 0 30px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	line-height: 1 !important;
	padding-bottom: 4px !important; /* Visual correction for the font shift */
}

/* Navigation Buttons */
.quiz-nav {
	margin-top: 35px;
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}
.quiz-nav .btn {
	min-width: 160px;
	height: 64px;
	padding: 0 35px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	line-height: 1;
	box-sizing: border-box;
}
.quiz-nav__prev {
	background: transparent !important;
	border: 2px solid #fff !important;
	color: #fff !important;
}
.quiz-nav__prev:hover {
	background: rgba(255, 255, 255, 0.15) !important;
}
.quiz-nav__next,
.quiz-nav__submit {
	background: #fff !important;
	color: #3D3D3D !important;
	border: none !important;
}
.quiz-nav__next:hover,
.quiz-nav__submit:hover {
	background: #f5f5f5 !important;
}
.quiz-nav__next[disabled],
.quiz-nav__submit[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}
.quiz-nav__submit {
	background: #3D3D3D !important;
	color: #fff !important;
}
.quiz-nav__submit:hover {
	background: #262626 !important;
}

/* Hide navigation on final screen */
.section-quiz[data-screen="6"] .quiz-nav {
	display: none;
}

/* Image transition */
.section-quiz .image_box {
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hide image on screens 2+ (better readability) */
.section-quiz[data-screen="2"] .image_box,
.section-quiz[data-screen="3"] .image_box,
.section-quiz[data-screen="4"] .image_box,
.section-quiz[data-screen="5"] .image_box,
.section-quiz[data-screen="6"] .image_box {
	opacity: 0;
	visibility: hidden;
	width: 0;
	overflow: hidden;
}

/* Expand content when image is hidden */
.section-quiz[data-screen="2"] .content_box,
.section-quiz[data-screen="3"] .content_box,
.section-quiz[data-screen="4"] .content_box,
.section-quiz[data-screen="5"] .content_box,
.section-quiz[data-screen="6"] .content_box {
	padding-right: 65px;
	max-width: 100%;
}

/* Conditional screen marker */
.quiz-screen--conditional {
	/* Same styles as regular screen, but may be skipped */
}

/* Urgent Pain Banner */
.quiz-urgent-banner {
	background: #3D3D3D;
	border-radius: 25px;
	padding: 30px;
	margin-bottom: 40px;
	text-align: center;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.quiz-urgent-banner__icon {
	margin-bottom: 15px;
}
.quiz-urgent-banner__title {
	font-size: 24px;
	font-weight: 700;
	color: #fff;
	margin-bottom: 8px;
}
.quiz-urgent-banner__text {
	font-size: 16px;
	color: rgba(255, 255, 255, 0.8);
	margin-bottom: 20px;
}
.quiz-urgent-banner__phone {
	display: inline-block;
	font-size: 28px;
	font-weight: 800;
	color: var(--action_color);
	text-decoration: none;
	padding: 12px 35px;
	background: #fff;
	border-radius: 100px;
	transition: 0.2s;
}
.quiz-urgent-banner__phone:hover {
	background: var(--hover_action_color);
	color: #3D3D3D;
}

/* Outside working hours message */
.quiz-final__callback-text.outside-hours {
	color: #EAD3AD;
}

/* ===== MOBILE RESPONSIVE ===== */

/* Tablet - 1100px */
@media screen and (max-width: 1100px) {
	.section-quiz .wrapper_box .image_box {
		display: none !important;
	}
	.section-quiz .wrapper_box .content_box {
		width: 100% !important;
		max-width: 100% !important;
		padding: 35px !important;
		padding-right: 35px !important;
		box-sizing: border-box !important;
	}
	/* 2 columns on tablet */
	.section-quiz .checkbox_box .item {
		width: calc(50% - 15px) !important;
	}
	.section-quiz[data-screen="2"] .quiz-options--grid .item {
		width: calc(50% - 10px) !important;
	}
}

/* Mobile - 600px */
@media screen and (max-width: 600px) {
	.section-quiz .wrapper_box .content_box {
		padding: 25px !important;
	}
	.section-quiz .content_box .title {
		font-size: 28px !important;
	}
	.section-quiz .content_box .subtitle {
		font-size: 15px !important;
	}
	/* 1 column on mobile */
	.section-quiz .checkbox_box {
		gap: 15px !important;
	}
	.section-quiz .checkbox_box .item {
		width: 100% !important;
	}
	.section-quiz .checkbox_box label .value {
		font-size: 18px !important;
	}
	.section-quiz[data-screen="2"] .quiz-options--grid .item {
		width: 100% !important;
	}
	.quiz-nav {
		flex-direction: column;
		align-items: stretch;
	}
	.quiz-nav .btn {
		width: 100%;
		min-width: 100%;
	}
}

/* Small mobile - 400px */
@media screen and (max-width: 400px) {
	.section-quiz .wrapper_box .content_box {
		padding: 20px !important;
	}
	.section-quiz .content_box .title {
		font-size: 24px !important;
	}
	.section-quiz .checkbox_box label .value {
		font-size: 16px !important;
	}
	.section-quiz .checkbox_box label .ico {
		width: 26px !important;
		height: 26px !important;
	}
}
