/* ═══════════════════════════════════════════════════════════════════════════════
   MATCH DEAL PRO — INSTRUMENT ANALYSIS REPORT DOWNLOAD (PHASE 22)

   Every selector in this file is prefixed `.mdp-irx-`, so it reaches no class any other
   screen uses and no sheet above it defines a class this one touches. Deleting this line
   from `index.html` removes the phase's presentation entirely and leaves the control
   drawn as a plain button in the panel header — degraded, never broken (Rule 2, Rule 3).

   Three rules and nothing else. The button itself is `.mdp-btn` from `components.css`,
   unchanged: a report download is not a new kind of control and does not deserve a new
   kind of appearance. What this sheet adds is the failure sentence beneath it, which the
   component library has no equivalent for because no other control in the application
   reports a failure inside a panel header.

   No literal colour and no `[dir='rtl']` rule: `--mdp-danger` is a token so the sentence
   is legible in both themes, and the only directional property is logical, so the sentence
   aligns with the reading direction in Arabic without a mirrored rule.
   ══════════════════════════════════════════════════════════════════════════════ */

.mdp-irx {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--mdp-sp-1);
  min-inline-size: 0;
}

/*
   A wrapper the control is repainted into, rather than the button being mutated in place.
   It holds its own height so the panel header does not jump by a pixel when the label
   changes from "Download PDF Report" to "Generating PDF…".
*/
.mdp-irx-control { display: flex; }

/*
   The failure sentence. Empty by default and collapsed to nothing when empty — `:empty`
   rather than a hidden attribute, so the live region stays in the accessibility tree and
   a screen reader announces the sentence the moment it is written into it.
*/
.mdp-irx-error {
  margin: 0;
  max-inline-size: 44ch;
  font-size: var(--mdp-fs-xs);
  line-height: var(--mdp-lh-snug);
  color: var(--mdp-danger);
  text-align: end;
}

.mdp-irx-error:empty { display: none; }

@media (forced-colors: active) {
  /* The tinted danger colour is not painted under forced colours; the sentence must not
     become invisible, so it falls back to the system's own text colour. */
  .mdp-irx-error { color: CanvasText; }
}
