.form-wrap {
    max-width: 900px;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
}

.bc-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.input-wrap {
    position: relative;
    width: 100%;
}

label.error {
    position: absolute;
    left: 0;
    top: -16px;
    width: 100%;
    color: red;
    font-size: 12px;
    font-family: 'Sofia Pro';
}

.input-wrap select {
    height: 45px;
    width: 100%;
    border-radius: 5px;
    font-size: 22px;
    line-height: 45px;
    padding: 0 10px;
}

.phone-wrap .phone-code {
    width: 23%;
}

.phone-wrap .phone-number {
    width: 72%;
}

.phone-wrap {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
}

.submit:hover {
    text-decoration: none;
}

.submit {
    height: 100%;
    width: 100%;
    -webkit-appearance: none;
    font-size: 22px;
    color: #ffffff;
    line-height: 1;
    display: inline-block;
    background: rgb(6, 163, 144);
    border-radius: 5px;
    text-align: center;
    -ms-transform: scale(1, 1) translate3d(0, 0, 0);
    transform: scale(1, 1) translate3d(0, 0, 0);
    transition: transform linear 0.2s;
    border: none;
    height: 45px;
    cursor: pointer;
    text-transform: uppercase;
    line-height: 45px;
}

.checkbox-wrap input.error~.checkbox-terms {
    color: red;
}

.checkbox-wrap input.valid~.checkbox-terms {
    color: black;
}

input.error {
    background: rgb(171 0 21 / 0.6);
    color: #d85030;
}

.checkbox-wrap .checkbox {
    width: 20px;
    height: 20px;
    margin: 2px;
    margin-bottom: 0px;
    float: left;
    vertical-align: middle;
    cursor: pointer;
    margin-right: 10px;
}

.checkbox-terms {
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    vertical-align: middle;
    color: #5e5e5e;
    line-height: 18px;
    user-select: none;
}

input,
textarea,
select,
button,
a:active,
a:hover {
    outline: 0;
}

.checkbox-wrap {
    width: 100%;
    display: flex;
}

.checkbox-terms a {
    color: #fff;
    text-decoration: underline;
}

.submit-btn-error {
    position: absolute;
    left: 0;
    top: -16px;
    width: 100%;
    color: red;
    font-size: 12px;
}

/* Create a custom checkbox */

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 14px;
    width: 14px;
    background-color: #20554e;
    border: 1px solid #ffffff;
    border-radius: 50%;
    opacity: 0.3;
}

/* On mouse-over, add a grey background color */

.checkbox~.checkmark {
    background-color: #20554e;
}

/* Create the checkmark/indicator (hidden when not checked) */

