/* Модалка квиза */
.quiz-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.quiz-modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: radial-gradient(circle at top left, rgb(210, 210, 210) 0%, #6F6F6F 50%), radial-gradient(circle at bottom right, rgba(210, 210, 210) 0%, #6F6F6F 50%);
    background-blend-mode: multiply;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Кнопка закрытия */
.quiz-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.quiz-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Шапка модалки */
.quiz-modal-header {
    padding: 41px 36px 0 36px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

@media screen and (max-width: 900px) {
    .quiz-modal-header {
        padding: 36px 24px 0 24px;
    }
}

.quiz-step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #D4A574;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.quiz-modal-header .quiz-question-text {
    font-family: "Buyan", sans-serif;
    font-weight: 700;
    font-size: 55px;
    color: #fff;
    margin: 0;
    line-height: 120%;
    flex: 1;
    text-transform: uppercase;
}

@media screen and (max-width: 900px) {
    .quiz-modal-header .quiz-question-text {
        font-size: 40px;
    }
}

/* Основной контент */
.quiz-modal-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    padding-bottom: 10px;
}

/* Вопрос и опции */
.quiz-modal-question {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 25px 36px 146px 36px;
}

@media screen and (max-width: 900px) {
    .quiz-modal-question {
        padding: 13px 24px 62px 24px;
    }
}

/* Опции квиза */
.quiz-options {
    display: flex;
    gap: 16px;
}

@media screen and (max-width: 900px) {
    .quiz-options {
        gap: 15px;
    }
}

@media screen and (max-width: 515px) {
    .quiz-options {
        flex-direction: column;
        align-items: stretch;
    }

    .quiz-option-button {
        width: 100%;
    }

    .quiz-option-button.large_button,
    .quiz-option-button.small_button {
        width: 100%;
    }

    .quiz-option-button.large_button {
        height: auto;
    }
}

/* Layout: в ряд (по умолчанию) */
.quiz-options.layout-row {
    flex-direction: row;
    flex-wrap: wrap;
}

/* Layout: в колонку */
.quiz-options.layout-column {
    flex-direction: column;
    align-items: flex-start;
}

/* Базовые стили кнопок */
.quiz-option-button {
    border: 2px solid #5F5F5F;
    border-radius: 12px;
    background: #5F5F5F;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-option-button:hover {
    border-color: #D4A574;
    background: #3a3a3a;
    transform: translateY(-4px);
}

.quiz-option-button.selected {
    border-color: #D4A574;
    background: #5F5F5F;
    color: #fff;
    transform: translateY(-4px);
}

/* Размеры кнопок */
.quiz-option-button.large_button {
    padding: 31px 0 0 27px;
    font-size: 18px;
    min-height: 80px;
    font-family: "Buyan", sans-serif;
    font-weight: 700;
    font-size: 50px;
    line-height: 105%;
    color: #FFFFFF;
}

.quiz-option-button.large_button.button_text {
    padding: 24px;
}

@media screen and (max-width: 900px) {
    .quiz-option-button.large_button {
        padding: 24px 0 0 21px;
        font-size: 35px;
    }

    .quiz-option-button.large_button.button_text {
        padding: 24px;
    }
}

.quiz-option-button.small_button {
    padding: 17px 23px 15px 29px;
    min-height: 84px;
    font-family: "Buyan", sans-serif;
    font-weight: 700;
    font-size: 50px;
    line-height: 105%;
    color: #FFFFFF;
}

@media screen and (max-width: 900px) {
    .quiz-option-button.small_button {
        padding: 20px 21px 18px 21px;
        font-size: 35px;
        min-height: 75px;
    }
}

/* Типы контента */
.quiz-option-button.button_image {
    padding: 16px;
}

.quiz-option-button.button_text_image {
    gap: 16px;
    text-align: left;
}

/* Большие кнопки с картинкой */
.quiz-option-button.large_button {
    width: 325px;
    height: 309px;
}

@media screen and (max-width: 900px) {
    .quiz-option-button.large_button {
        width: 297px;
        height: 172px;
    }
}

