/**
 * Shared cosmetic rules for the MiFID client anagrafica forms — used by
 * BOTH the consultant page (client_create.html, no extra_css block of its
 * own) and the customer self-onboarding page (anagraphics_form.html).
 * Loaded globally from base.html so both pick it up without duplication.
 */

/* Telefono: stop the international-prefix selector from stretching to a
   50/50 split with the number input (Bootstrap's .form-select sets
   width: 1% and flex-grows). `flex: 0 0 auto` with no explicit width lets
   the <select> fall back to its own content-based sizing, so it takes only
   as much room as its longest option needs — never clipping "+39 Italia".
   `min-width` is a floor for a short selected value, so the caret icon
   never crowds the text.
   `padding-right` is pinned to the exact value client-form.js's injected
   `.form-select.is-valid` rule uses for its checkmark icon — reserved
   UNCONDITIONALLY, not only once validated. Without this, a field that
   starts unvalidated auto-sizes to fit just the text + the (smaller)
   default caret padding; when blur validation later adds the wider
   checkmark padding, the box doesn't retroactively grow to match, and
   the icon overlaps the last characters of a long selected value (e.g.
   "+971 Emirati Arabi Uniti"). Reserving it from the start means the
   auto-width computation already accounts for it either way. */
.input-group .prefix-select {
    flex: 0 0 auto;
    width: auto;
    min-width: 4.5rem;
    padding-right: calc(1.5em + 0.75rem) !important;
}

/* Capitalize free-text name/address fields on display only — the stored
   value is untouched. text-transform: capitalize only affects the first
   letter of each word and cannot lowercase an existing ALL-CAPS entry. */
.pmf-capitalize {
    text-transform: capitalize;
}
