/* Arabic request forms: isolate legacy country widgets from inherited RTL. */
html[lang|="ar"] .wpcf7 .cf7-right-wrapp input:not([type="submit"]):not([type="hidden"]),
html[lang|="ar"] .wpcf7 .cf7-right-wrapp textarea {
    direction: rtl;
    text-align: right;
}

html[lang|="ar"] .wpcf7 .cf7-right-wrapp input[type="email"],
html[lang|="ar"] .wpcf7 .cf7-right-wrapp input.wpcf7-phonetext {
    direction: ltr;
    text-align: left;
}

html[lang|="ar"] .wpcf7 .cf7-right-wrapp input::placeholder {
    direction: rtl;
    text-align: right;
}

html[lang|="ar"] .cf7-right-wrapp .intl-tel-input,
html[lang|="ar"] .cf7-right-wrapp .country-select {
    direction: ltr;
    width: 100%;
    text-align: left;
}

html[lang|="ar"] .cf7-right-wrapp .intl-tel-input .flag-container {
    left: 0;
    right: auto;
}

html[lang|="ar"] .cf7-right-wrapp .intl-tel-input.separate-dial-code .selected-flag {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100px;
    padding: 0 8px;
    direction: ltr;
}

html[lang|="ar"] .cf7-right-wrapp .intl-tel-input .selected-flag .iti-flag,
html[lang|="ar"] .cf7-right-wrapp .intl-tel-input .selected-flag .iti-arrow {
    position: static;
    margin: 0;
    flex-shrink: 0;
}

html[lang|="ar"] .cf7-right-wrapp .intl-tel-input .selected-dial-code {
    padding: 0;
    direction: ltr;
    unicode-bidi: isolate;
}

html[lang|="ar"] .wpcf7 .cf7-right-wrapp .intl-tel-input input.wpcf7-phonetext {
    padding-left: 110px !important;
    padding-right: 10px !important;
}

html[lang|="ar"] .cf7-right-wrapp .country-select .flag-dropdown {
    left: auto;
    right: 0;
}

html[lang|="ar"] .cf7-right-wrapp .country-select .selected-flag {
    direction: ltr;
    width: 46px;
}

html[lang|="ar"] .wpcf7 .cf7-right-wrapp .country-select input.wpcf7-countrytext {
    padding-left: 10px !important;
    padding-right: 56px !important;
}

html[lang|="ar"] .cf7-right-wrapp .country-list {
    direction: ltr;
    text-align: left;
    max-width: min(360px, calc(100vw - 64px));
    white-space: normal;
}

html[lang|="ar"] .cf7-right-wrapp .country-select .country-list {
    right: 0;
    left: auto;
}
