.popup-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    background-color: #1F1F1F80;
    z-index: 10000;
}

.popup-wrapper.active {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: scroll;
}

.popup-form {
    display: flex;
    flex-direction: column;
    width: fit-content;
    max-width: 480px;
    min-width: 320px;
    width: 100%;
    height:auto;
    margin: auto;
    padding: 32px;
    position: relative;
    gap: 12px;
    border-radius: 6px;
    border: 1px solid #DFDFDF;
    background-color: white;
}

.popup-form__title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-form__title span {
    font-family: Roboto, sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 100%;
    color: #1F1F1F;
}

.popup-form [close-popup] {
    position: absolute;
    z-index: 5;
    right: 32px;
    cursor: pointer;
    @media(max-width: 480px){
        right: 18px;
    }
}

.popup-form__hidden.active {
    display: block;
}

.popup-form__text-min {
    font-family: Roboto, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 140%;
    color: #514F4F;
}

.popup-form__group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popup-form .input-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    gap:12px;
}
.popup_radio_container{
    margin-top:24px;
    @media(max-width: 480px){
        margin-top:12px;
    }
}
.popup_radio_container,
.popup_radio_container .input_checkbox{
    display: flex;
    flex-direction:column;
    gap:12px;
}
.input_title{
    font-family: Inter;
    font-weight: 500;
    font-style: Medium;
    font-size: 18px;
    leading-trim: NONE;
    line-height: 100%;
    letter-spacing: 0%;
    vertical-align: middle;
    @media(max-width: 480px){
        font-size: 14px;
        line-height: 130%;
    }
}
.popup-form .input-container span,
.popup_radio_container .span_title
{
    font-size:16px;
    font-family: Inter;
    font-weight: 400;
    line-height: 160%;

    @media(max-width: 480px){
        font-size: 14px;
        line-height: 140%;
    }
}
.text-s{
    font-family: Roboto;
    font-weight: 400;
    font-style: Regular;
    font-size: 14px;
    leading-trim: NONE;
    line-height: 140%;
    letter-spacing: 0%;
    vertical-align: middle;
}

.popup-form .input-container input {
    width: 100%;
    height: 48px;
    padding: 11px 16px;
    background: white;
    border: 1px solid #DFDFDF;
    border-radius: 6px;
    font-family: Roboto, sans-serif;
    font-size: 14px;
    line-height: 1;
}

.popup-form .input-container .clear {
    position: absolute;
    right: 16px;
    bottom: 17px;
    cursor: pointer;
}

.popup-form__accept {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input_checkbox__container_a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    margin: 12px 0 0;
}


.input_checkbox__container_a input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.input_checkbox__container_a .checkbox-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.input_checkbox__container_a .checkbox-icon {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M5 3H15C16.1046 3 17 3.89543 17 5V15C17 16.1046 16.1046 17 15 17H5C3.89543 17 3 16.1046 3 15V5C3 3.89543 3.89543 3 5 3Z" stroke="%23DFDFDF" stroke-width="2"/></svg>');
}

.input_checkbox__container_a input:checked + .checkbox-icon {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M2 5C2 3.34315 3.34315 2 5 2H15C16.6569 2 18 3.34315 18 5V15C18 16.6569 16.6569 18 15 18H5C3.34315 18 3 16.6569 3 15V5Z" fill="%2372C2F8"/><path fill-rule="evenodd" clip-rule="evenodd" d="M15.0252 7.52524L9.19183 13.3586C8.94775 13.6027 8.55202 13.6027 8.30794 13.3586L4.97461 10.0252L5.85849 9.14136L8.74988 12.0327L14.1413 6.64136L15.0252 7.52524Z" fill="white"/></svg>');
}

.input_checkbox__container_a span {
    font-family: Roboto, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 140%;
    color: #514F4F;
}

.red {
    color: red;
}
.peach{
    color: #DB5234;
}

.popup-form__button {
    cursor: pointer;
    width: 100%;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background: #4daceb;
    color: white;
    font-family: Roboto, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    transition: background 0.2s;
    height:48px;
}

