/* ==========================================================================
   Root variables
   ========================================================================== */

:root {
    --center-width: 960px;
    --footer-height: 125px;
}

/* Desktop variables */

@media only screen and (min-width: 960px) and (max-width: 1199px) {
    :root {
        --center-width: 960px;
        --footer-height: 125px;
    }
}

/* Tablet variables */

@media only screen and (min-width: 640px) and (max-width: 959px) {
    :root {
        --center-width: 640px;
        --footer-height: 155px;
    }
}

/* Mobile variables */

@media only screen and (max-width: 639px) {
    :root {
        --center-width: 100%;
        --footer-height: 210px;
    }
}

/* ==========================================================================
   Base
   ========================================================================== */

* {
    -webkit-overflow-scrolling: touch;
    outline: none;
}

*,
*:before,
*:after {
    box-sizing: border-box;
    margin: 0;
}

button {
    margin: 0;
    padding: 0;
    border-spacing: 0;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    text-indent: 0;
    border: none;
    background: none;
    font-size: inherit;
    font-weight: normal;
    line-height: normal;
    border-radius: 0;
}

button::-moz-focus-inner {
    padding: 0;
    border: 0;
}

/* ==========================================================================
   Шаблон
   ========================================================================== */

body,
html {
    width: 100%;
    height: 100%;
    min-width: 320px;
}

body,
html {
    margin: 0;
    padding: 0;
    font-size: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
}

@media only screen and (max-width: 639px) {
    body {
        font-size: 16px;
    }
}

/* ==========================================================================
   Страница
   ========================================================================== */

.page {
    height: 100%;
    margin: 0 auto;
}

.page-wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: var(--footer-height);
    position: relative;
}

.page-footer {
    display: flex;
    flex-direction: column;

    margin: calc(var(--footer-height) * -1) auto 0;
    height: var(--footer-height);
    position: relative;
}

.footer {
    width: var(--center-width);
    margin: 0 auto;
    padding: 20px;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}


@media only screen and (max-width: 639px) {
    .footer {
        padding: 20px;
    }
}

.channel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

@media only screen and (max-width: 639px) {
    .channel {
        padding: 30px;
    }
}

.channel img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.channel-logo {
    width: 260px;
    height: 130px;
    margin-bottom: 40px;
    max-width: 100%;
}

@media only screen and (max-width: 639px) {
    .channel-logo {
        width: 200px;
        height: 100px;
    }
}

.channel-title {
    width: 436px;
    /* height: 245px; */
    height: 155px;
    max-width: 100%;
}

@media only screen and (max-width: 639px) {
    .channel-title {
        width: 204px;
        /* height: 115px; */
        height: 65px;
    }
}

/* ==========================================================================
   Шаблон
   ========================================================================== */


.test {
    width: var(--center-width);
    margin: 0 auto;
    padding: 40px 20px;
}

@media only screen and (max-width: 639px) {
    .test {
        padding: 40px 20px;
    }
}

.test p:first-child {
    margin-top: 0;
}

.test p:last-child {
    margin-bottom: 0;
}

.test-visual {
    position: relative;
    font-size: 0;
    line-height: 0;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 8px -4px rgba(0, 0, 0, 0.05);
}

.test-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
}

/* Шапка теста */

.test-header {
    margin-bottom: 60px;
    display: flex;
    justify-content: center;
}

@media only screen and (max-width: 639px) {
    .test-header {
        margin-bottom: 40px;
    }
}

.test-title {
    max-width: 750px;
    text-align: center;

    font-style: normal;
    font-weight: 700;
    font-size: 28px;
    line-height: 36px;
}

@media only screen and (max-width: 639px) {
    .test-title {
        font-size: 18px;
        line-height: 1.3;
    }
}

.test-subtitle {
    font-style: normal;
    font-weight: 600;
    font-size: 24px;
    line-height: 30px;
    margin-bottom: 32px;
}

@media only screen and (max-width: 639px) {
    .test-subtitle {
        font-size: 22px;
        line-height: 1.3;
        font-weight: 600;
        margin-bottom: 24px;
    }
}

