/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

.mtg-quiz fieldset {
    --quiz-padding-y: clamp(3.125rem, 5.67vw, 4.75rem);
    background-color: #E5E5E0;
    /*min-height: clamp(,35.8vw,30rem);*/
    min-height: 30rem;
    padding: var(--quiz-padding-y) 1rem;
    border-radius: 30px;
    margin-bottom: clamp(1.875rem, 4.47vw, 3.75rem);
}

.mtg-quiz legend {
    padding: 0 12px;
    float: left;
    display: block;
    width: 100%;
    font-size: clamp(1.375rem, 2.24vw, 1.875rem);
    line-height: 1.33;
    text-align: center;
    font-weight: 600;
    position: static;
}

.mtg-quiz__options {
    float: right;
    width: 100%;
}

.mtg-quiz__step label {
    user-select: none;
    cursor: pointer;
    font-size: 1.125rem;
    line-height: 1.39;
    color: #000;
    font-weight: 600;
}

.mtg-quiz__step input {
    position: absolute;
    z-index: -10;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.mtg-quiz__option {
    flex-shrink: 0;
    --size: clamp(2.8rem, 4.3vw, 3.625rem);
    display: block;
    width: var(--size);
    height: var(--size);
    background-color: #fff;
    border-radius: 100%;
    position: relative;
}

.mtg-quiz__option:before {
    content: '';
    width: 100%;
    height: 100%;
    border-radius: 100%;
    background-color: var(--color-secondary);
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease-in-out;
    will-change: transform;
}

.mtg-quiz__step input:checked + .mtg-quiz__option:before {
    transform: translate(-50%, -50%) scale(1);
}

.mtg-quiz__step[data-question="mtg_age"] legend {
    margin-bottom: clamp(3.125rem, 5.22vw, 4.375rem);
}

.mtg-quiz__step[data-question="mtg_age"] .mtg-quiz__options_wrap {
    max-width: 1034px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.125rem;
}

.mtg-quiz__step[data-question="mtg_age"] label,
.mtg-quiz__step[data-question="mtg_practice_type"] label,
.mtg-quiz__step[data-question="mtg_locus"] label,
.mtg-quiz__step[data-question="mtg_fatherhood"] label,
.mtg-quiz__step[data-question="mtg_social"] label,
.mtg-quiz__step[data-question="mtg_children"] label {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mtg-quiz__step[data-question="mtg_age"] .mtg-quiz__option,
.mtg-quiz__step[data-question="mtg_locus"] .mtg-quiz__option,
.mtg-quiz__step[data-question="mtg_social"] .mtg-quiz__option,
.mtg-quiz__step[data-question="mtg_fatherhood"] .mtg-quiz__option,
.mtg-quiz__step[data-question="mtg_practice_type"] .mtg-quiz__option,
.mtg-quiz__step[data-question="mtg_children"] .mtg-quiz__option {
    margin-bottom: clamp(30px, 32px, 34px);
}

.mtg-quiz__step[data-question="mtg_social"],
.mtg-quiz__step[data-question="mtg_locus"] {
    flex-direction: column;
    align-items: center;
}

.mtg-quiz__step[data-question="mtg_social"]:not([hidden]),
.mtg-quiz__step[data-question="mtg_locus"]:not([hidden]) {
    display: flex;
}

.mtg-quiz__step[data-question="mtg_social"] legend,
.mtg-quiz__step[data-question="mtg_locus"] legend {
    max-width: 750px;
    margin-bottom: clamp(3.125rem, 2.68vw, 2.25rem);
}

.mtg-quiz__step[data-question="mtg_marital_status"] legend,
.mtg-quiz__step[data-question="mtg_distress"] legend {
    margin-bottom: clamp(3.125rem, 4vw, 3.375rem);
}

.mtg-quiz__step[data-question="mtg_marital_status"] .mtg-quiz__options_wrap,
.mtg-quiz__step[data-question="mtg_distress"] .mtg-quiz__options_wrap {
    max-width: 1129px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.625rem;
}

.mtg-quiz__step[data-question="mtg_marital_status"] label,
.mtg-quiz__step[data-question="mtg_distress"] label {
    display: flex;
    align-items: center;
    gap: 36px;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
}

.mtg-quiz__step[data-question="mtg_children"] legend,
.mtg-quiz__step[data-question="mtg_fatherhood"] legend,
.mtg-quiz__step[data-question="mtg_practice_type"] legend {
    margin-bottom: clamp(3.125rem, 5.67vw, 4.75rem);
}

.mtg-quiz__step[data-question="mtg_children"] .mtg-quiz__options_wrap,
.mtg-quiz__step[data-question="mtg_locus"] .mtg-quiz__options_wrap,
.mtg-quiz__step[data-question="mtg_social"] .mtg-quiz__options_wrap,
.mtg-quiz__step[data-question="mtg_fatherhood"] .mtg-quiz__options_wrap,
.mtg-quiz__step[data-question="mtg_practice_type"] .mtg-quiz__options_wrap {
    max-width: 867px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.625rem;
}

.mtg-quiz__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.25rem, 3.43vw, 2.875rem);
}

