/* MIBIOTA Quiz — front-end styles. Brand teal #2EA68F. Mobile-first. */
.mq {
	--mq-brand: #2EA68F;
	--mq-brand-d: #237a69;
	--mq-ink: #1a2b27;
	--mq-muted: #6b7c77;
	--mq-line: #e4efea;
	--mq-bg: #ffffff;
	max-width: 720px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--mq-ink);
	-webkit-text-size-adjust: 100%;
}
.mq * { box-sizing: border-box; }

.mq-card {
	background: var(--mq-bg);
	border: 1px solid var(--mq-line);
	border-radius: 16px;
	padding: 22px 18px;
	box-shadow: 0 10px 40px rgba(35, 122, 105, 0.06);
}
.mq-anim { animation: mq-fade .28s ease; }
@keyframes mq-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.mq-progress { height: 6px; background: var(--mq-line); border-radius: 99px; overflow: hidden; }
.mq-progress-bar { height: 100%; background: var(--mq-brand); border-radius: 99px; transition: width .55s cubic-bezier(.3,.7,.3,1); }
.mq-progress-label { font-size: 12px; color: var(--mq-muted); margin: 6px 0 18px; }

.mq-title { font-size: 21px; line-height: 1.28; margin: 0 0 10px; font-weight: 700; }
.mq-subtitle { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--mq-brand); margin-bottom: 8px; }
.mq-desc { color: var(--mq-muted); font-size: 15px; line-height: 1.55; margin: 0 0 18px; }

.mq-badge {
	display: inline-block; vertical-align: middle;
	font-size: 12px; font-weight: 600; color: var(--mq-brand-d);
	background: #e8f5f1; border-radius: 99px; padding: 3px 10px; margin-left: 4px; white-space: nowrap;
}

