@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=DM+Sans:ital,wght@0,400;0,500&display=swap');

/* ── Tokens ──────────────────────────────────────── */
:root {
	--mq-accent:        #B85C45;
	--mq-accent-bg:     #FAF0ED;
	--mq-accent-border: #C97060;
	--mq-text:          #1F1710;
	--mq-muted:         #6B645E;
	--mq-bg:            #F0EBE3;
	--mq-card:          #FFFFFF;
	--mq-border:        #D8D2CB;
	--mq-option-hover:  #FDF5F2;
	--mq-r:             14px;
	--mq-r-lg:          20px;
	--ff-title:         'Playfair Display', serif;
	--ff-body:          'DM Sans', sans-serif;
}

/* ── Wrapper ─────────────────────────────────────── */
.mq {
	font-family: var(--ff-body);
	background: var(--mq-bg);
	padding: 32px 16px 40px;
}

/* ── Card ────────────────────────────────────────── */
.mq .wpcf7,
.mq__result {
	background: var(--mq-card);
	border-radius: var(--mq-r-lg);
	max-width: 660px;
	margin: 0 auto;
	padding: 36px 40px 32px;
	box-sizing: border-box;
}

@media (max-width: 600px) {
	.mq .wpcf7,
	.mq__result {
		padding: 28px 20px 24px;
	}
}

/* ── Progress bar ────────────────────────────────── */
.mq__progress {
	display: flex;
	gap: 7px;
	max-width: 660px;
	margin: 0 auto 8px;
	padding: 0 40px;
	box-sizing: border-box;
}

@media (max-width: 600px) {
	.mq__progress { padding: 0 20px; }
}

.mq__bar {
	flex: 1;
	height: 6px;
	border-radius: 3px;
	background: var(--mq-border);
	transition: background .35s ease;
}

.mq__bar.is-active,
.mq__bar.is-done {
	background: var(--mq-accent);
}

.mq__counter {
	font-family: var(--ff-body);
	font-size: 13px;
	color: var(--mq-muted);
	max-width: 660px;
	margin: 0 auto 0;
	padding: 0 40px;
	box-sizing: border-box;
}

@media (max-width: 600px) {
	.mq__counter { padding: 0 20px; }
}

/* ── CF7 form-wrap ───────────────────────────────── */
.mq__form-wrap {
	max-width: 660px;
	margin: 0 auto;
}

/* CF7 adds .wpcf7 div — we style it as the card */
.mq .wpcf7 form {
	margin: 0;
}

/* ── Step sections ───────────────────────────────── */
/* Each .mq-step is a <div> wrapping <h2> + CF7 radio span */
.mq-step {
	display: none;
}

.mq-step.is-active {
	display: block;
	animation: mqIn .28s ease both;
}

.mq-step.is-out {
	animation: mqOut .18s ease both;
}

@keyframes mqIn {
	from { opacity: 0; transform: translateX(20px); }
	to   { opacity: 1; transform: translateX(0); }
}

@keyframes mqOut {
	from { opacity: 1; transform: translateX(0); }
	to   { opacity: 0; transform: translateX(-20px); }
}

/* ── Step title ──────────────────────────────────── */
.mq-step__title {
	font-family: var(--ff-title);
	font-size: clamp(22px, 4vw, 28px);
	font-weight: 700;
	color: var(--mq-text);
	margin: 18px 0 22px;
	line-height: 1.2;
}

/* ── CF7 radio group → styled rows ──────────────── */

/* Hide the native radio inputs completely */
.mq-step .wpcf7-radio input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

/* Each label = one row */
.mq-step .wpcf7-radio .wpcf7-list-item {
	display: block;
	margin: 0 0 10px !important;
}

.mq-step .wpcf7-radio .wpcf7-list-item:last-child {
	margin-bottom: 0 !important;
}

.mq-step .wpcf7-radio .wpcf7-list-item-label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 15px 18px;
	border: 1.5px solid var(--mq-border);
	border-radius: var(--mq-r);
	background: var(--mq-card);
	font-family: var(--ff-body);
	font-size: 15px;
	font-weight: 400;
	color: var(--mq-text);
	cursor: pointer;
	transition: border-color .18s, background .18s, color .18s;
	user-select: none;
}

