/* ==========================================================================
   AMOUNT FIELD (.verser-amount): money in the field family. The kit field's box with the currency at the inline
   start (mono, quiet) and the amount after it in mono tabular figures. Behaviour: VerserUI.amount (amount.js).
     <div class="verser-field">
       <label class="verser-label" for="a1">Amount</label>
       <div class="verser-amount"><span class="verser-amount-currency">AED</span>
         <input class="verser-amount-input" id="a1" type="text" inputmode="decimal"></div>
       <span class="verser-helper">…</span><span class="verser-error"></span></div>
   The figures read left to right in every language; in Arabic they sit at the start (right) of the box.
   Invalid: aria-invalid on the input or data-invalid on the box or the field. Disabled / readonly as every field.
   Hooks: --verser-amount-currency-text, -gap.
   ========================================================================== */
.verser-amount{
  box-sizing:border-box;display:flex;align-items:center;gap:var(--verser-amount-gap,var(--space-2));inline-size:100%;
  min-block-size:var(--verser-field-height,max(var(--tap-min),calc(52px * var(--density))));
  padding-inline:var(--verser-field-padding-inline,calc(var(--space-3) + 2px));
  border:var(--border-width) solid var(--verser-field-border,var(--border-field));border-radius:var(--verser-field-radius,var(--radius-sm));
  background:var(--verser-field-fill,var(--surface-fill-2));cursor:text;
  transition:border-color var(--duration-fast) ease,box-shadow var(--duration-fast) ease
}
.verser-amount-currency{
  flex:none;font-family:var(--font-mono);font-size:var(--font-size-small);font-weight:var(--vx-fw-semibold);color:var(--verser-amount-currency-text,var(--text-secondary));
  white-space:nowrap;user-select:none
}
.verser-amount-currency:is(:lang(ar),:dir(rtl)){font-family:var(--font-mono-rtl)}
.verser-amount-input{
  flex:1 1 auto;min-inline-size:0;block-size:100%;min-block-size:40px;margin:0;padding:0;border:0;outline:0;background:none;
  color:var(--verser-field-text,var(--text));font-family:var(--font-mono);font-size:var(--verser-field-font-size,var(--font-size-reading));font-weight:var(--vx-fw-medium);
  font-variant-numeric:tabular-nums;text-align:start;direction:ltr
}
/* direction:ltr turns end into the right edge: in Arabic the figures sit at the box's start (right). */
.verser-amount-input:dir(rtl){text-align:end}
.verser-amount-input::placeholder{color:var(--verser-field-placeholder,var(--vx-ink-3));opacity:1}
.verser-amount:focus-within{border-color:var(--verser-field-focus-border,var(--selected-edge))}
.verser-amount:has(.verser-amount-input:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring);outline-offset:var(--focus-ring-offset)}
.verser-amount:is([data-invalid]:not([data-invalid="false"]),:has(.verser-amount-input[aria-invalid="true"])),
.verser-field[data-invalid]:not([data-invalid="false"]) .verser-amount{
  border-color:var(--verser-field-invalid-border,var(--danger));box-shadow:0 0 0 1px var(--verser-field-invalid-border,var(--danger))
}
.verser-amount:has(.verser-amount-input:disabled){background:var(--surface-fill-1);opacity:.7;cursor:not-allowed}
.verser-amount:has(.verser-amount-input[readonly]){background:var(--surface-fill-1)}
.verser-amount-input:is(:disabled,[readonly]){color:var(--text-secondary)}
@media (prefers-reduced-motion:reduce){.verser-amount{transition:none}}
