.hidden {
    display: none !important;
}

input:focus,
textarea:focus {
	outline: none;
}

input:not([type="checkbox"]),
textarea {
	-webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

button {
    outline: none;
    border: 0;
    cursor: pointer;
}

button:active {
    outline: none;
}

button:focus {
    outline: none;
}

#change-number {
    cursor: pointer;
    text-align: center;
    justify-content: center;
}

#name-error,
#phone-error,
#email-error,
#phoneConfirm-error,
#footerName-error,
#footerEmail-error,
#footerPhone-error,
#codeError {
    display: inherit;
    background: transparent !important;
    font-size: 11px;
    width: auto;
    height: auto;
    color: red;
    position: absolute;
    top: 100%;
    left: 16px;
    margin-top: 4px;
    font-family: Verdana, Arial;
}

#phone-error {
    left: 0;
}

#phoneConfirm-error {
    left: 0;
}

#codeError {
    
}

.iti.iti--allow-dropdown {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iti.iti--allow-dropdown {
    flex-direction: column;
    align-items: flex-start;
}

.iti__country-name {
    color: #202020;
}

.iti-mobile .iti--container {
    z-index: 999999999;
}

#phone {
    padding-left: 64px;
}

#change-number {
    display: block;
    margin: 0 auto;
    font-weight: 400;
    font-size: 16px;
    line-height: 120%;
    color: #686868;
    margin-top: 15px;
    text-align: center;
}

#codeError {
    display: none;
}

.popup * {
    font-family: Verdana, Arial;
}

.popup {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999999;
}

.popup_content {
    width: 514px;
    background: #FFFFFF;
    border-radius: 10px;
    padding: 34px 43px 50px 43px;
    position: relative;
}

.close_popup {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
}

.popup h3 {
    font-weight: 700;
    font-size: 28px;
    line-height: 34px;
    color: #191938;
    margin-bottom: 25px;
}

.popup p {
    color: #191938;
    margin-bottom: 10px;
}

.popup label {
    margin-bottom: 20px;
    display: block;
    position: relative;
}

.popup input {
    border: 1px solid #C0C0C0;
    border-radius: 5px;
    width: 100%;
}

.popup button {
    width: 100%;
}

.popup .politic {
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;
    color: #747474;
    max-width: 358px;
    display: block;
}

.popup .form_button {
    margin-bottom: 20px;
}

.popup_sms_change h3 {
    margin-bottom: 10px;
}

.popup_sms_change h3 ~ p {
    font-weight: 400;
    font-size: 18px;
    line-height: 120%;
    color: #686868;
    margin-bottom: 14px;
}

.popup .btn_gradient {
    width: 100%;
}

@media (max-width: 575px) {
    .popup_content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        align-content: center;
    }
    .popup_content form {
        width: 100%;
    }
}

#tildaformcaptchabox {
    display: none !important;
}

/* =====================================================================
   ТЁМНАЯ ТЕМА ПОПАПОВ — под дизайн сайта (Montserrat, тёмный фон, зелёный акцент)
   ===================================================================== */

:root {
    --lead-bg: #14181a;
    --lead-bg-input: #1d2225;
    --lead-text: #ffffff;
    --lead-text-muted: rgba(255, 255, 255, 0.6);
    --lead-border: rgba(255, 255, 255, 0.14);
    --lead-accent: #50ff8a;
    --lead-accent-2: #2cce8a;
    --lead-danger: #ff5b5b;
}

/* Центрируем попап, даже когда jQuery.fadeIn выставляет inline display:block */
.popup[style*="display: block"],
.popup[style*="display:block"] {
    display: flex !important;
}

.popup {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.popup *,
#preloader * {
    font-family: 'Montserrat', 'Arial', sans-serif;
}

.popup_content {
    width: 440px;
    max-width: 90%;
    background: var(--lead-bg);
    border: 1px solid var(--lead-border);
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.popup h3 {
    color: var(--lead-text);
    font-weight: 700;
    font-size: 26px;
    line-height: 1.2;
    margin-bottom: 10px;
    text-align: center;
}

.popup p {
    color: var(--lead-text-muted);
    font-size: 15px;
    line-height: 1.45;
    text-align: center;
    margin-bottom: 22px;
}

.popup p #currPhone {
    color: var(--lead-accent);
    font-weight: 600;
}

