/*!
Theme Name: ecommerce
*
*	Стили для модального quiz
*/

.quiz {
	flex-direction: column;
}

.quiz_container {

}

.quiz_form {
    display: flex;
    flex-direction: column;
    gap: 1em;
    background-color: var(--bg2);
    border-radius: 6px;
    padding: 3em;
}

.quiz_progress {
    width: 100%;
    height: var(--h4);
    background: var(--bg2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2vw;
    position: relative;
}

.progress_bar {
    height: 100%;
    background: var(--elem_color1);
    border-radius: 10px;
    position: relative;
    transition: width 0.3s ease;
}

/* Анимация движения */
.progress_bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: move-stripes 1s linear infinite;
    border-radius: 10px;
}

.quiz_answer {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc((100% - 3em) / 4);
    padding: 0.5em;
    background-color: var(--text_color1);
}

.quiz_answer:hover {
}

.quiz_answer.selected {
    border-color: var(--elem_color1);
    transform: scale(1.02);
}

.quiz_answer.selected .quiz_answer__text {
    color: var(--elem_color1);
    font-weight: bold;
}

.quiz_custom_answer_wrapper {
    width: 100%;
}

input.quiz_custom_input{
    width: 100%;
    border: 0;
}

.quiz_answers__container {
    padding: 1em 0;
    display: flex;
    flex-flow: row wrap;
    gap: 1em;
    width: 100%;
}

.quiz_custom_answer_wrapper {
    width: 100%;
}

.quiz_answer__img {
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
}

.quiz_answer__text {
    font-size: var(--h6);
    font-weight: 500;
}

.quiz_answer__desc {
    font-size: var(--h7);
    text-align: center;
}

.quiz_questions_slide {
    display: none;
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    flex-direction: column;
    gap: 1em;
    align-items: center;
}

.quiz_questions_slide.active {
    display: flex;
    transform: translateX(0);
    opacity: 1;
}

.quiz_questions_slide:not(.active) {
    transform: translateX(100%);
    opacity: 0;
}

/******************************************/
.quiz_navigation {
    padding-top: 1em;
    display: flex;
    justify-content: space-between;
}

.quiz_prev, .quiz_next {
    padding: 0.5em 2em;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz_prev {
    background-color: var(--elem_color1);
    color: var(--text_color1);
}

.quiz_prev:hover {
    background-color: var(--text_color1);
}

.quiz_next {
    background-color: var(--elem_color1);
    color: var(--text_color1);
}

.quiz_next:hover:not(:disabled) {
    background-color: var(--hovelem_color1);
    color: var(--text_color1);
}

.quiz_next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
/******************************************/


@keyframes move-stripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 20px;
    }
}

.progress_text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-weight: bold;
    font-size: var(--h7);
    z-index: 2;
}

.quiz_questions_container {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.quiz_question {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 1em;
    flex-wrap: wrap;
}

.quiz_question-text {
    display: flex;
    width: calc(80% - 1em);
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.quiz_question__title {
    font-size: var(--h4);
    font-weight: 700;
}

.quiz_question__badge {
    font-size: var(--h5);
    font-weight: 700;
    background-color: var(--elem_color1);
    color: var(--text_color1);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20%;
}

.quiz_question__desc {
    /*grid-column: 1 / 3;*/
    width: 100%;
    text-align: center;
}


/* ==================== КОНТАКТНЫЙ СЛАЙД ==================== */
.quiz_contact_fields {
    display: flex;
    flex-flow: row wrap;
    gap: 1em;
    width: 100%;
}

.quiz_contact_field {
    width: calc((100% - 1em) / 2);
    cursor: default !important;
    border: 2px solid transparent !important;
    padding: 0 !important;
    background: transparent !important;
}

.quiz_contact_field:hover {
    transform: none !important;
}

.quiz_contact_field .quiz_contact_input {
    width: 100%;
    border: 2px solid var(--bg2);
    border-radius: 6px;
    background: var(--text_color1);
    outline: none;
    transition: border-color 0.3s ease;
}

.quiz_contact_field .quiz_contact_input:focus {
    border-color: var(--elem_color1);
}

/* ==================== КНОПКА ОТПРАВИТЬ ==================== */
.quiz_submit {
    padding: 0.5em 2em;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--elem_color1);
    color: var(--text_color1);
}

.quiz_submit:hover:not(:disabled) {
    background-color: var(--hovelem_color1);
}

.quiz_submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== ЭКРАН УСПЕХА ==================== */
.quiz_success {
    display: flex;
    flex-direction: column;
    gap: 1em;
    background-color: var(--bg2);
    border-radius: 6px;
    padding: 3em;
    text-align: center;
    align-items: center;
}

.quiz_success__header {
    font-size: var(--h4);
    font-weight: 700;
    color: var(--elem_color1);
}

.quiz_success__text {
    font-size: var(--h5);
    color: var(--text_color2);
}


@media (max-width: 960px) {

	.quiz_progress {
	    height: var(--h4-960);
	}

	.progress_text {
	    font-size: var(--h7-960);
	}

    .quiz_answer {
        width: calc((100% - 1em) / 2);
    }

}

@media (max-width: 600px) {

	.quiz_progress {
	    height: var(--h2-600);
	}

	.progress_text {
	    font-size: var(--h7-600);
	}

    .quiz_form {
        padding: 2em;
    }

    .quiz_question {
        flex-direction: column;
        padding-top: 1em;
    }

    .quiz_question__badge {
        font-size: var(--h5-600);
        padding: 0.5em 2em;
        width: 100%;
    }

    .quiz_question-text {
        width: 100%;
    }

    .quiz_question__title {
        font-size: var(--h3-600);
        text-align: center;
    }

    .quiz_answers__container {
        /* flex-direction: column; */
        width: 100%;
    }

    .quiz_answer {
        /* min-width: 100%; */
    }

    .quiz_prev, .quiz_next {
        width: calc((100% - 1em) / 2);
    }

    .quiz_contact_fields {
        flex-direction: column;
    }

    .quiz_contact_field {
        width: 100%;
    }

    .quiz_submit {
        width: 100%;
    }

    .quiz_success {
        padding: 2em;
    }

    .quiz_success__header {
        font-size: var(--h3-600);
    }

}

