/* Квиз подбора ПК в 2 шага (15.11.2026) — [qp_lead_quiz2], includes/class-quiz2.php. Палитра сайта: плиты #262626/#222, контролы #333, акцент #d51c32. */
.qp-q2 {
    --q2-plate: var(--qp-plate, linear-gradient(180deg, #262626 0%, #222222 30%));
    --q2-plate-hover: var(--qp-plate-hover, linear-gradient(180deg, #2e2e2e 0%, #262626 30%));
    --q2-edge: inset 0 0 0 1px rgba(255, 255, 255, .04);
    --q2-control: var(--qp-control, #333333);
    --q2-control-hover: var(--qp-control-hover, #404040);
    --q2-accent: var(--qp-accent, #d51c32);
    --q2-muted: #a9a9a9;
    --q2-radius: 22px;
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 0 72px;
    color: #fff;
    font-family: var(--qp-font-primary, "Roboto"), Arial, sans-serif;
    box-sizing: border-box;
}
.qp-q2 *, .qp-q2 *::before, .qp-q2 *::after { box-sizing: border-box; }
.qp-q2__hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }

/* шапка */
.qp-q2__head { text-align: center; margin: 0 0 40px; }
.qp-q2__title { margin: 0 0 12px; font-size: clamp(32px, 3.4vw, 48px); line-height: 1.1; font-weight: 700; color: #fff; }
.qp-q2__lead { margin: 0 auto; max-width: 640px; font-size: 18px; line-height: 1.45; color: var(--q2-muted); }
.qp-q2__steps { display: inline-flex; align-items: center; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.qp-q2__steps li { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: #7d7d7d; }
.qp-q2__steps li + li::before { content: ''; width: 40px; height: 2px; margin-right: 4px; background: rgba(255, 255, 255, .14); border-radius: 2px; }
.qp-q2__steps li span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--q2-control); color: #bdbdbd; font-weight: 700; font-size: 14px; }
.qp-q2__steps li.is-active { color: #fff; }
.qp-q2__steps li.is-active span { background: var(--q2-accent); color: #fff; }
.qp-q2__steps li.is-done span { background: rgba(213, 28, 50, .25); color: #fff; }
.qp-q2__steps li.is-done + li::before, .qp-q2__steps li.is-active + li.is-active::before { background: var(--q2-accent); }

/* шаги */
.qp-q2__step { display: none; }
.qp-q2__step.is-active { display: block; animation: qpQ2In .25s ease; }
@keyframes qpQ2In { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.qp-q2__q { margin: 0 0 22px; }
.qp-q2__q--second { margin-top: 48px; }
.qp-q2__q-title { margin: 0 0 6px; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.2; font-weight: 700; color: #fff; }
.qp-q2__q-hint { margin: 0; font-size: 16px; color: #8f8f8f; }

/* карточки сценариев */
.qp-q2__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.qp-q2__card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 100%;
    padding: 26px 26px 24px;
    border-radius: var(--q2-radius);
    background: var(--q2-plate);
    box-shadow: var(--q2-edge);
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.qp-q2__card:hover { background: var(--q2-plate-hover); }
.qp-q2__card input, .qp-q2__pcard input, .qp-q2__seg input, .qp-q2__consent input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.qp-q2__card.is-checked, .qp-q2__card:has(input:checked) { box-shadow: inset 0 0 0 2px var(--q2-accent); background: linear-gradient(180deg, #2c2224 0%, #241f20 40%); }
.qp-q2__card:has(input:focus-visible), .qp-q2__pcard:has(input:focus-visible) { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: 3px; }
.qp-q2__icon { display: block; width: 64px; height: 64px; }
.qp-q2__icon svg { display: block; width: 64px; height: 64px; }
.qp-q2__badge {
    position: absolute; top: 26px; right: 60px;
    padding: 6px 14px; border-radius: 999px;
    font-size: 14px; line-height: 1.2; color: #ff4d62;
    background: rgba(213, 28, 50, .12); box-shadow: inset 0 0 0 1px rgba(213, 28, 50, .35);
}
.qp-q2__card-body { display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.qp-q2__card-title { font-size: 21px; line-height: 1.25; font-weight: 700; color: #fff; }
.qp-q2__card-text { font-size: 16px; line-height: 1.45; color: var(--q2-muted); }
.qp-q2__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.qp-q2__tag { padding: 7px 14px; border-radius: 8px; background: var(--q2-control); font-size: 15px; line-height: 1.2; color: #d7d7d7; }
.qp-q2__check {
    position: absolute; top: 22px; right: 22px;
    width: 26px; height: 26px; border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18);
    transition: background .2s ease, box-shadow .2s ease;
}
.qp-q2__card.is-checked .qp-q2__check, .qp-q2__card:has(input:checked) .qp-q2__check {
    background: var(--q2-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
    box-shadow: none;
}

/* 8 карточек — 2 ряда по 4 (15.11 вечер); ≤1100 px — 2 в ряд, телефон — списком (правила ниже) */
.qp-q2__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.qp-q2__grid--4 .qp-q2__card { gap: 14px; padding: 22px 20px 20px; border-radius: 20px; }
.qp-q2__grid--4 .qp-q2__icon, .qp-q2__grid--4 .qp-q2__icon svg { width: 52px; height: 52px; }
.qp-q2__grid--4 .qp-q2__card-title { font-size: 19px; padding-right: 8px; }
.qp-q2__grid--4 .qp-q2__card-text { font-size: 15px; }
.qp-q2__grid--4 .qp-q2__check { top: 20px; right: 18px; width: 24px; height: 24px; }
.qp-q2__grid--4 .qp-q2__tag { padding: 6px 12px; font-size: 14px; }
/* плашка «Популярный выбор» — на верхней кромке карточки: в узкой карточке рядом с иконкой ей нет места */
.qp-q2__grid--4 .qp-q2__badge { top: -13px; right: auto; left: 20px; padding: 5px 12px; font-size: 13px; background: #2a171b; }
.qp-q2__grid--4 { padding-top: 6px; }

/* строки под карточками: «Выбираю в подарок», «Не разбираюсь — подберите за меня» — каждая во всю ширину (владелец 15.11) */
.qp-q2__help-row { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
.qp-q2__card--help { flex-direction: row; align-items: center; gap: 20px; padding: 20px 60px 20px 24px; }
.qp-q2__card--help .qp-q2__icon, .qp-q2__card--help .qp-q2__icon svg { width: 52px; height: 52px; flex: none; }
.qp-q2__card--help .qp-q2__card-body { gap: 4px; }
.qp-q2__card--help .qp-q2__tags { margin-right: 44px; flex: none; }
.qp-q2__card--help .qp-q2__check { top: 50%; margin-top: -13px; }

/* «Что для вас важнее?» */
.qp-q2__prio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.qp-q2__pcard {
    position: relative; display: flex; align-items: flex-start; gap: 16px;
    padding: 22px 24px; border-radius: 18px;
    background: var(--q2-plate); box-shadow: var(--q2-edge);
    cursor: pointer; transition: background .2s ease, box-shadow .2s ease;
}
.qp-q2__pcard:hover { background: var(--q2-plate-hover); }
.qp-q2__pcard.is-checked, .qp-q2__pcard:has(input:checked) { box-shadow: inset 0 0 0 2px var(--q2-accent); background: linear-gradient(180deg, #2c2224 0%, #241f20 40%); }
.qp-q2__dot { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22); transition: box-shadow .2s ease; }
.qp-q2__pcard.is-checked .qp-q2__dot, .qp-q2__pcard:has(input:checked) .qp-q2__dot { box-shadow: inset 0 0 0 7px var(--q2-accent); }
.qp-q2__pcard-body { display: flex; flex-direction: column; gap: 6px; }
.qp-q2__pcard-title { font-size: 19px; line-height: 1.25; font-weight: 700; color: #fff; }
.qp-q2__pcard-text { font-size: 15px; line-height: 1.45; color: var(--q2-muted); }

/* навигация */
.qp-q2__nav { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 32px; }
.qp-q2__error { flex: 1 1 auto; margin: 0; min-height: 1px; font-size: 15px; line-height: 1.4; color: #ff6577; text-align: right; }
.qp-q2__btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 56px; padding: 0 44px; border: 0; border-radius: 10px;
    background: var(--q2-accent); color: #fff;
    font: inherit; font-size: 18px; font-weight: 500; cursor: pointer;
    transition: background .2s ease;
}
.qp-q2__btn:hover { background: rgba(213, 28, 50, .7); }
.qp-q2__btn--ghost { background: var(--q2-control); padding: 0 28px; }
.qp-q2__btn--ghost:hover { background: var(--q2-control-hover); }

/* шаг 2 */
.qp-q2__panel { max-width: 860px; padding: 32px; border-radius: var(--q2-radius); background: var(--q2-plate); box-shadow: var(--q2-edge); }
.qp-q2__summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 26px; padding: 14px 18px; border-radius: 12px; background: rgba(255, 255, 255, .04); font-size: 16px; }
.qp-q2__summary-label { color: #8f8f8f; }
.qp-q2__summary-value { font-weight: 700; color: #fff; }
.qp-q2__link { margin-left: auto; padding: 0; border: 0; background: none; color: #ff4d62; font: inherit; font-size: 15px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.qp-q2__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.qp-q2__field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.qp-q2__field[hidden] { display: none; }
.qp-q2__field--wide { grid-column: 1 / -1; }
.qp-q2__field > span, .qp-q2__field > legend { padding: 0; font-size: 15px; color: #bdbdbd; }
.qp-q2__field > legend { margin-bottom: 8px; }
.qp-q2__field input, .qp-q2__field textarea {
    width: 100%; min-height: 52px; padding: 14px 16px;
    border: 1px solid transparent; border-radius: 10px;
    background: var(--q2-control); color: #fff;
    font: inherit; font-size: 17px; outline: none;
    transition: border-color .2s ease;
}
.qp-q2__field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.qp-q2__field input::placeholder, .qp-q2__field textarea::placeholder { color: #7d7d7d; }
.qp-q2__field input:focus, .qp-q2__field textarea:focus { border-color: rgba(213, 28, 50, .8); }
.qp-q2__seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.qp-q2__seg label { position: relative; display: block; cursor: pointer; }
.qp-q2__seg span {
    display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 10px;
    border-radius: 10px; background: var(--q2-control); color: #d7d7d7; font-size: 16px;
    transition: background .2s ease, box-shadow .2s ease, color .2s ease;
}
.qp-q2__seg label:hover span { background: var(--q2-control-hover); }
.qp-q2__seg input:checked + span { color: #fff; background: rgba(213, 28, 50, .16); box-shadow: inset 0 0 0 2px var(--q2-accent); }
.qp-q2__seg input:focus-visible + span { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: 2px; }
.qp-q2__consent { grid-column: 1 / -1; position: relative; display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.45; color: #9a9a9a; cursor: pointer; }
.qp-q2__consent a { color: #d7d7d7; text-decoration: underline; text-underline-offset: 2px; }
.qp-q2__box { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 6px; background: var(--q2-control); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.qp-q2__consent input:checked + .qp-q2__box {
    background: var(--q2-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
    box-shadow: none;
}
.qp-q2__consent input:focus-visible + .qp-q2__box { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: 2px; }
.qp-q2__panel .qp-q2__nav { margin-top: 28px; }
/* Trade-In на шаге 2 (15.11) */
.qp-q2__tradein { padding: 16px 18px; border-radius: 12px; background: rgba(255, 255, 255, .04); color: #a9a9a9; }
.qp-q2__tradein strong { font-size: 16px; font-weight: 700; color: #fff; }
.qp-q2__panel .qp-q2__btn--ghost { order: -1; }

/* загрузка */
.qp-q2__loader { position: fixed; inset: 0; z-index: 9999; display: none; place-items: center; background: rgba(10, 10, 12, .72); }
.qp-q2__loader.is-visible { display: grid; }
.qp-q2__loader-box { display: flex; flex-direction: column; gap: 14px; min-width: 260px; padding: 24px 28px; border-radius: 16px; background: #222; color: #fff; font-size: 17px; text-align: center; }
.qp-q2__loader-bar { display: block; height: 4px; overflow: hidden; border-radius: 4px; background: #333; }
.qp-q2__loader-bar i { display: block; width: 40%; height: 100%; background: linear-gradient(90deg, rgba(213, 28, 50, .2), #d51c32); animation: qpQ2Bar 1.1s ease-in-out infinite; }
@keyframes qpQ2Bar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* планшет */
@media (max-width: 1100px) {
    .qp-q2__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qp-q2__grid--4 .qp-q2__badge { top: 22px; right: 54px; left: auto; background: rgba(213, 28, 50, .12); }
    .qp-q2__grid--4 { padding-top: 0; }
}
@media (max-width: 1023px) {
    .qp-q2__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qp-q2__prio { grid-template-columns: 1fr; }
    .qp-q2__help-row { grid-template-columns: 1fr; }
}

/* телефон: карточка строкой — иконка слева */
@media (max-width: 640px) {
    .qp-q2 { padding: 20px 0 48px; }
    .qp-q2__head { margin-bottom: 28px; }
    .qp-q2__lead { font-size: 16px; }
    .qp-q2__q--second { margin-top: 36px; }
    .qp-q2__grid { grid-template-columns: 1fr; gap: 10px; }
    .qp-q2__grid--4 { grid-template-columns: 1fr; gap: 10px; }
    .qp-q2__grid--4 .qp-q2__card { padding: 18px 50px 18px 16px; border-radius: 18px; }
    .qp-q2__grid--4 .qp-q2__check { top: 18px; right: 16px; }
    .qp-q2__grid--4 .qp-q2__card-title { font-size: 18px; padding-right: 0; }
    .qp-q2__grid--4 .qp-q2__icon, .qp-q2__grid--4 .qp-q2__icon svg { width: 44px; height: 44px; }
    .qp-q2__help-row { gap: 10px; margin-top: 10px; }
    .qp-q2__card, .qp-q2__card--help {
        display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; row-gap: 10px;
        align-items: start; padding: 18px 50px 18px 16px; border-radius: 18px;
    }
    .qp-q2__icon, .qp-q2__icon svg, .qp-q2__card--help .qp-q2__icon, .qp-q2__card--help .qp-q2__icon svg { width: 44px; height: 44px; }
    .qp-q2__card-body { grid-column: 2; gap: 4px; }
    .qp-q2__card-title { font-size: 18px; }
    .qp-q2__card-text { font-size: 15px; }
    .qp-q2__tags, .qp-q2__card--help .qp-q2__tags { grid-column: 2; margin-right: 0; }
    .qp-q2__tag { padding: 5px 10px; font-size: 13px; }
    .qp-q2__badge { position: static; grid-column: 2; grid-row: 1; justify-self: start; margin-bottom: -2px; padding: 4px 10px; font-size: 13px; }
    .qp-q2__card:has(.qp-q2__badge) .qp-q2__icon { grid-row: 1 / span 2; }
    .qp-q2__check, .qp-q2__card--help .qp-q2__check { top: 18px; right: 16px; margin-top: 0; width: 24px; height: 24px; }
    .qp-q2__pcard { padding: 18px 16px; }
    .qp-q2__pcard-title { font-size: 17px; }
    .qp-q2__nav { flex-wrap: wrap; }
    .qp-q2__error { flex-basis: 100%; text-align: left; order: -2; }
    .qp-q2__btn { flex: 1 1 auto; }
    .qp-q2__panel { padding: 20px 16px; border-radius: 18px; }
    .qp-q2__form { grid-template-columns: 1fr; }
    .qp-q2__seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qp-q2__steps li + li::before { width: 24px; }
}

/* 17.11 (владелец): сценарии — выбор нескольких (checkbox): отметка — скруглённый квадрат, как у галочек формы, а не кружок */
.qp-q2__card .qp-q2__check { border-radius: 7px; }
