.modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.modal.is-open {
    display: block;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    z-index: 0;
}

.modal__dialog {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(728px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: clamp(24px, 4vw, 60px) clamp(16px, 3.5vw, 40px);
    background: rgba(0, 0, 0, .70);
    border: 2px solid rgba(255, 255, 255, .25);
    box-shadow: 18px 49px 56.3px rgba(0, 0, 0, .25);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 1;
}

.modal__dialog_thanks {
    display: block;
}

.modal__close {
    position: absolute;
    width: 14px;
    height: 14px;
    right: 24px;
    top: 24px;
    opacity: .6;
    display: block;
    z-index: 3;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.modal__close:before,
.modal__close:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 1px;
    background: #fff;
    transform-origin: center;
}

.modal__close:before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.modal__close:after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-form {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

.modal-form__left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    width: 220px;
    flex: 0 0 220px;
    min-width: 0;
}

.modal-form__title {
    width: 100%;
    font-family: 'Golos Text', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-weight: 500;
    font-size: 26px;
    line-height: 120%;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #fff;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.modal-form__right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
    flex: 1;
    min-width: 0;
}

.modal-form__form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-form__field {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-form__input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Golos Text', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 120%;
    color: #fff;
    opacity: .85;
    padding: 0;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.modal-form__input::placeholder {
    color: #fff;
    opacity: .6;
}

.modal-form__input:-webkit-autofill,
.modal-form__input:-webkit-autofill:hover,
.modal-form__input:-webkit-autofill:focus,
.modal-form__input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    box-shadow: 0 0 0 1000px transparent inset;
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
    transition: background-color 9999s ease-out 0s;
}

.modal-form__line {
    width: 100%;
    height: 0;
    opacity: .2;
    border-top: 1px solid #fff;
    display: block;
}

.modal-form__checks {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin-top: 16px;
}

.modal-form__check {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    width: 100%;
    position: relative;
}

.modal-form__check input {
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    margin: 0;
    opacity: 0;
    appearance: auto;
    -webkit-appearance: checkbox;
    pointer-events: auto;
}

.modal-form__box {
    width: 18px;
    height: 18px;
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, .6);
    flex: 0 0 18px;
    margin-top: 2px;
    position: relative;
    background: transparent;
}

.modal-form__check input:checked + .modal-form__box::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translate(-50%, -55%) rotate(-45deg);
}

.modal-form__check input:focus-visible + .modal-form__box {
    outline: 2px solid rgba(255, 255, 255, .9);
    outline-offset: 2px;
}

.modal-form__check-text {
    font-family: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-weight: 400;
    font-size: 11px;
    line-height: 120%;
    color: #fff;
    opacity: .6;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.modal-form__button {
    width: 100%;
}

.modal-form__submit {
    width: 100%;
    height: 51px;
    border: none;
    background: #fff;
    font-family: 'Golos Text', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 120%;
    text-align: center;
    text-transform: uppercase;
    color: #000;
    cursor: pointer;
    margin-top: 12px;
}

.modal-form__submit:hover {
    filter: brightness(.95);
}

.modal-form__submit:disabled {
    opacity: .7;
    cursor: default;
}

@media (max-width: 1024px) {
    .modal__dialog {
        padding: 40px 24px;
        gap: 24px;
    }

    .modal-form__title {
        font-size: 22px;
    }
}

@media (max-width: 640px) {
    .modal__dialog {
        width: calc(100vw - 24px);
        padding: 24px 16px;
        gap: 20px;
        max-height: calc(100vh - 24px);
        overflow: auto;
    }

    .modal__close {
        right: 16px;
        top: 16px;
    }

    .modal-form {
        flex-direction: column;
    }

    .modal-form__left {
        width: 100%;
        flex: none;
    }

    .modal-form__title {
        font-size: 20px;
    }

    .modal-form__right {
        width: 100%;
        gap: 20px;
    }

    .modal-form__checks {
        margin-top: 8px;
    }

    .modal-form__submit {
        margin-top: 8px;
    }
}