.popup-form__button:hover {
    background: #3A9BD9;
}
.popup-form__button--secondary {
    cursor: pointer;
    width: 100%;
    padding: 10px 20px;
    background: none;
    border-radius: 4px;
    color: #757575;
    font-family: Roboto, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    transition: background 0.2s;
    border: 1px solid #2B2B2B;
    height: 48px;
}

.popup-form__button--secondary:hover {
    color: #1F1F1F;
    border: 1px solid #1F1F1F;
}
.popup-form__button--secondary2 {
    cursor: pointer;
    width: 100%;
    padding: 10px 20px;
    border-radius: 4px;
    background: #DB5234;
    color: #1F1F1F;
    font-family: Roboto, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    transition: background 0.2s;
    border: 0;
    color:white;
    height: 48px;
}

.popup-form__button--secondary2:hover {
    background: #db5234d1;
}


.popup-wrapper .popup-form__buttons {
    display: flex;
    gap: 24px;
    width: 100%;
}
/* #check_inn{
    margin-top:12px;
} */

.popup-form__info {
    font-family: Roboto, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 140%;
    color: #514F4F;
}

.popup-form__actions {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.popup-form__actions button {
    background: none;
    border: none;
    color: #4daceb;
    cursor: pointer;
    font-family: Roboto, sans-serif;
    font-size: 14px;
    text-decoration: underline;
}

.popup-success {
    display: none;
    flex-direction: column;
    width: fit-content;
    max-width: 480px;
    margin: auto;
    padding: 38px 58px;
    gap: 12px;
    border-radius: 6px;
    border: 1px solid #DFDFDF;
    background-color: white;
}

.popup-success .popup-success__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 324px;
    text-align: center;
}

.popup-success__text h2 {
    font-family: Roboto, sans-serif;
    font-weight: 500;
    font-size: 26px;
    line-height: 100%;
}

.popup-success__text p {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 160%;
}

/* Мобильная адаптация */
@media (max-width: 480px) {
    .popup-form {
        margin-top: 34px;
        padding: 12px 16px;
        gap: 12px;
    }

    .popup-wrapper .popup-form__buttons {
        flex-direction: column;
        gap: 12px;
    }

    .popup-success {
        padding: 17px 27px;
    }
}

@media (max-width: 360px) {
    .popup-form__title span {
        font-size: 18px;
    }

    .popup-success__text h2 {
        font-size: 22px;
    }

    .popup-success__text p {
        font-size: 14px;
    }
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ========== */
/* Радио-кнопки (registration_opt) */
.input_radio__container_a {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}
.input_radio__container_a input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.input_radio__container_a .radio-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M10 2C14.4183 2 18 5.58172 18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2Z" stroke="%23DFDFDF" stroke-width="2"/></svg>');
}
.input_radio__container_a input:checked + .radio-icon {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10Z" fill="%2372C2F8"/><path d="M9.99967 13.3334C8.15873 13.3334 6.66634 11.841 6.66634 10.0001C6.66634 8.15913 8.15873 6.66675 9.99967 6.66675C11.8406 6.66675 13.333 8.15913 13.333 10.0001C13.333 11.841 11.8406 13.3334 9.99967 13.3334Z" fill="white"/></svg>');
}

/* Текстовая область (registration_opt) */
.question-form_group {
    margin-top: 12px;
}
.question-form_group span{
    margin-bottom: 12px;
}
.question-form_area {
    width: 100%;
    min-height: 100px;
    padding: 11px 16px;
    border: 1px solid #DFDFDF;
    border-radius: 6px;
    font-family: Roboto, sans-serif;
    font-size: 14px;
    resize: vertical;
}
.question-form_info {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: -8px;
}

/* Блоки для восстановления пароля (repair_password) */
.popup-form_repier {
    display: none;
    flex-direction: column;
    gap: 12px;
}
.dropdown.open .popup-form_repier {
    display: flex;
}
.popup-repier-form .input_checkbox__container_a{
    margin-top:32px;
    @media(max-width: 480px){
        margin-top:16px;
    }
}

.dropdown.open #toggle-repier-form svg {
    transform: rotate(180deg);
    transition: transform 0.2s ease; /* можно оставить плавность, но не обязательно */
}
#toggle-repier-form svg {
    transition: transform 0.2s ease;
}
.popup-form_repier .input-container span,
#popup-registration-form .input-container span
{
    margin-top: 12px;
}

