/* ─── Translatable texts (Components/Shared/MultilingualTextField.razor) ───────────────────────────────────────────
   The form's usual label — caption, input, hint — with the globe that opens the translations drawer as its last child.
   The globe has a column of its own beside the input, never over it: no text runs under it, whatever padding the
   form's input rules (app.css, onix-odoo.css) give the input. The label keeps the form's own class (required, advised,
   span-2…), so it is found by its globe (:has), raised over the forms' `.form-card label { display: block }`. */

:is(body, form, .form, .form-card, .form-grid) label:has(> .multilingual-field__globe) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 6px;
    align-items: center;
}
:is(body, form, .form, .form-card, .form-grid) label:has(> .multilingual-field__globe) > span:first-child { grid-row: 1; grid-column: 1 / -1; }
:is(body, form, .form, .form-card, .form-grid) label:has(> .multilingual-field__globe) > input { grid-row: 2; grid-column: 1; min-width: 0; width: 100%; }
:is(body, form, .form, .form-card, .form-grid) label:has(> .multilingual-field__globe) > .field-hint { grid-row: 3; grid-column: 1 / -1; }

.multilingual-field__globe {
    grid-row: 2; grid-column: 2;
    display: inline-flex; align-items: center; justify-content: center;
    flex: none; width: 26px; height: 26px; padding: 0;
    border: 1px solid transparent; border-radius: 6px; background: none;
    color: var(--muted); cursor: pointer; font: inherit; line-height: 1;
}
.multilingual-field__globe:hover { background: var(--panel-hover); border-color: var(--line); color: var(--brand-strong); }
.multilingual-field__globe:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
/* A typed translation: the globe in the brand colour, so a translated field shows it without opening the drawer. */
.multilingual-field__globe.is-translated { color: var(--brand-strong); }
fieldset:disabled .multilingual-field__globe { display: none; }

.translations-drawer .drawer__body > label { display: block; margin-bottom: 12px; }
.translations-drawer .drawer__body > label > input { width: 100%; }
