/* --- ОСНОВА ФОРМЫ --- */
.custom-form-wrapper {
    width: 100%;
    margin: 0 auto;
    font-family: "Nunito", sans-serif;
    box-sizing: border-box;
    padding: 10px 25px 30px 25px; 
    background-color: #fff;
    position: relative;
}
.custom-form-wrapper * {
    box-sizing: border-box; 
}

/* --- ЗАГОЛОВОК --- */
.custom-form-header { margin-bottom: 20px; text-align: left; }
.form-title {
    font-family: "Nunito", sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1.2;
    color: #d30a75;
    margin: 0 0 15px 0;
    padding-right: 20px;
}
.form-description {
    font-family: "Nunito", sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #2358a5;
    margin: 0;
    text-align: justify;
}

/* --- ПОЛЯ --- */
.custom-field-label {
    display: block;
    font-family: "Nunito", sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #2358a5 !important;
    margin-bottom: 5px;
}
.custom-field-label .required { color: #d30a75 !important; margin-left: 3px; }

.custom-input-field {
    width: 100%;
    border: 2px solid #2358a5 !important;
    border-radius: 10px !important;
    background-color: #FFFFFF !important;
    min-height: 50px !important;
    color: #000 !important;
    padding: 10px 15px !important;
    font-size: 16px !important;
    outline: none !important;
    font-family: "Nunito", sans-serif !important;
    transition: all 0.2s ease;
}
.custom-input-field:focus { border-color: #d30a75 !important; }

textarea.custom-input-field { min-height: 130px !important; resize: vertical; }
.custom-form-group { margin-bottom: 15px; width: 100%; position: relative; }

/* --- ИСПРАВЛЕНИЕ ТЕЛЕФОННОГО СПИСКА (ЖЕСТКИЙ FIX) --- */

/* Контейнер библиотеки */
.iti { 
    width: 100%; 
    display: block;
    position: relative; /* Важно для позиционирования списка */
}

/* Поле ввода внутри телефона */
.iti input {
    width: 100% !important;
    border: 2px solid #2358a5 !important;
    border-radius: 10px !important;
    min-height: 50px !important;
    padding-left: 90px !important; /* Место под флаг */
    font-size: 16px !important;
    color: #000 !important;
}
.iti input:focus { border-color: #d30a75 !important; }

/* Контейнер с флагом (Серый блок слева) */
.iti__flag-container {
    position: absolute !important;
    top: 0;
    bottom: 0;
    left: 0;
    background: #e6e6e6 !important; /* Серый фон */
    border-radius: 8px 0 0 8px !important;
    border-right: 1px solid #ccc;
    padding: 0 8px !important;
    z-index: 10;
}

/* Выбранный флаг */
.iti__selected-flag {
    background-color: transparent !important;
    padding: 0 6px 0 8px !important;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Стрелочка вниз */
.iti__arrow {
    border-top-color: #555 !important;
    margin-left: 6px !important;
}

/* САМ ВЫПАДАЮЩИЙ СПИСОК */
.iti__country-list {
    position: absolute !important;
    z-index: 99999 !important; /* Чтобы точно было поверх всего */
    list-style: none !important; /* УБИРАЕМ ТОЧКИ СПИСКА */
    text-align: left !important;
    padding: 0 !important;
    margin: 5px 0 0 0 !important;
    box-shadow: 1px 1px 15px rgba(0, 0, 0, 0.2) !important;
    background-color: white !important;
    border: 1px solid #ccc !important;
    border-radius: 5px !important;
    max-height: 200px !important;
    overflow-y: scroll !important;
    width: 100% !important; /* Ширина списка как у поля */
}

/* Скрываем список по умолчанию (библиотека сама это делает, но на всякий случай) */
.iti__country-list.iti__hide {
    display: none !important;
}

/* Элемент списка (страна) */
.iti__country {
    padding: 10px 10px !important;
    outline: none !important;
    border-bottom: 1px solid #f0f0f0;
    display: flex !important;
    align-items: center !important;
}
.iti__country:last-child { border-bottom: none; }

/* Текст внутри списка */
.iti__country-name, .iti__dial-code {
    font-size: 14px !important;
    color: #333 !important;
    margin-left: 8px !important;
    vertical-align: middle !important;
}

/* Картинка с флагами (подгружаем надежный источник) */
.iti__flag { 
    background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.19/img/flags.png") !important; 
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .iti__flag { background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.19/img/flags@2x.png") !important; }
}

/* --- КНОПКА (ШИРИНА 100%) --- */
.custom-form-submit {
    margin-top: 25px;
    width: 100%;
}

.custom-submit-btn {
    width: 100% !important;
    display: block;
    border-radius: 50px !important;
    padding: 16px 20px !important;
    background: #d30a75 !important;
    
    font-family: "Arial Narrow", sans-serif !important; 
    font-weight: 700 !important;
    font-size: 16px !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    
    color: #fff !important;
    border: none !important;
    cursor: pointer;
    transition: background 0.2s linear;
    text-align: center;
}
.custom-submit-btn:hover {
    background: #b00862 !important;
}
.custom-submit-btn:disabled {
    background: #ccc !important;
}

/* Сообщения */
.custom-form-message {
    display: none;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    text-align: center;
}
.custom-form-message.success { background: #d4edda; color: #155724; }
.custom-form-message.error { background: #f8d7da; color: #721c24; }

/* МОБИЛЬНЫЙ */
@media screen and (max-width: 600px) {
    .custom-form-wrapper { padding: 15px; }
}