@font-face {
    font-family: "Adelle Sans Global";
    src: url("fonts/For Rus txt/AdelleSansGlobal/AdelleSansGlobal-Sb.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --questionnaire-top-safe-padding: max(
        env(safe-area-inset-top, 0px),
        var(--tg-safe-area-inset-top, 0px),
        var(--tg-content-safe-area-inset-top, 0px)
    );
    --questionnaire-bottom-safe-padding: max(
        env(safe-area-inset-bottom, 0px),
        var(--tg-safe-area-inset-bottom, 0px),
        var(--tg-content-safe-area-inset-bottom, 0px)
    );
    min-height: 100%;
    background: #000;
    color: #fff;
    color-scheme: dark;
    font-family: "Adelle Sans Global", "iQOO Type", Arial, sans-serif;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    min-width: 100%;
    min-height: 100%;
    margin: 0;
    background: #000;
}

body {
    min-height: 100vh;
    min-height: 100svh;
}

.questionnaire-page {
    width: min(100%, 393px);
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    padding:
        calc(28px + var(--questionnaire-top-safe-padding))
        16px
        calc(110px + var(--questionnaire-bottom-safe-padding));
    background: #000;
}

.questionnaire-title {
    margin: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
}

.questionnaire-form {
    margin-top: 34px;
}

.questionnaire-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.questionnaire-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.questionnaire-field__label {
    width: 100%;
    margin: 0 0 12px;
    padding: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.questionnaire-select {
    position: relative;
    width: 100%;
    border-radius: 16px;
}

.questionnaire-select--open {
    z-index: 10;
}

.questionnaire-select__button {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid #343434;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #181818;
    color: rgba(255, 255, 255, 0.72);
    font: inherit;
    font-size: 14px;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.questionnaire-select--has-value .questionnaire-select__button {
    color: #fff;
}

.questionnaire-select__button [data-select-value] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.questionnaire-select--open .questionnaire-select__button {
    border-bottom-color: transparent;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.questionnaire-select__chevron {
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg) translate(-2px, 2px);
    transition: transform 180ms ease;
}

.questionnaire-select--open .questionnaire-select__chevron {
    transform: rotate(225deg) translate(-2px, 2px);
}

.questionnaire-select__options {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 1;
    margin-top: 0;
    padding: 8px 16px 12px;
    border: 1px solid #343434;
    border-top: 0;
    border-radius: 0 0 16px 16px;
    background: #181818;
}

.questionnaire-select__options[hidden] {
    display: none;
}

.questionnaire-option {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 1.35;
    cursor: pointer;
}

.questionnaire-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.questionnaire-option__marker {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border: 1.5px solid #797976;
    border-radius: 50%;
    background: #2b2b2b;
}

.questionnaire-option--selected .questionnaire-option__marker {
    border-color: #f0b418;
    background: #f0b418;
}

.questionnaire-option--selected .questionnaire-option__marker::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 5px;
    width: 5px;
    height: 8px;
    border-right: 2px solid #050505;
    border-bottom: 2px solid #050505;
    transform: rotate(45deg);
}

.questionnaire-custom-answer {
    position: relative;
    width: 100%;
    margin-top: 8px;
}

.questionnaire-custom-answer[hidden] {
    display: none;
}

.questionnaire-custom-answer__input {
    width: 100%;
    min-height: 48px;
    padding: 12px 62px 12px 16px;
    border: 1px solid #343434;
    border-radius: 16px;
    outline: 0;
    background: #181818;
    color: #fff;
    font: inherit;
    font-size: 14px;
    line-height: 1.2;
}

.questionnaire-custom-answer__input::placeholder {
    color: rgba(255, 255, 255, 0.48);
}

.questionnaire-custom-answer__input:focus {
    border-color: #f0b418;
}

.questionnaire-custom-answer__counter {
    position: absolute;
    top: 50%;
    right: 16px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 12px;
    line-height: 1;
    pointer-events: none;
    transform: translateY(-50%);
}

.questionnaire-form__status {
    min-height: 18px;
    margin: 28px 4px 12px;
    color: #f0b418;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}

.questionnaire-form__status--error {
    color: #ff6b6b;
}

.questionnaire-form__status a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.questionnaire-submit {
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    border: 0;
    border-radius: 16px;
    background: #f0b418;
    color: #050505;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.questionnaire-submit:disabled {
    cursor: wait;
    opacity: 0.7;
}
