@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* ===== Container ===== */
.crowd-form-container {
    width: 100% !important;
    max-width: 576px !important;
    margin: 0 auto !important;
    background: #FFFFFF !important;
    border-radius: 15px !important;
    padding: 40px !important;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.08) !important;
    box-sizing: border-box !important;
}

.crowd-form {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.crowd-form-fields {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
}

/* ===== Inputs (не телефон) ===== */
.crowd-input {
    width: 100% !important;
    height: 52px !important;
    background: #F2F2F2 !important;
    border: 1px solid #E6E6E6 !important;
    border-radius: 4px !important;
    padding: 16px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    line-height: 20px !important;
    color: #131313 !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.crowd-input::placeholder {
    color: #8A8A8A !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}

.crowd-input:focus {
    border-color: #4845CA !important;
    background: #FFFFFF !important;
}

.crowd-input.crowd-input-error {
    border-color: #dc3545 !important;
}

/* ===== Phone Wrapper ===== */
.crowd-phone-wrapper {
    position: relative !important;
    width: 100% !important;
}

/* ===============================================
   intl-tel-input v25 Overrides
   =============================================== */

/* Контейнер: повна ширина */
.crowd-phone-wrapper .iti {
    width: 100% !important;
}

/* === ELEMENTOR FIX: скинути рожеву рамку === */
.crowd-form-container *:focus,
.crowd-form-container *:active {
    outline: none !important;
}

.crowd-form-container .iti *,
.crowd-form-container .iti *:focus,
.crowd-form-container .iti *:active,
.crowd-form-container .iti *:hover {
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

/* === ТЕЛЕФОН ІНПУТ ===
   ВАЖЛИВО: НЕ ставимо padding тут!
   intl-tel-input v25 сам рахує padding-left через inline style
   щоб текст не налізав на прапорець + dial code.
   Ставимо тільки padding-right і padding-top/bottom.
*/
.crowd-phone-wrapper .iti input[type="tel"] {
    width: 100% !important;
    height: 52px !important;
    background: #F2F2F2 !important;
    border: 1px solid #E6E6E6 !important;
    border-radius: 4px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-right: 16px !important;
    /* padding-left керується бібліотекою через inline style — НЕ ПЕРЕЗАПИСУВАТИ */
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    line-height: 52px !important;
    color: #131313 !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.crowd-phone-wrapper .iti input[type="tel"]::placeholder {
    color: #8A8A8A !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}

.crowd-phone-wrapper .iti input[type="tel"]:focus {
    border-color: #4845CA !important;
    background: #FFFFFF !important;
    outline: none !important;
    box-shadow: none !important;
}

.crowd-phone-wrapper .iti input[type="tel"].crowd-input-error,
.crowd-phone-wrapper .iti input[type="tel"].crowd-phone-error {
    border-color: #dc3545 !important;
}

/* === Кнопка з прапорцем === */
.crowd-phone-wrapper .iti__country-container {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
}

.crowd-phone-wrapper .iti__selected-country {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.crowd-phone-wrapper .iti__selected-country-primary {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 8px 0 16px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    gap: 6px !important;
    cursor: pointer !important;
}

.crowd-phone-wrapper .iti__selected-country-primary:hover {
    background: rgba(0, 0, 0, 0.03) !important;
}

/* Dial code */
.crowd-phone-wrapper .iti__selected-dial-code {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    color: #131313 !important;
    display: inline-flex !important;
    align-items: center !important;
    height: 100% !important;
    padding-left: 4px !important;
}

/* Стрілка */
.crowd-phone-wrapper .iti__arrow {
    margin-left: 4px !important;
    border-left: 4px solid transparent !important;
    border-right: 4px solid transparent !important;
    border-top: 4px solid #8A8A8A !important;
}

/* === DROPDOWN (рендериться в body, тому без .crowd-phone-wrapper) === */
.iti__dropdown-content {
    background: #FFFFFF !important;
    border: 1px solid #E6E6E6 !important;
    border-radius: 8px !important;
    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12) !important;
    z-index: 99999 !important;
    margin-top: 4px !important;
}

/* Пошук */
.iti__search-input {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    padding: 10px 12px !important;
    border: 1px solid #E6E6E6 !important;
    border-radius: 4px !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

.iti__search-input:focus {
    border-color: #4845CA !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Елементи країн */
.iti__country {
    padding: 10px 16px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: background 0.15s ease !important;
}

/* HOVER/HIGHLIGHT: тільки сірий фон, текст завжди темний */
.iti__country:hover,
.iti__country.iti__highlight,
.iti__country.iti__active {
    background: #F2F2F2 !important;
}

.iti__country:hover .iti__country-name,
.iti__country:hover .iti__dial-code,
.iti__country.iti__highlight .iti__country-name,
.iti__country.iti__highlight .iti__dial-code,
.iti__country.iti__active .iti__country-name,
.iti__country.iti__active .iti__dial-code {
    color: #131313 !important;
}

.iti__country-name {
    color: #131313 !important;
}

.iti__dial-code {
    color: #8A8A8A !important;
}

/* Скролбар */
.iti__country-list::-webkit-scrollbar {
    width: 6px !important;
}

.iti__country-list::-webkit-scrollbar-track {
    background: #F2F2F2 !important;
}

.iti__country-list::-webkit-scrollbar-thumb {
    background: #CCCCCC !important;
    border-radius: 3px !important;
}

/* Divider */
.iti__divider {
    border-bottom-color: #E6E6E6 !important;
    margin: 4px 0 !important;
}

/* ===== Submit Button ===== */
.crowd-submit-btn {
    width: 100% !important;
    height: 54px !important;
    background: #131313 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 6px 32px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    line-height: 24px !important;
    color: #FFFFFF !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0px 0px 0px 1px #000000, 0px 1px 2px 0px rgba(0, 0, 0, 0.64) !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.crowd-submit-btn:hover {
    background: #2d2d2d !important;
    transform: translateY(-2px) !important;
}

.crowd-submit-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* ===== Messages ===== */
.crowd-form-message {
    margin-top: 20px !important;
    padding: 15px !important;
    border-radius: 4px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    text-align: center !important;
    display: none !important;
}

.crowd-form-message.crowd-msg-success {
    background: #d4edda !important;
    color: #155724 !important;
    display: block !important;
}

.crowd-form-message.crowd-msg-error {
    background: #f8d7da !important;
    color: #721c24 !important;
    display: block !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .crowd-form-container {
        padding: 24px !important;
    }
    
    .crowd-form-fields {
        gap: 20px !important;
    }
}