/* ===== Попап-квиз «Получить бесплатный аудит» ===== */
.td-quiz { font-family: 'FONT', Arial, sans-serif; }
.td-quiz__card {
    position: relative;
    width: 1040px;
    max-width: 92vw;
    min-height: 560px;
    background: #fff;
    border-radius: 24px;
    padding: 52px 56px 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Прогресс */
.td-quiz__progress { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: #f1edf7; border-radius: 24px 24px 0 0; overflow: hidden; }
.td-quiz__progress-bar { display: block; height: 100%; width: 0; background: #e8523a; transition: width .3s ease; }

/* Шаг */
.td-quiz__step { display: none; flex: 1 1 auto; }
.td-quiz__step.is-active { display: block; }
.td-quiz__question { font-size: 28px; font-weight: 700; line-height: 1.25; color: #1a1a1a; margin: 0 0 28px; }

/* Варианты (radio / checkbox) */
.td-quiz__options { display: flex; flex-direction: column; gap: 14px; }
.td-quiz__opt { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 16px; color: #2a2a2a; user-select: none; }
.td-quiz__opt input { position: absolute; opacity: 0; pointer-events: none; }
.td-quiz__mark {
    flex: 0 0 auto; width: 22px; height: 22px; border: 1.5px solid #e8a99e; background: #fff;
    display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s, background .15s;
}
.td-quiz__opt--radio .td-quiz__mark { border-radius: 50%; }
.td-quiz__opt--checkbox .td-quiz__mark { border-radius: 6px; }
.td-quiz__opt--radio input:checked + .td-quiz__mark { border-color: #e8523a; }
.td-quiz__opt--radio input:checked + .td-quiz__mark::after { content: ''; width: 11px; height: 11px; border-radius: 50%; background: #e8523a; }
.td-quiz__opt--checkbox input:checked + .td-quiz__mark { border-color: #e8523a; }
.td-quiz__opt--checkbox input:checked + .td-quiz__mark::after { content: ''; width: 11px; height: 6px; border-left: 2px solid #e8523a; border-bottom: 2px solid #e8523a; transform: translateY(-2px) rotate(-45deg); }

/* Текстовый шаг */
.td-quiz__note { font-size: 14px; color: #9a9a9a; margin: 0 0 14px; }
.td-quiz__input {
    width: 100%; border: 0; border-bottom: 1px solid #cfcfcf; padding: 10px 0; font-size: 20px;
    font-family: inherit; color: #1a1a1a; background: transparent; outline: none; box-sizing: border-box;
}
.td-quiz__input::placeholder { color: #b9b9b9; }
.td-quiz__input:focus { border-bottom-color: #e8523a; }

/* Контакты */
.td-quiz__tabs { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.td-quiz__tab {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px;
    border: 1px solid transparent; background: transparent; cursor: pointer; font-size: 15px; color: #6a6a6a; font-family: inherit;
}
.td-quiz__tab.is-active { background: #fdeae6; border-color: #f3c5bb; color: #1a1a1a; }
.td-quiz__tab-ico { width: 18px; height: 18px; }
.td-quiz__iti { width: 100%; }

/* Навигация */
.td-quiz__nav { display: flex; justify-content: space-between; align-items: center; margin-top: 36px; gap: 16px; }
.td-quiz__back, .td-quiz__next {
    font-family: inherit; cursor: pointer; border-radius: 100px; font-size: 15px; font-weight: 700;
    transition: background .2s, color .2s, border-color .2s, opacity .2s; white-space: nowrap;
}
.td-quiz__back { background: #fff; border: 1.5px solid #cdbff2; color: #5b4bd6; padding: 13px 26px; }
.td-quiz__back:hover { border-color: #b3a0ec; }
.td-quiz__back[hidden] { visibility: hidden; }
.td-quiz__next { background: #e8523a; border: none; color: #fff; padding: 15px 30px; }
.td-quiz__next:hover { background: #d4422c; }
.td-quiz__next:disabled { opacity: .5; cursor: default; }

/* Финал */
.td-quiz__done { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.td-quiz__done-title { font-size: 30px; font-weight: 700; color: #1a1a1a; margin: 0 0 14px; }
.td-quiz__done-text { font-size: 17px; color: #555; margin: 0; }

@media (max-width: 768px) {
    .td-quiz__card { padding: 40px 22px 28px; min-height: 0; }
    .td-quiz__question { font-size: 22px; margin-bottom: 22px; }
    .td-quiz__nav { margin-top: 26px; }
    .td-quiz__back, .td-quiz__next { padding: 12px 20px; font-size: 14px; }
}
