/*
 * gigas:quiz — встраивается в общий .pkf-popup (overlay/flex центрирование из popup/style.css)
 *
 * Позиционирование: align-items:flex-start + margin:auto на квизе.
 * Это единственный надёжный способ: при align-items:center браузер обрезает
 * контент СВЕРХУ без возможности прокрутки когда квиз выше вьюпорта.
 *
 * Desktop: компактные v2-значения ×1.15
 * Mobile ≤480px: просторный лэйаут с 1 колонкой (как было в «хорошей» мобильной версии)
 */
.pkf-popup.gigas-quiz-host {
    overflow-y: auto !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
}

.gigas-quiz {
    --gq-orange-1: #ffb23a;
    --gq-orange-2: #f07a12;
    --gq-orange-3: #e85a00;
    --gq-cta: #d0322d;
    --gq-cta-hover: #b82824;
    --gq-ink: #1d1d1f;
    --gq-ink-soft: #5b5b60;
    --gq-field: #ffffff;
    --gq-field-soft: #f4f5f7;

    width: min(620px, 100%);
    margin: 0 auto 20px;
    max-height: none;
    overflow: auto;
    background: linear-gradient(180deg, var(--gq-orange-1) 0%, var(--gq-orange-2) 55%, var(--gq-orange-3) 100%);
    border-radius: 25px;
    box-shadow:
        0 30px 60px -20px rgba(70, 30, 0, .35),
        0 10px 30px -15px rgba(0, 0, 0, .25);
    color: #fff;
    position: relative;
    font-family: inherit;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    text-align: left;
}

.gigas-quiz *,
.gigas-quiz *::before,
.gigas-quiz *::after {
    box-sizing: border-box;
}

.gigas-quiz__close {
    position: absolute;
    top: 11px;
    right: 11px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    border: 0;
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .2s ease, transform .2s ease;
    z-index: 2;
    padding: 0;
}
.gigas-quiz__close:hover {
    background: rgba(255, 255, 255, .32);
    transform: rotate(90deg);
}
.gigas-quiz__close svg { width: 13px; height: 13px; }

/* head */
.gigas-quiz__head {
    padding: 19px 21px 13px;
}
.gigas-quiz__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .18);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
    color: #fff;
}
.gigas-quiz__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .25);
}
.gigas-quiz__title {
    margin: 0 0 5px;
    font-size: 21px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #fff;
}
.gigas-quiz__sub {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    opacity: .92;
    line-height: 1.4;
    color: #fff;
}

/* progress */
.gigas-quiz__progress {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.gigas-quiz__progress-track {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .25);
    overflow: hidden;
}
.gigas-quiz__progress-fill {
    height: 100%;
    width: 25%;
    background: #fff;
    border-radius: 999px;
    transition: width .5s cubic-bezier(.2, .8, .2, 1);
    box-shadow: 0 0 10px rgba(255, 255, 255, .4);
}
.gigas-quiz__progress-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    opacity: .95;
    min-width: 44px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #fff;
}

/* body */
.gigas-quiz__body {
    background: #fff;
    color: var(--gq-ink);
    border-radius: 21px 21px 25px 25px;
    margin: 11px;
    padding: 19px 19px 17px;
    position: relative;
    min-height: 323px;
    overflow: hidden;
}

/* step */
.gigas-quiz__step {
    position: absolute;
    inset: 19px 19px 17px;
    opacity: 0;
    transform: translateX(24px);
    pointer-events: none;
    transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.gigas-quiz__step.is-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    position: relative;
    inset: auto;
}
.gigas-quiz__step.is-leaving {
    opacity: 0;
    transform: translateX(-24px);
}

.gigas-quiz__q {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 3px;
    letter-spacing: -0.01em;
    color: var(--gq-ink);
}
.gigas-quiz__hint {
    font-size: 14px;
    color: var(--gq-ink-soft);
    margin: 0 0 14px;
}