.checkmark:after {
    content: '';
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */

.checkbox:checked~.checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */

.checkmark:after {
    left: 4px;
    top: 2px;
    width: 4px;
    height: 6px;
    border: solid white;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.checkbox {
    visibility: hidden;
}

.checkbox-wrap {
    margin-top: 10px;
}

@media (min-width: 1600px) {
    .submit {
        height: 64px;
        line-height: 64px;
    }
}

@media (max-width: 1199px) and (min-width: 800px) {
    .form-wrap {
        padding: 0 20px;
        max-width: 100%;
    }
    .submit {
        line-height: 46px;
        height: 46px;
    }
    .checkbox-wrap {
        width: 100%;
    }
    .checkbox-terms a {
        display: inline-block;
    }
    label.error {
        top: -31px;
    }
}

@media (max-width: 767px) {
    .bc-form {
        flex-direction: column;
    }
    .submit {
        height: 39px;
        line-height: 39px;
        font-size: 16px;
    }
    .checkbox-terms a {
        display: inline;
    }
}

.checkbox-terms {
    font-family: Sofia Pro;
    font-style: normal;
    font-weight: 300;
    font-size: 12px;
    line-height: 18px;
    letter-spacing: 0.03em;
    color: #ffffff;
    opacity: 0.3;
}

/* ============================================================
   SMS-ВЕРИФИКАЦИЯ: прелоадер, попапы, intlTelInput
   (добавлено в конец существующего CSS, цвета из палитры сайта:
    фон #062727→#111515, акцент #F69828, бирюзовый #50c2ac, Sofia Pro)
   ============================================================ */

/* --- Плейсхолдер на инпуте с ошибкой валидации (читаемый на фоне ошибки) --- */
input.error::placeholder {
    color: #d85030;
    opacity: 0.6;
}

/* --- Прелоадер --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 21, 21, 0.85);
    z-index: 100000;
    display: none;
    justify-content: center;
    align-items: center;
}

#preloader[style*="block"] {
    display: flex !important;
}

#floatingCirclesG {
    position: relative;
    width: 125px;
    height: 125px;
    transform: scale(0.6);
}

.f_circleG {
    position: absolute;
    background-color: #50c2ac;
    height: 22px;
    width: 22px;
    border-radius: 12px;
    animation: f_fadeG 1.2s infinite normal;
}

#frotateG_01 { left: 0;     top: 51px;  animation-delay: 0.45s; }
#frotateG_02 { left: 15px;  top: 15px;  animation-delay: 0.6s; }
#frotateG_03 { left: 51px;  top: 0;     animation-delay: 0.75s; }
#frotateG_04 { right: 15px; top: 15px;  animation-delay: 0.9s; }
#frotateG_05 { right: 0;    top: 51px;  animation-delay: 1.05s; }
#frotateG_06 { right: 15px; bottom: 15px; animation-delay: 1.2s; }
#frotateG_07 { left: 51px;  bottom: 0;  animation-delay: 1.35s; }
#frotateG_08 { left: 15px;  bottom: 15px; animation-delay: 1.5s; }

@keyframes f_fadeG {
    0%   { background-color: #F69828; }
    100% { background-color: #50c2ac; }
}

/* --- Попапы (модальные окна) --- */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 21, 21, 0.8);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

/* jQuery .fadeIn() ставит inline display:block — возвращаем flex для центрирования */
.popup[style*="block"] {
    display: flex !important;
}

.popup_content {
    position: relative;
    background: linear-gradient(103.21deg, #0a2e2c 0%, #15191a 100.59%);
    border: 1px solid rgba(80, 194, 172, 0.25);
    border-radius: 10px;
    padding: 44px 36px 36px;
    max-width: 440px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.popup_content h3 {
    margin: 0 0 14px;
    font-family: 'Sofia Pro';
    font-weight: bold;
    font-size: 30px;
    line-height: 110%;
    color: #ffffff;
    text-align: center;
}

.popup_content > p {
    margin: 0 0 24px;
    font-family: 'Sofia Pro';
    font-weight: 300;
    font-size: 16px;
    line-height: 130%;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.popup_content #currPhone {
    color: #50c2ac;
    white-space: nowrap;
}

.close_popup {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.close_popup:hover { opacity: 1; }
.close_popup svg rect { fill: #ffffff; }

/* --- Элементы попапов: инпуты и кнопки --- */
.popup_content .jhuy {
    display: block;
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.popup_content .t-input {
    box-sizing: border-box;
    width: 100%;
    height: 54px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 5px;
    padding: 0 18px;
    font-family: 'Sofia Pro';
    font-size: 18px;
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s;
}

.popup_content .t-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.popup_content .t-input:focus {
    border-color: #50c2ac;
}

.popup_content .t-input.error {
    background: rgb(171 0 21 / 0.45);
    border-color: #d85030;
    color: #ffffff;
}

.popup_content .t-input.error::placeholder {
    color: #d85030;
    opacity: 0.6;
}

.popup_content .flex_uh {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.popup_content .t-submit {
    width: 100%;
    height: 54px;
    background: #F69828;
    border: none;
    border-radius: 5px;
    font-family: 'Sofia Pro';
    font-weight: 500;
    font-size: 20px;
    line-height: 1;
    text-transform: uppercase;
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.2s;
}

.popup_content .t-submit:hover { opacity: 0.9; }

.popup_content .change_phone {
    font-family: 'Sofia Pro';
    font-size: 15px;
    color: #50c2ac;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.popup_content .change_phone:hover { color: #6fd3bf; }

/* #codeError: только позиция/вид — display управляется через JS (см. §8.8) */
.popup_sms #codeError {
    position: relative;
    margin: 6px 0 0 0;
    font-family: 'Sofia Pro';
    font-size: 0.85rem;
    color: #d85030;
    display: none;
}

/* Ошибки jQuery Validate внутри попапов — убрать из потока, читаемый цвет (§8.5) */
.popup_sms #sms-code-error,
.popup_sms_change #phoneConfirm-error {
    position: relative !important;
    display: block !important;
    margin: 6px 0 0 0 !important;
    font-family: 'Sofia Pro';
    font-size: 0.85rem;
    color: #d85030;
    background: transparent !important;
    top: auto;
    left: auto;
    width: 100%;
}

/* --- intlTelInput: оверрайды под тёмную тему сайта --- */
/* Основная форма */
.third .iti {
    display: block;
    width: 100%;
    max-width: 400px;
}

.third .iti input#phone {
    padding-left: 52px !important;
    width: 100%;
    max-width: none;
    margin-right: 0;
}

/* Попап смены номера */
.popup_sms_change .iti {
    display: block;
    width: 100%;
}

.popup_sms_change .iti .t-input {
    padding-left: 64px !important;
}

/* Флаг и выпадающий список */
.iti__flag-container { z-index: 2; }

.iti__selected-flag {
    background: transparent;
}

.iti__selected-flag:hover,
.iti__selected-flag:focus {
    background: rgba(255, 255, 255, 0.08);
}

.iti__country-list {
    background: #0e2624;
    border: 1px solid rgba(80, 194, 172, 0.3);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.iti__country {
    color: #ffffff;
    padding: 8px 10px;
}

.iti__country.iti__highlight,
.iti__country:hover {
    background-color: rgba(80, 194, 172, 0.18);
}

.iti__divider {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.iti__dial-code {
    color: rgba(255, 255, 255, 0.6);
}

/* Ошибка валидации внутри .iti не должна сдвигать флаг (§8.7) */
.iti #phone-error,
.iti #phoneConfirm-error {
    position: absolute !important;
    left: 0;
    top: 100%;
    margin: 2px 0 0 0 !important;
    width: 100%;
}

/* Запас под текст ошибки телефона на основной форме */
.phone-input-wrap {
    margin-bottom: 24px;
}