@media screen and (max-width: 515px) {
    .quiz-option-button.large_button {
        width: 100%;
    }
}

.quiz-option-button.large_button.button_text_image {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.quiz-option-button.large_button.button_text_image .quiz-option-text {
    position: relative;
    z-index: 2;
    max-width: 135px;
}

.quiz-option-button.large_button.button_text_image .quiz-option-image {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 221px;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    z-index: 1;
}

@media screen and (max-width: 900px) {
    .quiz-option-button.large_button.button_text_image .quiz-option-image {
        width: 134px;
    }
}

/* Маленькие кнопки с картинкой */
.quiz-option-button.small_button.button_text_image {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quiz-option-button.small_button .quiz-option-image {
    width: auto;
    height: auto;
    object-fit: cover;
    flex-shrink: 0;
}

/* Базовые стили для картинок */
.quiz-option-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.quiz-option-text {
    flex: 1;
    text-transform: uppercase;
}

/* Навигация снизу */
.quiz-modal-footer {
    margin: 0 36px 26px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 15px 17px 18px 23px;
    border: 1px solid #FFFFFF;
    border-radius: 20px;
}

.quiz-modal-footer-mobile {
    display: none;
}

@media screen and (max-width: 900px) {
    .quiz-modal-footer--desktop {
        display: none;
    }

    .quiz-modal-footer-mobile {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin: 0 24px 26px 24px;
    }

    .quiz-modal-footer-mobile .quiz-progress-text {
        margin: 0;
        margin-bottom: 12px;
        font-size: 30px;
    }

    .quiz-modal-footer-mobile__box {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px;
        border: 1px solid #FFFFFF;
        border-radius: 20px;
        gap: 12px;
    }

    .quiz-modal-footer-mobile__box .quiz-nav-button {
        height: 64px;
        border-radius: 18px;
    }

    .quiz-modal-footer-mobile__box .quiz-nav-back {
        width: 90px;
        background: #5F5F5F;
        border: none;
    }

    .quiz-modal-footer-mobile__box .quiz-nav-next {
        flex: 1;
        border: none;
    }
}

.quiz-progress-text {
    font-family: "Buyan", sans-serif;
    font-weight: 700;
    font-size: 45px;
    line-height: 130%;
    color: #fff;
    text-transform: uppercase;
    flex: 1;
    display: flex;
    align-items: center;
}

.quiz-nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-nav-button.quiz-nav-back {
    background: #5F5F5F;
    border: 1px solid #5F5F5F;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 18px;
    width: 153px;
    height: 60px;
    margin-right: 16px;
}

.quiz-modal-footer-mobile__box .quiz-nav-button.quiz-nav-back {
    margin: 0;
    width: 120px;
}

.quiz-nav-button.quiz-nav-next {
    background: linear-gradient(264.11deg, #FFE9C8 -4.53%, #FFD9AD 18.44%, #FFDDB5 51.46%, #FFDDB5 76.6%, #FFCC8F 111.92%);
    border: none;
    box-shadow: 0px 4px 0px 0px #D8A86E;
    font-family: "Montserrat", sans-serif;
    font-size: 18px;
    font-weight: 800;
    line-height: 128%;
    color: #584D3E;
    text-transform: uppercase;
    width: 203px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
}

.quiz-nav-button.quiz-nav-next:hover:not(:disabled) {
    background: #d4b584;
}

.quiz-nav-button.quiz-nav-back:hover:not(:disabled) {
    background: #3a3a3a;
    border-color: #888;
}

.quiz-nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quiz-nav-button svg {
    flex-shrink: 0;
}


/* Кастомный скроллбар для контента с товарами */
.quiz-modal-question::-webkit-scrollbar {
    width: 8px;
}

.quiz-modal-question::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.quiz-modal-question::-webkit-scrollbar-thumb {
    background: #D4A574;
    border-radius: 4px;
}

.quiz-modal-question::-webkit-scrollbar-thumb:hover {
    background: #e0b585;
}
