/* ЧИСТЫЕ СТИЛИ ДЛЯ ОПРОСНИКА */

/* Скрытие элементов */
.sf-hidden { 
    display: none !important; 
}

/* Базовые стили страницы */
body {
    background: #f5f5f5;
    margin: 0;
    padding: 40px 20px;
    overflow-x: hidden;
    font-family: "TildaSans", Arial, sans-serif;
}

/* Контейнер */
.t-container {
    max-width: 1000px !important;
    margin: 0 auto;
}

/* Убираем лишние стили у базовых элементов */
.t1040, .t-quiz {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.t-quiz__content-padding-container {
    padding: 0 !important;
}

/* ГЛАВНАЯ КАРТОЧКА - больше для 5-6 ответов */
.t-quiz__quiz-wrapper {
    background: white !important;
    border-radius: 12px !important;
    padding: 60px 60px 0 60px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    height: 500px !important;
    width: 100% !important;
    max-width: 900px !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    margin: 0 auto !important;
}

/* Прогресс-бар */
.t-quiz__progress-bar-container {
    margin-bottom: 40px;
}

.t-quiz__progressbar {
    background-color: rgba(82,87,222,0.20) !important;
    height: 8px;
    border-radius: 4px;
    position: relative !important;
}

.t-quiz__progress {
    background-color: rgb(82,87,222) !important;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Основной контент занимает пространство */
.t-quiz__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 100px;
    overflow-y: auto;
}

/* Футер зафиксирован внизу карточки */
.t-quiz__footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 60px 60px 60px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 0 0 12px 12px;
}

/* Счетчик слева */
.t-quiz__counter-container {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.5);
}

/* Кнопки справа */
.t-quiz__btn-wrapper {
    display: flex;
    gap: 8px;
}

/* Стили кнопок */
.t-quiz .t-btn {
    font-family: "TildaSans", Arial, sans-serif;
    border: 0 none;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    padding: 15px 30px;
    border-radius: 4px;
    transition: opacity 0.3s;
    min-width: 130px;
}

/* Кнопка "Назад" со стрелочкой */
.t-quiz__btn_prev {
    background-color: transparent;
    color: #7579ed;
    border: 1px solid #dddfff;
}

.t-quiz__btn_prev::before {
    content: '←';
    margin-right: 8px;
    font-size: 16px;
}

/* Кнопка "Дальше" */
.t-quiz__btn_next {
    color: white;
    background: linear-gradient(0.249turn, rgba(134,137,242,1) 0%, rgba(82,87,222,1) 100%);
}

/* Кнопка отправки */
.t-quiz__btn_submit {
    color: white;
    background: linear-gradient(0.249turn, rgba(134,137,242,1) 0%, rgba(82,87,222,1) 100%);
}

/* Второй шаг с полем ввода - как обычный двухколоночный layout */
.t-quiz__question-with-input {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
    flex: 1;
}

/* Левая колонка - только вопрос */
.t-quiz__question-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
}

.t-quiz__question-text .t-input-title {
    font-size: 26px;
    line-height: 1.3;
    font-weight: 600;
    color: #000;
}

/* Правая колонка - поле ввода и подпись под ним */
.t-quiz__input-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
    gap: 10px;
}

/* Подпись под полем ввода */
.t-quiz__input-hint {
    font-size: 14px !important;
    color: #666 !important;
    text-align: center !important;
    margin-top: 10px !important;
    display: block !important;
}

/* Убираем подписи из левой колонки в заголовке */
.t-input-group__header .t-quiz__input-hint {
    display: none !important;
}

.t-quiz__large-input {
    width: 100% !important;
    max-width: 100% !important;
    height: 50px !important;
    font-size: 16px !important;
    padding: 15px 20px !important;
    background-color: #f5f5f5 !important;
    border: 0px solid #000 !important;
    border-radius: 4px !important;
    text-align: center !important;
    box-sizing: border-box !important;
    font-family: "TildaSans", Arial, sans-serif !important;
    color: #000 !important;
    display: block !important;
}

/* Заголовки */
.t-heading_xs {
    font-size: 24px;
    line-height: 1.23;
    font-weight: 600;
    color: #000;
}

/* Текст */
.t-text_xs {
    font-size: 15px;
    font-weight: 300;
    color: #000;
}

/* Радио кнопки как кнопки - еще компактнее */
.t-radio__wrapper_button .t-radio__item {
    background-color: #f5f5f5;
    border: 0px solid #000;
    border-radius: 4px;
    padding: 10px 20px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 45px;
    box-sizing: border-box;
    width: 100%;
}

.t-radio__wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    min-height: 200px;
}

.t-radio__indicator {
    border: 2px solid #5257de;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    margin-right: 15px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.t-radio__indicator:after {
    content: "";
    background: #5257de;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.2s;
}

.t-radio:checked ~ .t-radio__indicator:after {
    opacity: 1;
}

/* Скрываем сам радио input */
.t-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Стили для шагов */
.t-step-form__step {
    padding: 0;
}

.t-step-form__step_active {
    display: block !important;
}

/* Стили для групп инпутов - в две колонки */
.t-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
    flex: 1;
}

.t-input-group__header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
}

.t-input-title {
    font-size: 26px;
    line-height: 1.3;
    font-weight: 600;
    color: #000;
}

/* Блок с ответами */
.t-input-block {
    display: flex;
    flex-direction: column;
}

/* Ошибки */
.t-input-error {
    color: red;
    font-size: 14px;
    margin-top: 5px;
}

/* Loading Screen */
.t-quiz__loading-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    border-radius: 12px;
    z-index: 10;
}

.t-quiz__loading-content {
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.t-quiz__loading-bar {
    width: 100%;
    height: 50px;
    background-color: #4CAF50;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
}

.t-quiz__loading-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: loading-progress 2s ease-in-out infinite;
}

@keyframes loading-progress {
    0% { width: 0%; left: 0; }
    50% { width: 100%; left: 0; }
    100% { width: 0%; left: 100%; }
}

.t-quiz__loading-text {
    color: white;
    font-size: 18px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Captcha Screen */
.t-quiz__captcha-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    border-radius: 12px;
    z-index: 10;
}

.t-quiz__captcha-content {
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.t-quiz__btn_captcha {
    color: white;
    background: linear-gradient(0.249turn, rgba(134,137,242,1) 0%, rgba(82,87,222,1) 100%);
    border: none;
    padding: 15px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    max-width: 200px;
}

/* Адаптив */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }
    
    .t-container {
        max-width: 100% !important;
    }
    
    .t-quiz__quiz-wrapper {
        padding: 30px 30px 0 30px !important;
        height: 600px !important;
        max-width: 100% !important;
    }
    
    .t-quiz__footer {
        padding: 20px 30px 30px 30px;
    }
    
    .t-quiz__main {
        padding-bottom: 90px;
    }
    
    /* На мобильных - одна колонка */
    .t-input-group {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .t-input-group__header {
        min-height: auto;
        text-align: center;
    }
    
    .t-radio__wrapper {
        min-height: auto;
    }
    
    .t-quiz__question-with-input {
        flex-direction: column;
        gap: 20px;
    }
    
    .t-quiz__question-text {
        min-width: auto;
    }
    
    .t-quiz__input-section {
        max-width: 100%;
    }
}