/* "Find my peptide" quiz (popup 480) — DS v0.5 tokens. Markup comes from js/elivena-quiz.js. */

.brx-popup[data-popup-id="480"] .brx-popup-content {
	max-width: 56rem;
	padding: 2rem 2.8rem 2.4rem;
	overflow-y: auto;
}
.brx-popup[data-popup-id="480"] #brxe-qzwrap { width: 100%; }

.elq {
	--elq-ink: var(--c-ink, #0D0926);
	--elq-muted: var(--c-muted, #48436B);
	--elq-prism: var(--c-prism, #6C64DE);
	--elq-veil: var(--c-veil, #F1EBFA);
	--elq-line: var(--c-border, rgba(0, 0, 112, .12));
	--elq-dark: var(--c-darkroom, #0D0926);
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: min(60rem, calc(90vh - 4.4rem));
	color: var(--elq-ink);
	text-align: left;
}

/* top bar: back · ribbon · close */
.elq__top { display: grid; grid-template-columns: 3.6rem 1fr 3.6rem; align-items: center; gap: .8rem; }
.elq__back, .elq__close {
	display: inline-flex; align-items: center; justify-content: center;
	width: 3.6rem; height: 3.6rem; padding: 0; border: 0; border-radius: 50%;
	background: transparent; color: var(--elq-ink); cursor: pointer;
}
.elq__back:hover, .elq__close:hover { background: var(--elq-veil); }
.elq__back svg, .elq__close svg { width: 2rem; height: 2rem; }
.elq__ribbon {
	justify-self: center; margin: 0; padding: .5rem 1.4rem; border-radius: 999px;
	background: var(--elq-veil); color: var(--c-violet-dark, #3D2C96);
	font-size: 1.3rem; font-weight: 600; line-height: 1.3; text-align: center;
}
.elq__bar { height: .4rem; margin: 1.4rem 0 2.8rem; border-radius: 999px; background: var(--elq-veil); overflow: hidden; }
.elq__bar span { display: block; height: 100%; border-radius: inherit; background: var(--grad-signal, var(--elq-prism)); transition: width .35s ease; }

/* question */
.elq__body { flex: 1 1 auto; display: flex; flex-direction: column; }
.elq__eyebrow { margin: 0 0 .8rem; font-size: 1.2rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--elq-prism); }
.elq__h {
	margin: 0; font-size: clamp(2.4rem, 2rem + 1vw, 3rem); line-height: 1.18; font-weight: 600; letter-spacing: -.02em;
	min-height: 2.36em; /* two lines reserved so options start at the same height */
	color: var(--elq-ink); outline: none;
}
.elq__h em { font-style: normal; color: var(--elq-prism); }
.elq__s { margin: .8rem 0 2.4rem; font-size: 1.6rem; line-height: 1.5; color: var(--elq-muted); min-height: 3em; }
.elq__s em { font-style: normal; font-weight: 600; color: var(--elq-ink); }
.elq__s.is-reaction { color: var(--c-aperture, #0E7C74); font-weight: 500; }

/* options */
.elq__opts { display: flex; flex-direction: column; gap: 1rem; }
.elq-opt {
	display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
	width: 100%; min-height: 5.4rem; padding: 1.2rem 1.6rem; margin: 0;
	border: 1px solid var(--elq-line); border-radius: var(--radius-form, 12px);
	background: #fff; color: var(--elq-ink); font: inherit; font-size: 1.6rem; font-weight: 500; line-height: 1.3; text-align: left;
	cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.elq-opt:hover:not(:disabled) { border-color: var(--elq-prism); }
.elq-opt:focus-visible { outline: 2px solid var(--elq-prism); outline-offset: 2px; }
.elq-opt.is-on { border-color: var(--elq-prism); background: var(--elq-veil); box-shadow: inset 0 0 0 1px var(--elq-prism); }
.elq-opt:disabled { opacity: .45; cursor: not-allowed; }
.elq-opt__i {
	flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
	width: 2.2rem; height: 2.2rem; border: 1.5px solid var(--elq-line); border-radius: 50%; color: transparent; transition: all .15s;
}
.elq-opt--multi .elq-opt__i { border-radius: .6rem; }
.elq-opt__i svg { width: 1.4rem; height: 1.4rem; }
.elq-opt.is-on .elq-opt__i { background: var(--elq-prism); border-color: var(--elq-prism); color: #fff; }

/* calculating */
.elq__calc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.4rem; }
.elq__calc li { display: flex; align-items: center; gap: 1.2rem; font-size: 1.6rem; color: var(--elq-muted); opacity: .4; transition: opacity .25s; }
.elq__calc li.is-run { opacity: 1; color: var(--elq-ink); }
.elq__spin { position: relative; flex: 0 0 auto; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 2px solid var(--elq-veil); }
.elq__calc li.is-run:not(.is-done) .elq__spin { border-top-color: var(--elq-prism); animation: elq-spin .7s linear infinite; }
.elq__calc li.is-done .elq__spin { background: var(--elq-prism); border-color: var(--elq-prism); }
.elq__calc li.is-done .elq__spin::after { content: ""; position: absolute; left: .6rem; top: .25rem; width: .5rem; height: 1rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes elq-spin { to { transform: rotate(360deg); } }

/* email */
.elq__form { display: flex; flex-direction: column; gap: 1.2rem; }
.elq__lbl { font-size: 1.3rem; font-weight: 600; color: var(--elq-ink); }
.elq__input {
	width: 100%; height: 5.4rem; padding: 0 1.6rem; border: 1px solid var(--elq-line); border-radius: var(--radius-form, 12px);
	background: #fff; color: var(--elq-ink); font: inherit; font-size: 1.6rem;
}
.elq__input:focus { outline: none; border-color: var(--elq-prism); box-shadow: 0 0 0 3px rgba(108, 100, 222, .18); }
.elq__input[aria-invalid="true"] { border-color: #B42318; }
.elq__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.elq__err { margin: 0; font-size: 1.4rem; color: #B42318; }
.elq__consent { margin: .4rem 0 0; font-size: 1.2rem; line-height: 1.5; color: var(--c-ink-3, #6F6A8C); }
.elq__consent a { color: inherit; text-decoration: underline; }

/* match */
.elq__photo {
	display: flex; align-items: center; justify-content: center; height: 22rem; margin-top: .4rem;
	border-radius: var(--radius-card, 18px); background: var(--media-ground, var(--elq-veil));
}
.elq__photo img { max-height: 19rem; width: auto; max-width: 80%; object-fit: contain; }

/* footer: button + research-use line, always in the same place */
.elq__foot { margin-top: 2.4rem; display: flex; flex-direction: column; gap: 1rem; }
.elq-cta {
	display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 5.4rem; padding: 0 2.4rem;
	border: 0; border-radius: var(--radius-button, 9999px); background: var(--elq-dark); color: #fff;
	font: inherit; font-size: 1.6rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .15s, opacity .15s;
}
.elq-cta:hover:not(:disabled) { background: var(--c-violet-dark, #3D2C96); color: #fff; }
.elq-cta:focus-visible { outline: 2px solid var(--elq-prism); outline-offset: 3px; }
.elq-cta:disabled { opacity: .35; cursor: not-allowed; }
.elq__form .elq-cta { margin-top: .4rem; }
.elq__ruo { margin: 0; font-size: 1.2rem; color: var(--c-ink-3, #6F6A8C); text-align: center; }

/* phones: full screen sheet */
@media (max-width: 600px) {
	.brx-popup[data-popup-id="480"] { padding: 0 !important; }
	.brx-popup[data-popup-id="480"] .brx-popup-content {
		max-width: 100%; width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0 !important; padding: 1.2rem 1.6rem 1.6rem;
	}
	.elq { min-height: calc(100dvh - 2.8rem); }
	.elq__bar { margin: 1rem 0 2rem; }
	.elq__s { margin-bottom: 1.8rem; }
	.elq__foot { position: sticky; bottom: 0; padding-top: 1.2rem; background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0, #fff 1.2rem); }
	.elq__photo { height: 18rem; }
}
@media (prefers-reduced-motion: reduce) {
	.elq__bar span, .elq-opt, .elq__calc li { transition: none; }
	.elq__calc li.is-run:not(.is-done) .elq__spin { animation: none; }
}

/* product page tag */
.elq-tag {
	display: flex; align-items: center; gap: .8rem; margin: 0 0 1.4rem; padding: 1rem 1.4rem;
	border-radius: var(--radius-form, 12px); background: var(--c-mint, #DDF1EE); color: var(--c-mint-dark, #0B6A63);
	font-size: 1.4rem; line-height: 1.4;
}
.elq-tag strong { font-weight: 700; }
.elq-tag__dot { flex: 0 0 auto; width: .8rem; height: .8rem; border-radius: 50%; background: currentColor; }
