/* ==========================================================================
   Безплатният тест „Опознай тялото си по-добре“ (/bezplaten-test/): как
   работи, тестът по стъпки (страничната лента с напредъка, въпросите с
   отговори-хапчета, данните), благодарността. Общото - pages.css, полетата
   на формата - consult.css.
   ========================================================================== */

.nd-test-facts { list-style: none; margin: 0; padding: 0; }

/* как работи */
.nd-tp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 6px 0 0; padding: 0; list-style: none; }
.nd-tp-steps li { display: grid; gap: 6px; padding: 22px; border-radius: 24px; background: #fffdf8; box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -32px rgba(19, 35, 28, .45); }
.nd-tp-steps__n { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px; border-radius: 50%; font-weight: 650; color: var(--jade-950); background: var(--gold-grad) border-box; }
.nd-tp-steps li:nth-child(2) .nd-tp-steps__n { color: var(--gold-300); background: var(--jade-800); }
.nd-tp-steps b { font-size: 1.1rem; font-weight: 560; color: var(--ink); }
.nd-tp-steps li > span:last-child { font-size: .95rem; line-height: 1.55; color: var(--ink-2); }

/* --- тестът --- */
.nd-tp-test { padding: clamp(70px, 8vw, 110px) 0; background: radial-gradient(40% 50% at 100% 0%, rgba(233, 196, 120, .14), transparent 70%), radial-gradient(45% 50% at 0% 100%, rgba(110, 166, 144, .14), transparent 70%), linear-gradient(180deg, #f2eadb, var(--paper)); }
.nd-tp-test__head { max-width: 760px; margin-bottom: clamp(26px, 3vw, 40px); }
.nd-tp-test__head .nd-sv__title { margin-bottom: 10px; }
.nd-tp-test__note { margin: 0; color: var(--ink-2); }
.nd-tp-msg { margin: 0 0 18px; padding: 14px 18px; border-radius: 16px; background: #fffdf8; box-shadow: inset 4px 0 0 var(--jade-500), inset 0 0 0 1px var(--line); }
.nd-tp-msg.is-error { box-shadow: inset 4px 0 0 #b4473a, inset 0 0 0 1px var(--line); }

.nd-test[hidden] { display: none; }
.nd-test { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: clamp(22px, 3vw, 44px); align-items: start; }
.nd-test__side { position: sticky; top: calc(var(--bar-h) + 20px); display: grid; gap: 16px; padding: 22px; border-radius: 26px; color: #e9f0ec; background: linear-gradient(160deg, #13342a, #0b1b15); box-shadow: 0 30px 60px -36px rgba(9, 25, 19, .8); }
.nd-test__progress { display: grid; gap: 8px; }
.nd-test__progress span { position: relative; display: block; height: 8px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .12); }
.nd-test__progress i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--gold-grad); transition: width .6s var(--ease); }
.nd-test__progress b { font-size: .86rem; font-weight: 560; color: var(--gold-300); }
.nd-test__nav { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nd-test__nav li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 14px; font-size: .92rem; line-height: 1.3; color: #a9bbb2; cursor: pointer; transition: background-color .25s, color .25s; }
.nd-test__nav li:hover { background: rgba(255, 255, 255, .06); }
.nd-test__nav-ic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; font-size: 1.05rem; color: #c3d1c9; box-shadow: inset 0 0 0 1px rgba(230, 203, 140, .3); }
.nd-test__nav li.is-on { color: #fbf6ea; background: rgba(255, 255, 255, .08); }
.nd-test__nav li.is-on .nd-test__nav-ic { color: var(--jade-950); background: var(--gold-grad) border-box; box-shadow: none; }
.nd-test__nav li.is-done:not(.is-on) .nd-test__nav-ic { color: var(--gold-300); background: var(--jade-700); box-shadow: none; }
.nd-test__nav li.is-done:not(.is-on) { color: #dfe7e1; }
.nd-test__legal { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; margin: 0; padding-top: 14px; border-top: 1px solid rgba(230, 203, 140, .18); font-size: .78rem; line-height: 1.45; color: #a9bbb2; }
.nd-test__legal .nd-i { margin-top: 2px; color: var(--gold-300); }
.nd-test:not(.is-steps) .nd-test__side, .nd-test:not(.is-steps) .nd-test__btns > button[type="button"] { display: none; }
.nd-test:not(.is-steps) { grid-template-columns: minmax(0, 1fr); }

.nd-test__steps { min-width: 0; }
.nd-test__step { min-width: 0; margin: 0 0 18px; padding: clamp(22px, 2.8vw, 36px); border: 0; border-radius: 28px; background: #fffdf8; box-shadow: inset 0 0 0 1px var(--line), 0 26px 50px -36px rgba(19, 35, 28, .5); }
.nd-test__step[hidden] { display: none; }
.is-steps .nd-test__step { animation: tpIn .55s var(--ease); }
@keyframes tpIn { from { opacity: 0; transform: translateY(12px); } }
.nd-test__legend { display: grid; gap: 6px; float: left; width: 100%; margin: 0 0 18px; padding: 0; outline: none; }
.nd-test__legend + * { clear: both; }
.nd-test__k { font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-700); }
.nd-test__lt { display: flex; align-items: center; gap: 12px; font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 380; letter-spacing: -.015em; color: var(--ink); }
.nd-test__lt .nd-i { width: 40px; height: 40px; padding: 9px; border-radius: 50%; color: var(--gold-300); background: var(--jade-800); }

/* въпрос */
.nd-q { padding: 18px 0; border-top: 1px solid var(--line); scroll-margin: 120px; }
.nd-q:first-of-type { border-top: 0; padding-top: 4px; }
.nd-q__t { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; margin: 0 0 12px; font-size: 1.06rem; line-height: 1.45; color: var(--ink); }
.nd-q__t--sub { display: block; margin-bottom: 10px; font-size: .98rem; color: var(--ink-2); }
.nd-q__n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: .82rem; font-weight: 650; color: var(--gold-700); background: #f6efe2; }
.nd-q__opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-left: 40px; }
.nd-q__opts--hours { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nd-opt { position: relative; cursor: pointer; }
.nd-opt input { position: absolute; opacity: 0; pointer-events: none; }
.nd-opt span {
	display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 14px; border-radius: 999px; text-align: center;
	font-size: .94rem; font-weight: 500; line-height: 1.25; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px rgba(19, 35, 28, .16);
	transition: background-color .25s, color .25s, box-shadow .25s, transform .2s;
}
.nd-q__opts--hours .nd-opt span { justify-content: flex-start; border-radius: 16px; text-align: left; }
.nd-opt:hover span { box-shadow: inset 0 0 0 1px rgba(173, 129, 48, .6); }
.nd-opt input:checked + span { color: #fbf6ea; background: var(--jade-800); box-shadow: none; }
.nd-opt input:checked + span::before { content: ""; flex: none; width: 7px; height: 12px; margin: -3px 10px 0 0; border: solid var(--gold-300); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.nd-opt input:focus-visible + span { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.nd-opt:active span { transform: scale(.98); }
.nd-q.is-missing .nd-q__t { color: #a33c30; }
.nd-q.is-missing .nd-q__n { color: #fff; background: #b4473a; }
.nd-q.is-missing .nd-opt span { box-shadow: inset 0 0 0 1px rgba(180, 71, 58, .5); }
.nd-q__sub { margin: 14px 0 0 40px; padding: 14px 16px; border-radius: 18px; background: #f8f2e6; }
.nd-q__sub[hidden] { display: none; }
.nd-q__sub .nd-q__opts { padding-left: 0; }

.nd-test__err { margin: 6px 0 0; color: #a33c30; font-size: .92rem; font-weight: 500; }
.nd-test__err:empty { display: none; }
.nd-test__btns { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 18px; margin-top: 20px; }
.nd-test__back { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; padding: 10px 6px; border: 0; background: none; color: var(--jade-700); font: inherit; font-weight: 560; cursor: pointer; }
.nd-test__back .nd-i { transform: scaleX(-1); }
.nd-test__back:hover { text-decoration: underline; }

/* данните */
.nd-test__intro { margin: 0 0 22px; color: var(--ink-2); line-height: 1.65; }
.nd-call { margin-bottom: 18px; }
.nd-call legend { margin-bottom: 10px; }
.nd-call__opt { position: relative; display: block; margin: 0 0 10px; cursor: pointer; }
.nd-call__opt input { position: absolute; opacity: 0; pointer-events: none; }
.nd-call__opt > span { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px rgba(19, 35, 28, .16); transition: box-shadow .25s, background-color .25s; }
.nd-call__opt .nd-i { grid-row: span 2; width: 44px; height: 44px; padding: 11px; border-radius: 50%; color: var(--gold-700); background: #f6efe2; }
.nd-call__opt b { font-weight: 560; color: var(--ink); line-height: 1.35; }
.nd-call__opt small { font-size: .86rem; color: var(--muted); }
.nd-call__opt input:checked + span { background: #fffaf0; box-shadow: inset 0 0 0 2px var(--gold-500); }
.nd-call__opt input:checked + span .nd-i { color: var(--jade-950); background: var(--gold-grad) border-box; }
.nd-call__opt input:focus-visible + span { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.nd-call.is-invalid .nd-call__opt > span { box-shadow: inset 0 0 0 1px rgba(180, 71, 58, .5); }
.nd-test__send { flex: 1 1 260px; justify-content: space-between; }
.nd-test__after { margin: 16px 0 0; font-size: .88rem; color: var(--muted); }

/* благодарността */
.nd-test-done { display: grid; justify-items: center; gap: 14px; max-width: 640px; margin: 0 auto; padding: clamp(30px, 4vw, 50px); border-radius: 30px; text-align: center; background: #fffdf8; box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -40px rgba(19, 35, 28, .5); }
.nd-test-done[hidden] { display: none; }
.nd-test-done .nd-pair__yy { --s: 74px; animation: ndSpin 6s var(--ease) 1; }
.nd-test-done__t { margin: 0; font-size: 1.35rem; line-height: 1.4; color: var(--ink); outline: none; }
.nd-test-done__s { margin: 0; color: var(--muted); }
.nd-test-done__s a { color: var(--jade-700); font-weight: 600; }

/* „за всеки клиент“ - бутонът под картите */

/* --- отзивчивост --- */
@media (max-width: 1024px) {
	.nd-test { grid-template-columns: minmax(0, 1fr); }
	.nd-test__side { position: sticky; top: calc(var(--bar-h) - 6px); z-index: 5; gap: 10px; padding: 12px 14px; border-radius: 18px; }
	.nd-test__nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
	.nd-test__nav::-webkit-scrollbar { display: none; }
	.nd-test__nav li { flex: none; padding: 0; }
	.nd-test__nav li > span:last-child { display: none; }
	.nd-test__nav li.is-on > span:last-child { display: inline; padding-right: 10px; font-size: .86rem; }
	.nd-test__legal { display: none; }
	.nd-tp-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
	.nd-q__opts, .nd-q__opts--hours { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
	.nd-q__sub { margin-left: 0; }
	.nd-opt span { justify-content: flex-start; padding: 12px 16px; border-radius: 16px; text-align: left; }
	.nd-test__step { padding: 20px 16px; border-radius: 22px; }
	.nd-test__send { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.is-steps .nd-test__step, .nd-test-done .nd-pair__yy { animation: none; }
}
