/*
 * r39-web — what the second real-user run on pilot-r38 found, in a stylesheet of its own
 * (`styles.css` is far past the 800 lines the coding rules set and may not grow).
 */

/*
 * THE REASON FIELD IS FULL WIDTH. A reason is a sentence: the form drew it as an input with the browser's
 * default width, a third of the line, wherever it sat outside a `.grid-fields`. Matched by the control's own
 * name so every form that asks a reason (a registration, an account, a customer, a workflow, a cancel) is
 * covered without a class on each.
 */
label:has(> input[name='reason']),
label:has(> textarea[name='reason']) {
  display: block;
}

input[name='reason'],
textarea[name='reason'] {
  box-sizing: border-box;
  inline-size: 100%;
  margin-block-start: 0.3rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 0.4rem 0.55rem;
}

input[name='reason']:focus-visible,
textarea[name='reason']:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -1px;
}

/* WHY SAVE IS OFF: the sentence under the button; empty means Save is on, and takes no room. */
.save-why {
  margin: 0.5rem 0 0;
  color: var(--bad);
  font-size: 0.9em;
}

.save-why:empty {
  display: none;
}

/* A one-character help mark beside a label whose tooltip explains a default. */
.hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 1.15rem;
  block-size: 1.15rem;
  margin-inline-start: 0.3rem;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 0.75rem;
  cursor: help;
}

/* The allowed currencies of an account: a fieldset of checkboxes that wraps. */
.currencies {
  margin: 1rem 0 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
}

.currencies legend {
  padding-inline: 0.4rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.currencies .checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}

/* The amounts a refusal carries, once in major units with their currency. */
.refusal__amounts {
  margin: 0.4rem 0 0;
  padding-inline-start: 1.2rem;
}
