.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 23, 83, 0.30);
    backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    z-index: 11;
    text-transform: none;
    display: none;
}

.popup_is-animated {
    display: flex;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    user-select: none;
    transition: visibility 0s 0.6s, opacity 0.6s;
}

.popup_is-opened {
    display: flex;
    visibility: visible;
    opacity: 1;
    pointer-events: all;
    transition: visibility 0s, opacity 0.6s;
}

.popup__content {
    inline-size: clamp(22.188rem, 13.226rem + 36.49vw, 39.063rem);
    border-radius: 24px;
    background: #FFF;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(4.813rem, 3.64rem + 4.78vw, 7.938rem);
    position: relative;
}

.popup__content_teacher {
    inline-size: clamp(22.188rem, 13.226rem + 36.49vw, 39.063rem);
    border-radius: 24px;
    background: #FFF;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    position: relative;
}

.popup__close {
    padding: 12px;
    cursor: pointer;
    position: absolute;
    right: 8px;
    top: 8px;
    border: none;
    background: transparent;
}

.popup__title {
    color: var(--Brand-Dark-blue, #1E1753);
    font-feature-settings: 'liga' off, 'clig' off;
    font-family: var(--Font-family, "ALS Hauss VF");
    font-size: clamp(2rem, 1.437rem + 2.29vw, 3.5rem);
    font-style: normal;
    font-weight: 550;
    line-height: clamp(2.125rem, 1.804rem + 1.61vw, 3.25rem);
    white-space: pre-line;
    align-self: self-start;
}

.popup__content_text{
    white-space: pre-line;
}

.popup__title_teacher {
    color: var(--Brand-Dark-blue, #1E1753);
    font-feature-settings: 'liga' off, 'clig' off;
    font-family: var(--Font-family, "ALS Hauss VF");
    font-size: 32px;
    font-style: normal;
    font-weight: 550;
    line-height: 1;
    white-space: pre-line;
    align-self: self-start;
}

.popup__form {
    position: relative;
}

.popup__form__content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 0 16px;
}

.popup__form__content .form__agreement-block {
    grid-column: span 2;
}

.popup__input {
    border-radius: var(--BRx5, 20px);
    border: 1px solid var(--input-stroke-default, rgba(255, 255, 255, 0.00));
    background: var(--input-bg-default, #F6F6F9);
    display: flex;
    min-height: 52px;
    padding: 0 16px;
    align-items: center;
    align-self: stretch;
    overflow: hidden;
    font-feature-settings: 'liga' off, 'clig' off;
    text-overflow: ellipsis;
    font-family: var(--Font-family, "ALS Hauss VF");
    font-size: var(--Font-Size-action, 17px);
    font-style: normal;
    font-weight: var(--Font-Font-Weight-regular, 450);
    line-height: var(--Font-Line-height-action, 20px);
    flex-grow: 1;
}

.popup__input:focus {
    outline: none;
}

.popup__button {
    flex-grow: 0;
    inline-size: auto;
    display: flex;
    min-height: 52px;
    padding: 16px clamp(1rem, 0.214rem + 3.2vw, 3.094rem);
    justify-content: center;
    align-items: center;
    flex: 1 0 0;
    border-radius: var(--button-large, 18px);
    background-color: var(--Brand-Dark-blue, #1E1753);
    color: var(--text-icon-whitePrimaryConst, #FFF);
    text-align: center;
    font-feature-settings: 'liga' off, 'clig' off;
    font-family: var(--Font-family, "ALS Hauss VF");
    font-size: var(--Font-Size-action, 17px);
    font-style: normal;
    font-weight: 550;
    line-height: var(--Font-Line-height-action, 20px);
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease-in-out;
}

.popup__button:hover {
    background-color: #251B78;
}

.popup__button_disabled {
    pointer-events: none;
    background: #403D4B;
    color: var(--text-icon-secondary, #8F8FA3);
}

.popup__input_type_error {
    border: 1px solid red;
}

.popup .form__agreement-block {
    margin-top: 24px;
}

@media screen and (max-width: 900px) {
    .popup__form__content {
        flex-direction: column;
    }
}

@media (max-width:768px) {
    .popup__button {
        order: 3;
        margin-top: 20px;
    }

    .popup__form__content {
        grid-template-columns: 1fr;
    }

    .popup__form__content .form__agreement-block {
        grid-column: span 1;
    }
}


@media screen and (max-width: 700px) {
    .popup__form {
        flex-direction: column;
    }


}

@media screen and (max-width: 500px) {
    .popup__title {
        white-space: wrap;
    }
}