.mtg-quiz__actions button {
    border-radius: 1000px;
    min-width: clamp(10.18rem, 13.8vw, 11.56rem);
    height: clamp(3.25rem, 4.77vw, 4rem);
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    user-select: none;
    font-weight: bold;
    font-size: 1.125rem;
    line-height: 1.66;
    white-space: nowrap;
}

.mtg-quiz__actions button:not([hidden]) {
    display: flex;
}

.mtg-quiz__actions button {
    transition: all .3s ease-in-out;
    color: var(--color-secondary);
    background-color: var(--color-primary);
}

.mtg-quiz__actions button:hover {
    color: var(--color-primary);
    background-color: var(--color-secondary);
}

.mtg-quiz__step .mtg-quiz__options_wrap {
    row-gap: 28px;
}

.mtg-quiz__step[data-question="mtg_marital_status"] label:last-child,
.mtg-quiz__step[data-question="mtg_locus"] label:last-child,
.mtg-quiz__step[data-question="mtg_social"] label:last-child,
.mtg-quiz__step[data-question="mtg_fatherhood"] label:last-child,
.mtg-quiz__step[data-question="mtg_distress"] label:last-child,
.mtg-quiz__step[data-question="mtg_practice_type"] label:last-child,
.mtg-quiz__step[data-question="mtg_children"] label:last-child {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .mtg-quiz fieldset {
        border-radius: 27px;
    }

    .mtg-quiz legend {
        line-height: 1.59;
    }

    .mtg-quiz__step .mtg-quiz__options_wrap {
        row-gap: 49px;
    }

    .mtg-quiz__step[data-question="mtg_age"] .mtg-quiz__options_wrap {
        grid-template-columns: repeat(4, 1fr);
    }

    .mtg-quiz__step[data-question="mtg_marital_status"] label,
    .mtg-quiz__step[data-question="mtg_distress"] label {
        flex-direction: row;
        justify-content: flex-start;
        text-align: start;
    }

    .mtg-quiz__step[data-question="mtg_children"] .mtg-quiz__options_wrap,
    .mtg-quiz__step[data-question="mtg_locus"] .mtg-quiz__options_wrap,
    .mtg-quiz__step[data-question="mtg_fatherhood"] .mtg-quiz__options_wrap,
    .mtg-quiz__step[data-question="mtg_social"] .mtg-quiz__options_wrap,
    .mtg-quiz__step[data-question="mtg_practice_type"] .mtg-quiz__options_wrap {
        grid-template-columns: repeat(3, 1fr);
    }

    .mtg-quiz__step[data-question="mtg_children"] label:last-child,
    .mtg-quiz__step[data-question="mtg_locus"] label:last-child,
    .mtg-quiz__step[data-question="mtg_fatherhood"] label:last-child,
    .mtg-quiz__step[data-question="mtg_social"] label:last-child,
    .mtg-quiz__step[data-question="mtg_practice_type"] label:last-child,
    .mtg-quiz__step[data-question="mtg_distress"] label:last-child,
    .mtg-quiz__step[data-question="mtg_marital_status"] label:last-child {
        grid-column: auto;
    }
}