.popup label {
    margin-bottom: 18px;
}

.popup input,
.popup .t-input {
    width: 100%;
    height: 52px;
    background: var(--lead-bg-input);
    border: 1px solid var(--lead-border);
    border-radius: 10px;
    color: var(--lead-text);
    font-size: 16px;
    padding: 0 18px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.popup input::placeholder,
.popup .t-input::placeholder {
    color: var(--lead-text-muted);
    opacity: 1;
}

.popup input:focus,
.popup .t-input:focus {
    border-color: var(--lead-accent);
}

/* Читаемый плейсхолдер на фоне ошибки валидации */
input.error::placeholder {
    color: #d85030;
    opacity: 0.6;
}

.popup input.error,
.popup .t-input.error {
    border-color: var(--lead-danger);
}

.popup .flex_uh {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.popup button,
.popup .t-submit {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--lead-accent-2), var(--lead-accent));
    color: #0a0f0b;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.05s ease;
}

.popup button:hover,
.popup .t-submit:hover {
    filter: brightness(1.08);
}

.popup button:active,
.popup .t-submit:active {
    transform: translateY(1px);
}

.popup .politic {
    color: var(--lead-text-muted);
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    display: block;
    margin-top: 16px;
    max-width: 100%;
}

.popup .politic a {
    color: var(--lead-accent);
    text-decoration: underline;
}

/* "Изменить номер" */
#change-number,
.change_phone {
    display: block;
    margin: 16px auto 0;
    color: var(--lead-text-muted);
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}

#change-number:hover,
.change_phone:hover {
    color: var(--lead-accent);
}

.close_popup {
    top: 18px;
    right: 18px;
}

.close_popup svg rect {
    fill: var(--lead-text-muted);
    transition: fill 0.2s ease;
}

.close_popup:hover svg rect {
    fill: var(--lead-text);
}

/* === intlTelInput под тёмную тему === */
.popup .iti {
    width: 100%;
}

.popup .iti .t-input,
.popup .iti input {
    padding-left: 64px !important;
}

.iti__selected-flag {
    background: transparent;
    border-radius: 10px 0 0 10px;
}

.iti__selected-flag:hover,
.iti__flag-container:hover .iti__selected-flag {
    background: rgba(255, 255, 255, 0.06);
}

.iti__country-list {
    background: var(--lead-bg-input);
    border: 1px solid var(--lead-border);
    color: var(--lead-text);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.iti__country {
    color: var(--lead-text);
}

.iti__country.iti__highlight {
    background: rgba(80, 255, 138, 0.12);
}

.iti__country-name,
.iti__dial-code {
    color: var(--lead-text);
}

.iti__dial-code {
    color: var(--lead-text-muted);
}

.iti__divider {
    border-color: var(--lead-border);
}

/* === Ошибки jQuery Validate внутри попапов === */
.popup .jhuy {
    position: relative;
}

.popup #name-error,
.popup #email-error,
.popup #phone-error,
.popup #phoneConfirm-error {
    position: absolute !important;
    left: 0;
    top: 100%;
    margin: 4px 0 0 2px !important;
    font-size: 12px;
    color: var(--lead-danger) !important;
    background: transparent !important;
}

/* Внутри .iti ошибка должна быть абсолютной, чтобы не смещать флаг */
.iti #phone-error,
.iti #phoneConfirm-error {
    position: absolute !important;
    left: 0;
    top: 100%;
    margin: 4px 0 0 0 !important;
}

/* #codeError: только цвет/позиция, display НЕ трогаем (управляется из JS) */
.popup_sms #codeError {
    position: absolute !important;
    left: 0;
    top: 100%;
    margin: 4px 0 0 2px !important;
    font-size: 12px;
    color: var(--lead-danger) !important;
    background: transparent !important;
}

@media (max-width: 575px) {
    .popup_content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
        border: none;
        padding: 28px 24px;
        display: flex;
        flex-wrap: wrap;
        align-content: center;
    }

    .popup_content form,
    .popup_content .close_popup {
        width: 100%;
    }

    .popup_content .close_popup {
        width: auto;
    }
}