.mq-choices { display: grid; gap: 10px; margin: 16px 0 6px; }
.mq-choice {
	display: flex; align-items: center; gap: 12px;
	width: 100%; text-align: left; cursor: pointer;
	background: #fff; border: 1.5px solid var(--mq-line); border-radius: 12px;
	padding: 14px 14px; min-height: 56px; font-size: 16px; color: var(--mq-ink);
	transition: border-color .15s, background .15s, transform .05s;
	-webkit-tap-highlight-color: transparent;
}
.mq-choice:hover { border-color: var(--mq-brand); background: #f5fbf9; }
.mq-choice:active { transform: scale(.995); }
.mq-choice.is-active { border-color: var(--mq-brand); background: #e8f5f1; box-shadow: inset 0 0 0 1px var(--mq-brand); }
.mq-choice-img { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 10px; overflow: hidden; background: #f0f4f3; }
.mq-choice-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mq-choice-label { flex: 1 1 auto; line-height: 1.35; }
.mq-choice-key {
	flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
	border: 1px solid var(--mq-line); color: var(--mq-muted);
	font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.mq-choice.is-active .mq-choice-key { background: var(--mq-brand); color: #fff; border-color: var(--mq-brand); }

.mq-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.mq-btn {
	display: inline-block; cursor: pointer; -webkit-appearance: none; appearance: none;
	background: var(--mq-brand); color: #fff; border: none;
	border-radius: 10px; padding: 14px 22px; font-size: 16px; font-weight: 700;
	text-decoration: none; transition: background .15s, transform .05s; min-height: 48px;
	-webkit-tap-highlight-color: transparent;
}
.mq-btn:hover { background: var(--mq-brand-d); }
.mq-btn:active { transform: translateY(1px); }
.mq-btn[disabled] { opacity: .4; cursor: not-allowed; }
.mq-btn--sm { padding: 11px 16px; font-size: 14px; min-height: 0; }
.mq-hint { font-size: 13px; color: var(--mq-muted); }
.mq-skip { background: none; border: none; color: var(--mq-muted); cursor: pointer; font-size: 14px; text-decoration: underline; padding: 8px 0; }

.mq-input {
	width: 100%; border: 1.5px solid var(--mq-line); border-radius: 10px;
	padding: 14px 15px; font-size: 16px; margin-bottom: 12px; color: var(--mq-ink);
}
.mq-input:focus { outline: none; border-color: var(--mq-brand); }
.mq-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--mq-muted); margin: 4px 0 8px; line-height: 1.5; }
.mq-consent input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; }

/* Result */
.mq-result { min-height: 80px; }
.mq-spinner { width: 28px; height: 28px; border: 3px solid var(--mq-line); border-top-color: var(--mq-brand); border-radius: 50%; margin: 24px auto; animation: mq-spin .8s linear infinite; }
@keyframes mq-spin { to { transform: rotate(360deg); } }

.mq-notice { display: block; background: #fff8ec; border: 1px solid #f3dca6; border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; }
.mq-notice strong { display: block; color: #8a6100; margin-bottom: 4px; }
.mq-notice span { color: #6b5524; font-size: 14px; line-height: 1.5; }

.mq-products { display: grid; gap: 14px; margin-top: 16px; }
.mq-prod { display: flex; gap: 14px; border: 1px solid var(--mq-line); border-radius: 14px; padding: 14px; align-items: center; }
.mq-prod-img { flex: 0 0 auto; width: 84px; height: 84px; border-radius: 14px; overflow: hidden; background: #f0f4f3; }
.mq-prod-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mq-prod-img--ph { background: repeating-linear-gradient(45deg, #f0f4f3, #f0f4f3 8px, #e9efed 8px, #e9efed 16px); }
.mq-prod-body { flex: 1 1 auto; min-width: 0; }
.mq-prod-title { font-weight: 700; font-size: 17px; }
.mq-prod-reason { color: var(--mq-muted); font-size: 14px; margin: 4px 0; line-height: 1.5; }
.mq-prod-meta { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; flex-wrap: wrap; }
.mq-price { font-weight: 700; color: var(--mq-ink); }
.mq-stock { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 2px 9px; }
.mq-stock--in { background: #e8f5f1; color: var(--mq-brand-d); }
.mq-stock--out { background: #fdecec; color: #b3322b; }

/* Add-to-cart row: quantity stepper + AJAX button. */
.mq-atc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mq-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--mq-line); border-radius: 10px; overflow: hidden; flex: 0 0 auto; height: 42px; }
.mq-qty-btn {
	width: 36px; height: 100%; border: none; background: #f4f7f6; color: var(--mq-ink);
	font-size: 20px; line-height: 1; cursor: pointer; -webkit-appearance: none; appearance: none;
	display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.mq-qty-btn:hover { background: #e8efed; }
.mq-qty-input {
	width: 44px; height: 100%; border: none; text-align: center; font-size: 15px; font-weight: 700;
	color: var(--mq-ink); background: #fff; -moz-appearance: textfield; padding: 0;
}
.mq-qty-input:focus { outline: none; }
.mq-qty-input::-webkit-outer-spin-button,
.mq-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Button needs to host the inline spinner without reflowing. */
.mq-atc { position: relative; flex: 1 1 auto; text-align: center; }
.mq-atc-spin { display: none; }
.mq-atc.is-loading { pointer-events: none; }
.mq-atc.is-loading .mq-atc-label { visibility: hidden; }
.mq-atc.is-loading .mq-atc-spin {
	display: block; position: absolute; top: 50%; left: 50%; width: 18px; height: 18px;
	margin: -9px 0 0 -9px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
	border-radius: 50%; animation: mq-spin .7s linear infinite;
}
.mq-atc.is-added { background: var(--mq-brand-d); cursor: default; }
.mq-atc.is-added:hover { background: var(--mq-brand-d); }

.mq-safety { background: #fff8ec; border: 1px solid #f3dca6; border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.mq-safety h3 { margin: 0 0 8px; color: #8a6100; }
.mq-safety p { margin: 0; color: #6b5524; }

.mq-error { background: #fdecec; color: #b3322b; padding: 10px 14px; border-radius: 8px; font-size: 14px; }

/* Phones: stack product media, full-width primary actions. */
@media (max-width: 560px) {
	.mq-prod { flex-direction: column; align-items: stretch; }
	.mq-prod-img { width: 100%; height: 180px; }
	.mq-actions { gap: 10px; }
	.mq-actions .mq-btn { width: 100%; text-align: center; }
	.mq-hint { display: none; }
	.mq-prod-cta .mq-btn { width: 100%; text-align: center; }
	.mq-atc-row { flex-wrap: nowrap; }
	.mq-atc { width: auto; }
}

/* Larger screens: roomier card. */
@media (min-width: 768px) {
	.mq-card { padding: 34px 40px; }
	.mq-title { font-size: 26px; }
}

/* Outcome result page (risk tiers etc.) */
.mq-outcome-body { margin: 0 0 14px; line-height: 1.65; }
.mq-outcome-body h3, .mq-outcome-body h4 { margin: 18px 0 6px; }
.mq-outcome-body p { margin: 0 0 10px; }
.mq-outcome-cta { margin: 16px 0; }
.mq-field-error { color: #c0392b; font-size: 14px; margin: 6px 0 0; }

/* Outcome visuals: animated gauge / custom image */
.mq-gauge { width: 190px; max-width: 60%; margin: 0 0 16px; }
.mq-gauge svg { width: 100%; height: auto; display: block; }
.mq-gauge-val { transition: stroke-dashoffset 1.3s cubic-bezier(.25,.75,.3,1); }
.mq-gauge-needle {
	transform: rotate(-90deg);
	transform-origin: 100px 100px;
	transition: transform 1.3s cubic-bezier(.25,.75,.3,1);
}
.mq-outcome-img { max-width: 240px; height: auto; border-radius: 12px; margin: 0 0 16px; display: block; }

/* Expandable "Warum fragen wir das?" info */
.mq-why { margin: 2px 0 14px; }
.mq-why-toggle {
	background: none; border: 0; padding: 0; cursor: pointer;
	color: var(--mq-brand); font-size: 14px; font-weight: 600;
}
.mq-why-toggle:hover { text-decoration: underline; }
.mq-why-text {
	margin-top: 8px; padding: 12px 14px; font-size: 14px; line-height: 1.6;
	background: rgba(46,166,143,.07); border-left: 3px solid var(--mq-brand); border-radius: 0 8px 8px 0;
	color: var(--mq-muted);
}

/* Sale price: old price struck through */
.mq-price-old { color: #9aa6a2; text-decoration: line-through; margin-right: 7px; font-weight: 400; font-size: 0.92em; }

/* ── Hover-color hardening ──────────────────────────────────────────────
   The theme styles a:hover / button:hover globally (red accent), which has
   higher specificity than .mq-btn etc. and recolours our button text on
   hover. Pin the text colour of every interactive quiz element explicitly. */
.mq-btn,
a.mq-btn,
.mq-btn:hover,
.mq-btn:focus,
.mq-btn:active,
a.mq-btn:hover,
a.mq-btn:focus,
a.mq-btn:active {
	color: #fff !important;
	text-decoration: none !important;
}
.mq-choice,
.mq-choice:hover,
.mq-choice:focus,
.mq-choice:active,
button.mq-choice:hover {
	color: var(--mq-ink, #1a2b27) !important;
	text-decoration: none !important;
}
.mq-skip:hover,
.mq-skip:focus {
	color: var(--mq-ink, #1a2b27) !important;
	text-decoration: underline !important;
}
.mq-why-toggle:hover,
.mq-why-toggle:focus {
	color: var(--mq-brand) !important;
}
.mq-prod-cta a.mq-btn:hover { color: #fff !important; }