/* Превью текст */

.test-intro {
    margin: 24px 0;
}

.test-intro-visual {
    margin-bottom: 20px;
}

.test-intro-img {
}

.test-intro-text {
}

.test-intro-text p {
    margin-bottom: 20px;
}

.test-intro-text p:last-child {
> margin-bottom: 0;
}

.test-intro-actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.test-intro-action {
}

/* Основной блок */

.test-gender {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.test-gender-title {
    margin-bottom: 32px;
    text-align: center;
}

.test-gender-actions {
    display: flex;
    justify-content: center;
    width: 100%;
}

.test-gender-action {
    margin-right: 12px;
}

.test-gender-action:last-child {
    margin-right: 0;
}

@media only screen and (max-width: 639px) {
    .test-gender-actions {
        flex-direction: column;
        align-items: center;
    }

    .test-gender-action {
        width: 100%;
        margin-right: 0;
        margin-bottom: 12px;
    }

    .test-gender-action:last-child {
        margin-bottom: 0;
    }
}

/* Один вопрос */

.test-question {
}

/* Счетчик вопросов */

.test-question-counter {
    align-items: center;
    margin-bottom: 24px;

    display: flex;

    font-style: normal;
    font-weight: normal;
    font-size: 14px;
    line-height: 16px;
}

.test-question-counter-text {
    padding-right: 8px;
}

.test-question-counter-current {
    font-weight: 500;
}

.test-question-counter-divider {
    padding: 0 4px;
}

.test-question-counter-summary {

}

.test-question-title {
    margin-bottom: 32px;
}

.test-question-visual {
    margin-bottom: 20px;
}

.test-question-img {
}

.test-question-description {
    margin-bottom: 20px;
}

.test-question-description p {
    margin-bottom: 20px;
}

.test-question-description p:last-child {
    margin-bottom: 0;
}

.test-answers {
    margin-top: 32px;
}

@media only screen and (max-width: 639px) {
    .test-answers {
        margin-top: 32px;
    }
}

/* Один ответ */

.test-answer {
    position: relative;
    margin-bottom: 8px;
}

.test-answer:last-child {
    margin-bottom: 0;
}

.test-answer-control {
    position: absolute;
    top: 0;
    left: 0;
    clip: rect(0, 0, 0, 0);
    width: 100%;
    height: 100%;
}

.test-answer-label {
    cursor: pointer;
    position: relative;

    display: flex;
    align-items: center;
    transition: all 0.3s ease;

    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
    padding: 16px 24px;
    width: 100%;
}

.test-answer-visual {
    flex-shrink: 0;
}

.test-answer-figure {
    height: 24px;
    width: 24px;
    transition: all 0.3s ease;
    padding: 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 0;
    line-height: 0;

    border: 1px solid #000;

    border-radius: 50%;

    position: relative;
}

.test-answer-figure:after {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    opacity: 0;
    width: 14px;
    height: 14px;
    background: #000;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.test-answer-content {
    margin-left: 24px;
    font-weight: 500;
    transition: all 0.3s ease;
}


@media only screen and (max-width: 639px) {

    .test-answer-label {
        padding: 12px;
    }

    .test-answer-figure {
        width: 16px;
        height: 16px;
    }

    .test-answer-figure:after {
        width: 8px;
        height: 8px;
    }

    .test-answer-content {
        margin-left: 12px;
        font-size: 14px;
    }
}

.test-answer-control + .test-answer-label:hover {
    background: rgba(0, 0, 0, 0.05);
}

.test-answer-control + .test-answer-label:hover .test-answer-figure {
    border-color: #000;
}

.test-answer-control + .test-answer-label:hover .test-answer-content {
}

.test-answer-control:checked + .test-answer-label,
.test-answer-control:checked + .test-answer-label:hover {
    background: rgba(0, 0, 0, 0.10);
}

.test-answer-control:checked + .test-answer-label .test-answer-figure,
.test-answer-control:checked + .test-answer-label:hover .test-answer-figure {
    border-color: #000;
}

.test-answer-control:checked + .test-answer-label .test-answer-figure:after,
.test-answer-control:checked + .test-answer-label:hover .test-answer-figure:after {
    opacity: 1;
    background: #000;
}

.test-answer-control:checked + .test-answer-label .test-answer-content,
.test-answer-control:checked + .test-answer-label:hover .test-answer-content {
}

.test-answer-control:disabled + .test-answer-label,
.test-answer-control:disabled + .test-answer-label:hover,
.test-answer-control:disabled:focus + .test-answer-label {
    cursor: default;
}

.test-answer-control:disabled + .test-answer-label .test-answer-figure,
.test-answer-control:disabled + .test-answer-label:hover .test-answer-figure,
.test-answer-control:disabled:focus + .test-answer-label .test-answer-figure {
    background: lightgray;
    border-color: lightgray;
    color: lightgray;
}

.test-answer-control:disabled + .test-answer-label .test-answer-figure:after,
.test-answer-control:disabled + .test-answer-label:hover .test-answer-figure:after,
.test-answer-control:disabled:focus + .test-answer-label .test-answer-figure:after {
    background: lightgray;
}

.test-answer-control:disabled + .test-answer-label .test-answer-content,
.test-answer-control:disabled + .test-answer-label:hover .test-answer-content,
.test-answer-control:disabled:focus + .test-answer-label .test-answer-content {
    color: lightgray;
}

/* Действия */

.test-question-actions {
    margin-top: 40px;
}

.test-question-actions-cols {
    display: flex;
    justify-content: space-between;
}

.test-question-actions-col {
    width: calc(50% - 5px);
    margin-right: 10px;
}

.test-question-actions-col:first-child {
}

.test-question-actions-col:last-child {
    margin-right: 0;
}

@media only screen and (max-width: 639px) {

    .test-question-actions {
        margin-top: 32px;
    }

    .test-question-actions-cols {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .test-question-actions-col {
        width: 100%;
        margin-right: 0;
    }

    .test-question-actions-col:first-child {
        order: 2;
        margin-top: 12px;
    }

    .test-question-actions-col:last-child {
        order: 1;
    }
}

.test-question-action {
    margin-right: 12px;
    width: 100%;
}

.test-question-action:last-child {
    margin-right: 0;
}

/* */

.test-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.test-result-title {
    margin-bottom: 32px;
    text-align: center;
}

.test-result-text {
    margin-bottom: 32px;
}

.test-result-visual {
}

.test-result-img {
}

.test-result-share {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
}

.test-result-share-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    width: 100%;
    display: flex;
    justify-content: center;
    text-align: center;
}

.test-result-share-buttons {
    width: 100%;
    display: flex;
    justify-content: center;
}

.test-result-actions {
    margin-top: 40px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.test-result-action {
}

/* */

.test-epilogue {
    margin-top: 24px;
}

/* Общие стили */

.button {
    border: 1px solid transparent;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 40px 14px;
    cursor: pointer;

    min-width: auto;

    font-size: 18px;
    line-height: 1;
    font-weight: 400;
    border-radius: 8px;

    transition: all 0.3s ease;

    text-decoration: none;
    color: #000;
}

@media only screen and (max-width: 639px) {
    .button {
        font-size: 16px;
        padding: 12px 12px 14px;
        width: 100%;
        min-height: 40px;
    }
}

.button--primary {}

.button--primary:hover,
.button--primary:focus,
.button--primary:active {
    transform: scale(1.04);
    box-shadow: 0 8px 8px -4px rgba(0, 0, 0, 0.05);
}

.button--secondary {
    background: #fff;
}

.button--secondary:hover,
.button--secondary:focus,
.button--secondary:active {
    transform: scale(1.04);
    box-shadow: 0 8px 8px -4px rgba(0, 0, 0, 0.05);
}

.button:disabled {
    cursor: default;
    opacity: 0.2;
}

@media only screen and (max-width: 639px) {
    .button {
        width: 100%;
        text-align: center;
    }
}

/* Рамблер */

.rambler-share {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

@media only screen and (max-width: 639px) {
    .rambler-share {
        justify-content: center;
    }
}