/* arrow via ::after */
.mq-step .wpcf7-radio .wpcf7-list-item-label::after {
	content: '';
	display: block;
	width: 8px;
	height: 8px;
	border-right: 1.5px solid var(--mq-muted);
	border-top: 1.5px solid var(--mq-muted);
	transform: rotate(45deg);
	flex-shrink: 0;
	margin-left: 12px;
	transition: border-color .18s;
}

/* hover state */
.mq-step .wpcf7-radio .wpcf7-list-item-label:hover {
	border-color: var(--mq-accent-border);
	background: var(--mq-option-hover);
}

/* checked / selected state */
.mq-step .wpcf7-radio input[type="radio"]:checked + .wpcf7-list-item-label {
	border-color: var(--mq-accent);
	background: var(--mq-accent-bg);
	color: var(--mq-accent);
	font-weight: 500;
}

.mq-step .wpcf7-radio input[type="radio"]:checked + .wpcf7-list-item-label::after {
	border-color: var(--mq-accent);
}

/* ── Back button ─────────────────────────────────── */
.mq-back {
	display: none;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	padding: 0;
	margin-top: 20px;
	font-family: var(--ff-body);
	font-size: 14px;
	color: var(--mq-muted);
	cursor: pointer;
	transition: color .18s;
}

.mq-back.is-visible {
	display: inline-flex;
}

.mq-back:hover {
	color: var(--mq-text);
}

.mq-back svg {
	flex-shrink: 0;
}

/* ── CF7 submit — only visible on last step ──────── */
.wpcf7-submit {
	display: none;
}

.mq-step.is-last-active .wpcf7-submit,
.mq--last .wpcf7-submit {
	display: block;
	width: 100%;
	margin-top: 24px;
	padding: 15px;
	background: var(--mq-accent);
	color: #fff;
	border: none;
	border-radius: 50px;
	font-family: var(--ff-body);
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: opacity .18s;
}

.mq--last .wpcf7-submit:hover {
	opacity: .9;
}

/* ── CF7 validation messages ─────────────────────── */
.wpcf7-not-valid-tip {
	font-size: 12px;
	color: var(--mq-accent);
	margin-top: 4px;
}

.wpcf7-response-output {
	display: none !important;
}

/* ── Result screen ───────────────────────────────── */
.mq__result {
	text-align: center;
	animation: mqIn .35s ease both;
}

.mq__result[hidden] {
	display: none;
}

.mq__result-icon {
	width: 60px;
	height: 60px;
	background: var(--mq-accent-bg);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 18px;
}

.mq__result-title {
	font-family: var(--ff-title);
	font-size: clamp(22px, 4vw, 30px);
	font-weight: 700;
	color: var(--mq-text);
	margin: 0 0 10px;
}

.mq__result-sub {
	font-size: 15px;
	color: var(--mq-muted);
	line-height: 1.6;
	margin: 0 0 24px;
}

.mq__result-box {
	background: var(--mq-accent-bg);
	border-radius: var(--mq-r);
	padding: 20px 24px;
	text-align: left;
	margin-bottom: 14px;
}

.mq__result-box-label {
	font-size: 14px;
	font-weight: 500;
	color: var(--mq-text);
	margin: 0 0 12px;
}

.mq__result-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mq__result-list li {
	font-size: 14px;
	color: var(--mq-text);
	padding-left: 18px;
	position: relative;
	line-height: 1.5;
}

.mq__result-list li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 7px;
	width: 7px;
	height: 7px;
	background: var(--mq-accent);
	border-radius: 50%;
}

.mq__result-promo {
	background: #EDE8E2;
	border-radius: var(--mq-r);
	padding: 18px 20px;
	font-size: 14px;
	color: var(--mq-muted);
	line-height: 1.5;
	margin-bottom: 24px;
}

.mq__result-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.mq__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	border-radius: 50px;
	font-family: var(--ff-body);
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	border: none;
	transition: opacity .18s, transform .12s;
}

.mq__btn:active { transform: scale(.97); }

.mq__btn--primary {
	background: var(--mq-accent);
	color: #fff;
	min-width: 200px;
}

.mq__btn--primary:hover { opacity: .9; }

.mq__btn--secondary {
	background: var(--mq-card);
	color: var(--mq-text);
	border: 1.5px solid var(--mq-border);
}

.mq__btn--secondary:hover {
	border-color: var(--mq-accent-border);
	background: var(--mq-option-hover);
}

.mq__disclaimer {
	font-size: 12px;
	color: var(--mq-muted);
	line-height: 1.5;
	margin: 0 auto;
	max-width: 460px;
}