/* Скрытие первого шага в repair_password при показе repier */
.popup-form.hide-first-step .first-step-group,
.popup-form.hide-first-step .first-step-accept {
    display: none;
}

#messege-form {
    display: none;   /* скрыт по умолчанию */
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    margin: auto;
    padding: 32px;
    gap: 24px;
    border-radius: 6px;
    border: 1px solid #DFDFDF;
    background-color: white;
    position: relative;
    @media(max-width: 480px){

    }
}
#messege-form [close-popup] {
    position: absolute;
    right: 32px;
    top: 32px;
    cursor: pointer;
}
#messege-form p {
    font-family: Inter;
    font-weight: 400;
    font-style: Regular;
    font-size: 16px;
    leading-trim: NONE;
    line-height: 160%;
    letter-spacing: 0%;
    text-align: center;
    vertical-align: middle;
    text-decoration-style: solid;
    text-decoration-offset: 0%;
    text-decoration-thickness: 0%;
    color:black;
    max-width:358px;
    margin-inline: auto;
}

/* Выпадающий список (dropdown) */
.input-container.dropdown {
    position: relative;
}
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #DFDFDF;
    border-radius: 6px;
    z-index: 10;
    padding: 8px 0;
    -webkit-box-shadow: 3px 5px 8px 0px rgba(34, 60, 80, 0.2);
    -moz-box-shadow: 3px 5px 8px 0px rgba(34, 60, 80, 0.2);
    box-shadow: 3px 5px 8px 0px rgba(34, 60, 80, 0.2);
}
.input-container.dropdown.open .submenu {
    display: block;
}
.submenu .submenu-el {
    padding: 12px;
    cursor: pointer;
    font-family: Roboto, sans-serif;
    font-size: 14px;
}
.submenu-el div{
    padding:11px 16px;
    font-family: Inter;
    font-weight: 400;
    font-size: 16px;
    line-height: 160%;
    color:#757575;
    @media(max-width: 480px){
        font-size: 14px;
        line-height: 140%;
    }


}

.submenu .submenu-el:hover div{
    background: #6EC1F90F;
    color:#1F1F1F;
    border: 1px solid #94D4FF;
    border-radius: 6px;
    padding:10px 15px;
}



/* Адаптация для messege на мобильных */
@media (max-width: 480px) {
    #messege-form {
        padding: 12px 16px;
    }
    #messege-form [close-popup] {
        right: 16px;
        top: 16px;
    }
}



ul[default] {
    display: block;
    list-style-type: disc;
    padding-left: 20px;
    margin-top:4px;
    @media(max-width: 480px){
        margin-top: 0;
    }
}


ul[default] li {
    display: list-item;
    text-align: -webkit-match-parent;
    @media(max-width: 900px){
        font-size: 14px;
    }
}
.ul-default-title{
    margin-left: -20px;
}


.popup-form_repier {
    display: none;
}
.open .popup-form_repier {
    display: flex;
}

/* Убедимся, что submenu (выпадающий список) не мешает анимации */
.submenu {
    display: none;
}
[bg-gray]{
    padding: 13px 16px;
    background: #F9F9F9;
    margin-top:24px!important;
    @media(max-width: 480px){
        margin-top:16px!important;
    }
}
[repier-form-content]{
    align-items: center;
    display: flex;
}
.span-title{
    font-family: Inter;
    font-weight: 500;
    font-style: Medium;
    font-size: 18px;
    leading-trim: NONE;
    line-height: 100%;
    letter-spacing: 0%;
    vertical-align: middle;
    @media(max-width: 480px){
        font-family: Roboto;
        font-size: 14px;
        line-height: 130%;
    }

}
[data-popup-item="repair_password"] #popup-repier-form{
    border-radius: 6px 6px 0 0;
    border-bottom: 0;
    padding-bottom:0px;
}
[data-popup-item="repair_password"] #popup-repier-form2{
    border-radius: 0 0 6px 6px ;
    border-top: 0;
    padding-top:24px;
    @media(max-width: 480px){
        margin-top:0;
    }
}
#toggle-repier-form{
    display: flex;
    align-items: center;
    margin-top:12px
}