/* options grid */
.gigas-quiz__opts {
    display: grid;
    gap: 8px;
}
.gigas-quiz__opt {
    appearance: none;
    border: 1.5px solid #eceef2;
    background: #fff;
    color: var(--gq-ink);
    border-radius: 13px;
    padding: 11px 13px;
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color .2s ease, transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.gigas-quiz__opt:hover {
    border-color: var(--gq-orange-2);
    background: #fff8ef;
    transform: translateY(-1px);
}
.gigas-quiz__opt:active { transform: translateY(0); }
.gigas-quiz__opt.is-selected {
    border-color: var(--gq-orange-3);
    background: linear-gradient(180deg, #fff3e3, #ffe6cc);
    box-shadow: 0 6px 18px -10px rgba(232, 90, 0, .6);
}
.gigas-quiz__opt-ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fff4e6;
    color: var(--gq-orange-3);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: background .2s ease, color .2s ease;
}
.gigas-quiz__opt.is-selected .gigas-quiz__opt-ico {
    background: var(--gq-orange-3);
    color: #fff;
}
.gigas-quiz__opt-ico svg { width: 20px; height: 20px; }
.gigas-quiz__opt-body { flex: 1; min-width: 0; }
.gigas-quiz__opt-title { display: block; font-size: 15.5px; line-height: 1.2; }
.gigas-quiz__opt-meta {
    display: block;
    font-size: 13px;
    color: var(--gq-ink-soft);
    margin-top: 2px;
    font-weight: 500;
}
.gigas-quiz__opt-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #dde0e6;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: all .2s ease;
}
.gigas-quiz__opt-check svg {
    width: 10px;
    height: 10px;
    color: #fff;
    opacity: 0;
    transform: scale(.5);
    transition: all .2s ease;
}
.gigas-quiz__opt.is-selected .gigas-quiz__opt-check {
    background: var(--gq-orange-3);
    border-color: var(--gq-orange-3);
}
.gigas-quiz__opt.is-selected .gigas-quiz__opt-check svg {
    opacity: 1;
    transform: scale(1);
}

/* area grid (2 cols on desktop) */
.gigas-quiz__opts--area { grid-template-columns: 1fr 1fr; gap: 8px; }
.gigas-quiz__opts--area .gigas-quiz__opt {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 13px 15px;
}
.gigas-quiz__opts--area .gigas-quiz__opt-num {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--gq-orange-3);
    white-space: nowrap;
}
.gigas-quiz__opts--area .gigas-quiz__opt-sub {
    font-size: 13px;
    line-height: 1.25;
    color: var(--gq-ink-soft);
    font-weight: 500;
}

/* contacts */
.gigas-quiz__field {
    display: block;
    margin-bottom: 8px;
    position: relative;
}
.gigas-quiz__field input {
    width: 100%;
    font: inherit;
    font-size: 15.5px;
    padding: 13px 16px;
    border-radius: 13px;
    border: 1.5px solid #eceef2;
    background: #f7f8fa;
    color: var(--gq-ink);
    transition: border-color .2s ease, background .2s ease;
}
.gigas-quiz__field input::placeholder { color: #9a9ea6; }
.gigas-quiz__field input:focus {
    outline: none;
    border-color: var(--gq-orange-2);
    background: #fff;
}
.gigas-quiz__field input.is-invalid {
    border-color: var(--gq-cta);
    background: #fff4f3;
}
.gigas-quiz__err {
    color: var(--gq-cta);
    font-size: 13px;
    font-weight: 600;
    margin: -4px 4px 6px;
    min-height: 14px;
    opacity: 0;
    transition: opacity .2s ease;
}
.gigas-quiz__err.is-on { opacity: 1; }

.gigas-quiz__consent {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 12px;
    color: var(--gq-ink-soft);
    line-height: 1.45;
    margin: 7px 2px 12px;
    cursor: pointer;
    user-select: none;
}
.gigas-quiz__consent input {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    border: 1.5px solid #d0d3da;
    border-radius: 5px;
    background: #fff;
    margin-top: 1px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all .2s ease;
}
.gigas-quiz__consent input.is-invalid {
    border-color: var(--gq-cta);
    background: #fff4f3;
}
.gigas-quiz__consent input:checked {
    background: var(--gq-orange-3);
    border-color: var(--gq-orange-3);
}
.gigas-quiz__consent input:checked::after {
    content: '';
    width: 9px;
    height: 9px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2 6l3 3 5-6' stroke='white' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
}
.gigas-quiz__consent a {
    color: var(--gq-orange-3);
    text-decoration: none;
}
.gigas-quiz__consent a:hover { text-decoration: underline; }

/* CTA */
.gigas-quiz__cta {
    display: block;
    width: 100%;
    appearance: none;
    border: 0;
    padding: 15px 21px;
    border-radius: 13px;
    font: inherit;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.005em;
    color: #fff;
    background: linear-gradient(180deg, #e13c37 0%, var(--gq-cta) 55%, #b82824 100%);
    cursor: pointer;
    box-shadow: 0 10px 24px -8px rgba(208, 50, 45, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
    position: relative;
    overflow: hidden;
}
.gigas-quiz__cta:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -8px rgba(208, 50, 45, .6);
}
.gigas-quiz__cta:active { transform: translateY(0); }
.gigas-quiz__cta[disabled] {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    filter: saturate(.7);
}
.gigas-quiz__cta svg {
    margin-left: 8px;
    vertical-align: -3px;
}

.gigas-quiz__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    gap: 14px;
}
.gigas-quiz__back {
    appearance: none;
    border: 0;
    background: none;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--gq-ink-soft);
    cursor: pointer;
    padding: 7px 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .2s ease, transform .2s ease;
}
.gigas-quiz__back:hover {
    color: var(--gq-orange-3);
    transform: translateX(-2px);
}
.gigas-quiz__back[hidden] { visibility: hidden; display: inline-flex; }

