.legal .personal-wrap__orders {
    display: flex;
    gap: 28px;
}
.legal-form__wrap {
    max-width: 704px;
}

.legal-form__input {
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    line-height: 19px;
    border: 1px solid #217AFF;
    border-radius: 12px;
    padding: 16px 19px;
    margin-bottom: 20px;
}

.legal-form__input::-webkit-input-placeholder       {opacity: 1; transition: opacity 0.3s ease;}
.legal-form__input::-moz-placeholder                {opacity: 1; transition: opacity 0.3s ease;}
.legal-form__input:-moz-placeholder                 {opacity: 1; transition: opacity 0.3s ease;}
.legal-form__input:-ms-input-placeholder            {opacity: 1; transition: opacity 0.3s ease;}
.legal-form__input:focus::-webkit-input-placeholder {opacity: 0; transition: opacity 0.3s ease;}
.legal-form__input:focus::-moz-placeholder          {opacity: 0; transition: opacity 0.3s ease;}
.legal-form__input:focus:-moz-placeholder           {opacity: 0; transition: opacity 0.3s ease;}
.legal-form__input:focus:-ms-input-placeholder      {opacity: 0; transition: opacity 0.3s ease;}

.legal-form__input::placeholder {
    color: #496780;
}

/* checkbox */
.legal-form__select {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 20px;
    width: 100%;
    border: 1px solid #BFD9FF;
    border-radius: 12px;
}

.legal-form__under-label {
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
}
.legal-form__label {
    position: relative;
    width: 100%;
    padding: 19px 12px 10px 19px;
    display: flex;
    align-items: center;
}
.legal-form__label {
    padding-bottom: 19px;
}
.legal-form__label::after {
    content: "";
    position: absolute;
    background-image: url("../../images/forlegal/arrow.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto;
    width: 24px;
    height: 24px;
    right: 19px;
    top: 19px;
    transition: translegal-form 0.3s ease;
}
.legal-form__label.active::after {
    translegal-form: rotate(180deg); /* Поворот на 180 градусов при активации */
}

.legal-form__check {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: inset(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}

.legal-form__mark {
    width: 24px;
    height: 24px;
    border: 1px solid #4571FB;
    border-radius: 4px;
    background-color: #E8F1FF;
    cursor: pointer;
    display: block;
    position: relative;
}

.legal-form__check:checked + .legal-form__mark::after {
    content: "";
    position: absolute;
    background-image: url("../../images/forlegal/mark.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto;
    top: 6px;
    left: 7px;
    width: 11px;
    height: 11px;
}

.legal-form__label-text {
    font-size: 15px;
    font-weight: 400;
    line-height: 19px;
    color: #4571FB;
    margin-left: 20px;
}

.legal-form__requisites-wrap,
.legal-form__contacts-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 28px;
    margin-bottom: 30px;
}
.legal-form__contacts-wrap {
    margin-bottom: 39px;
}

@media (max-width: 768px) {
    .legal-form__requisites-wrap,
    .legal-form__contacts-wrap {
        grid-template-columns: 1fr;
    }
}

.legal-form__requisites-wrap .legal-form__input,
.legal-form__contacts-wrap .legal-form__input {
    margin-bottom: 0;
}

.legal-form__subtitle {
    margin: 33px 0 15px;
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    color: #496780;
}

.legal-form__btn-wrap {
    display: flex;
    gap: 21px;
}

@media (max-width: 768px) {
    .legal-form__btn-wrap {
        align-items: center;
        justify-content: center;
    }
}
@media (max-width: 430px) {
    .legal-form__btn-wrap {
        flex-direction: column;
    }
}

.legal-form__btn {
    padding: 13px 10px;
    min-width: 200px;
    font-size: 16px;
    font-weight: 700;
    line-height: 19px;
    border: 2px solid #4571FB;
    border-radius: 100px;
    color: #fff;
    background-color: #4571FB;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.legal-form__btn:hover {
    border-radius: 100px;
    color: #217AFF;
    background-color: #fff;
}


.legal-form__select-content {
    display: none;
    grid-template-columns: 48% 50%;
    gap: 10px 15px;
    padding-bottom: 29px;
}
.legal-form__under-label:nth-of-type(odd) {
    padding: 9px 10px 0 44px;
}
.legal-form__under-label:nth-of-type(even) {
    padding: 10px 10px 0 12px;
}
.legal-form__label-undertext {
    font-family: var(--inter);
    font-size: 16px;
    font-weight: 400;
    line-height: 19px;
    margin-left: 21px;
}
.legal-form__select .active .legal-form__label-text {
    font-weight: 700;
}
@media (max-width: 768px) {
    .legal-form__btn {
        width: 260px;
    }
    .legal .personal-wrap__orders {
        flex-direction: column;
        gap: 40px;
    }
    .legal-form__under-label:nth-of-type(odd),
    .legal-form__under-label:nth-of-type(even) {
        padding: 0 10px 0 22px;
    }
    .legal-form__select-content {
        gap: 10px;
    }
    .legal-form__label-text {
        font-size: 14px;
        line-height: 16.8px;
    }
    .legal-form__input {
        padding: 16px 19px 15px;
    }
    .legal-form__requisites-wrap {
        margin-bottom: 0;
    }
    .legal-form__subtitle {
        margin: 17px 0 15px;
        font-size: 14px;
        line-height: 19.6px;
    }
    .legal {
        padding: 20px 0 79px;
    }
}
@media (max-width: 550px) {
    .legal-form__select-content {
        grid-template-columns: 1fr;
        padding-left: 40px;
        padding-bottom: 10px;
    }
    .legal-form__under-label:nth-of-type(odd) {
        justify-content: flex-start;
    }
    .legal-form__under-label {
        padding: 5px 15px;
    }
}