/* CF7 Phone Field — intl-tel-input Layout Fix */

/* 1. Make the ITI wrapper full-width and block-level */
.iti {
    display: block !important;
    width: 100% !important;
}

/* 2. Input fills the wrapper */
.iti input[type="tel"] {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 2b. Push input text past the flag button.
   Covers both cases: separateDialCode (flag+code ~90px) and flag-only (~50px).
   The theme resets padding with !important so we must do the same.
   Two rules handle both v19 separateDialCode and flag-only modes. */
.iti--separate-dial-code input[type="tel"],
.iti--separate-dial-code #cf7-phone {
    padding-left: 92px !important;
}

/* Flag-only mode (no separateDialCode class): flag button is ~50px */
.iti:not(.iti--separate-dial-code) #cf7-phone,
.iti:not(.iti--separate-dial-code) input[type="tel"].iti__tel-input {
    padding-left: 52px !important;
}

/* Fallback: always give #cf7-phone at least flag-width padding */
#cf7-phone {
    padding-left: 52px !important;
}

/* 3. Dial code text must be visible */
.iti__selected-dial-code {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 14px !important;
    padding-left: 4px !important;
    color: #333 !important;
    min-width: 28px !important;
}

/* 4. Flag button — flex layout so flag + code + arrow sit side by side */
.iti__selected-flag {
    display: flex !important;
    align-items: center !important;
    padding: 0 8px !important;
}

/* 5. Dropdown above other form elements */
.iti__country-list {
    z-index: 9999 !important;
    max-height: 220px !important;
    overflow-y: auto !important;
}