/* bonus */
.gigas-quiz__bonus {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 9px;
    padding: 9px 13px;
    background: #fff4e6;
    border-radius: 10px;
    font-size: 13px;
    color: #8a4a00;
    font-weight: 600;
    line-height: 1.35;
}
.gigas-quiz__bonus svg {
    width: 17px;
    height: 17px;
    color: var(--gq-orange-3);
    flex-shrink: 0;
}

/* thanks */
.gigas-quiz__thanks {
    text-align: center;
    padding: 8px 4px 4px;
}
.gigas-quiz__thanks-ico {
    width: 62px;
    height: 62px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffe0b8, #ffb670);
    display: grid;
    place-items: center;
    animation: gigasQuizPop .6s cubic-bezier(.2, 1.2, .3, 1) both;
}
.gigas-quiz__thanks-ico svg {
    width: 30px;
    height: 30px;
    color: #fff;
}
.gigas-quiz__thanks-h {
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 5px;
    letter-spacing: -0.01em;
    color: var(--gq-ink);
}
.gigas-quiz__thanks-p {
    font-size: 14px;
    color: var(--gq-ink-soft);
    margin: 0 auto 14px;
    max-width: 360px;
    line-height: 1.5;
}
.gigas-quiz__thanks-summary {
    background: #f7f8fa;
    border-radius: 13px;
    padding: 12px 14px;
    text-align: left;
    margin: 0 auto 14px;
    max-width: 360px;
    font-size: 13px;
    color: var(--gq-ink);
}
.gigas-quiz__thanks-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 0;
}
.gigas-quiz__thanks-row span:first-child { color: var(--gq-ink-soft); }
.gigas-quiz__thanks-row span:last-child { font-weight: 700; text-align: right; }

/* keyframes */
@keyframes gigasQuizPop {
    0%   { transform: scale(.4);  opacity: 0; }
    60%  { transform: scale(1.08); }
    100% { transform: scale(1);    opacity: 1; }
}
@keyframes gigasQuizOptIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gigas-quiz__step.is-active .gigas-quiz__opt {
    animation: gigasQuizOptIn .45s cubic-bezier(.2, .8, .2, 1) both;
}
.gigas-quiz__step.is-active .gigas-quiz__opt:nth-child(1) { animation-delay: .04s; }
.gigas-quiz__step.is-active .gigas-quiz__opt:nth-child(2) { animation-delay: .10s; }
.gigas-quiz__step.is-active .gigas-quiz__opt:nth-child(3) { animation-delay: .16s; }
.gigas-quiz__step.is-active .gigas-quiz__opt:nth-child(4) { animation-delay: .22s; }

.gigas-quiz__step.is-active .gigas-quiz__field {
    animation: gigasQuizOptIn .45s cubic-bezier(.2, .8, .2, 1) both;
}
.gigas-quiz__step.is-active .gigas-quiz__field:nth-child(1) { animation-delay: .04s; }
.gigas-quiz__step.is-active .gigas-quiz__field:nth-child(2) { animation-delay: .10s; }

/* ============================================================
   MOBILE ≤480px — просторный лэйаут, 1 колонка для площади
   ============================================================ */
@media (max-width: 480px) {
    .pkf-popup.gigas-quiz-host {
        align-items: center !important;
        justify-content: center !important;
        padding: 0 8px !important;
    }
    .gigas-quiz { margin: 0 auto; }

    .gigas-quiz__head { padding: 22px 18px 14px; }
    .gigas-quiz__title { font-size: 22px; }
    .gigas-quiz__sub { font-size: 13px; }

    .gigas-quiz__body { margin: 10px; padding: 22px 18px 18px; }
    .gigas-quiz__step { inset: 22px 18px 18px; }

    .gigas-quiz__q { font-size: 18px; }
    .gigas-quiz__hint { font-size: 13px; margin: 0 0 16px; }

    .gigas-quiz__opts { gap: 10px; }
    .gigas-quiz__opt { padding: 12px 14px; }

    /* 1 колонка для площади */
    .gigas-quiz__opts--area {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .gigas-quiz__opts--area .gigas-quiz__opt {
        padding: 18px;
        gap: 4px;
    }
    .gigas-quiz__opts--area .gigas-quiz__opt-num { font-size: 22px; }
    .gigas-quiz__opts--area .gigas-quiz__opt-sub { font-size: 12px; }
}
