.form-connector {
    position: relative;
    width: 100%;
    z-index: 2;
}

.lead {
    position: relative;
    width: 90dvw;
    max-width: 1300px;
    z-index: 1;
    box-shadow: 0px 4px 20px rgba(51, 51, 51, 0.12), 0px 0px 3px rgba(51, 51, 51, 0.08);
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 40px;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid #e38550;
    background-color: white;
}

.lead__fields-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
}

.lead__field-group {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: flex-start;
    align-items: flex-start;
    flex: 1.5;
}

.lead__field-group:has(._number) {
    flex: 1;
}

.lead__input-label {
    white-space: nowrap;
    font-family: Inter, sans-serif;
    font-size: 16px;
    color: black;
}

.lead__input-label:after {
    content: '*';
    display: inline-block;
    color: #ff6d0c;
    margin-left: 4px;
    width: max-content;
    height: 100%;
}

.lead__input {
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    color: initial;
    border: 1px solid #BEC6CE;
    border-radius: 8px;
    padding: 0 12px;
}

.lead__input._number {
    text-align: center;
    max-width: 80px;
}

.lead__input-wrap {
    display: flex;
    flex-direction: row;
    gap: 6px;
    justify-content: flex-start;
    align-items: center;
}

.lead__button-input {
    width: 35px;
    height: 40px;
    background-color: #FFFFFF;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid #bec6ce;
}

.lead__button {
    width: max-content;
    height: 40px;
    font-weight: 500;
}

.lead__agreement {
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 16px;
    width: 100%;
    justify-content: space-between;
    align-items: end;
}

.lead .mainmodal__soc > li > a {
    height: 40px;
}

.lead__button-wrapper {
    width: 100%;
    display: contents; /* Ключевое свойство */
}

.lead__button {
    width: auto;
    height: 40px;
    align-self: flex-end;
}


.lead .btn-phone {
    border-color: #29A9EB;;
}

.lead._popup .mainmodal__soc {
    flex-direction: column;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .lead__button {
        margin-bottom: 0;
    }

    .lead__field-group + .lead__button-wrapper,
    .lead__field-group + .lead__button-wrapper .lead__button {
        margin-top: 0;
    }
}

.error-message {
    position: absolute;
    color: #ee5445;
    font-size: 12px;
    line-height: 14px;
    bottom: -16px;
}

.dropdown {
    position: relative;
    width: 100%;
    cursor: pointer;
    
}

.dropdown__header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background-color: #FFFFFF;
    transition: border-radius 0.3s;
}

.dropdown__arrow {
    transition: transform 0.3s;
}

.dropdown__options {
    margin-top: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 0 0 8px 8px;
    transition: max-height 0.3s, border-color 0.3s, background-color 0.3s;
    z-index: 10;
}

.dropdown__options li {
    padding: 8px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown__options li&:hover {
    background: #f5f5f5;
}

.dropdown.active .lead__input:active {
    border-color: #e8e9e9;
}

.dropdown.active .dropdown__header {
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.dropdown.active .dropdown__options {
    max-height: 300px;
    border-color: #ddd;
    background-color: #FFFFFF;
    color: black;
}

.checkbox {
    display: flex;
    flex-direction: row;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    align-items: center;
}

.checkbox__visible {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid #D2D3D3;
    border-radius: 2px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.checkbox__links {
    color: black;
}

.checkbox__links a:hover {
    color: #0FC4AC;
}

.checkbox__visible svg {
    width: 14px;
    height: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkbox__hidden-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.checkbox__hidden-input:checked + .checkbox__visible {
    background-color: #E28949;
    border-color:#E28949;
}

.checkbox__hidden-input:checked + .checkbox__visible svg {
    opacity: 1;
}

.checkbox a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
    cursor: pointer;
    white-space: break-spaces;
}

.checkbox a:hover {
    color: #16ebcf;
}

/* Стили для ошибки */
.checkbox.error .checkbox__visible {
    border-color: #ff4444;
}

.mainmodal .lead {
    width: 100%;
}

.mainmodal._popup .lead {
    max-width: 480px;
}

.mainmodal._popup .lead__agreement {
    flex-direction: column;
    align-items: flex-start;
}

.mainmodal._popup .lead__button {
    margin: 0;
    width: 100%;
}


.mainmodal._popup .mainmodal__soc,.tour-detail_right_item .mainmodal__soc  {
   flex-direction: column;
}

.tour-detail_right_item .lead {
    width: auto;
    gap: 8px;
    padding: 0;
    box-shadow: none;
    
    border: none;
    border-radius: 0;
}

.tour-detail_right_item .mainmodal__soc span {
    white-space: nowrap;
}

.tour-detail_right_item .lead__title {
    margin: 0;
}

.tour-detail_right_item .lead__title-desc {
    text-align: center;
    margin: 0 0 8px;
}

.tour-detail_right_item .lead .lead__button {
    width: 100%;
}

.tour-detail_right_item .lead__agreement {
    margin-bottom: 12px;
    font-size: 12px;
}
@media (max-width: 1360px) {
    .form-connector {
        width: 100%;
        max-width: 1200px;
        padding-left: 20px;
        padding-right: 20px;
        margin-right: auto;
        margin-left: auto;
    }
    
    .lead {
        width: 100%;
    }
}

@media (max-width: 992px) {
    
    .form-connector {
        width: auto;
        padding-left: 14px;
        padding-right: 14px
    }

    .tour-detail_right_item:has(.lead) {
        display: none!important;
    }
}

@media (max-width: 768px) {
    .lead {
       width: 100%;
        padding: 20px;
    }
    
    .form-connector {
        max-width: 1200px;
    }

    header {
        padding-bottom: 80px !important;
    }
    
}

@media (max-width: 568px) {
    .checkbox {
        font-size: 14px;
    }

    .lead__button {
        margin-top: 0;
        align-self: flex-start;
    }
    
    .lead__fields-wrapper {
        flex-direction: column;
    }

    .lead__field-group:not(.lead__field-group:has(._number)) {
        width: 100%;
    }
    
    .lead__button {
        margin: 0;
    }
}