/* --------------------------------------------------------------------------
   Forced colours and reduced motion (decisions D12 and D13).
   -------------------------------------------------------------------------- */
@media (forced-colors: active) {
    .inn-shell {
        border: 1px solid CanvasText;
        box-shadow: none;
    }

    .inn-stripe {
        forced-color-adjust: none;
        background: Highlight;
    }

    .inn-body :focus-visible {
        outline: 3px solid Highlight;
    }

    /* The close cross is painted by a masked pseudo-element, and a forced palette rewrites
       `background-color` — which would erase it. `ButtonText` is what the surrounding control resolves
       to, so the glyph stays visible and stays the right colour. */
    .inn-body .toast .btn-close::before {
        forced-color-adjust: none;
        background-color: ButtonText;
    }

    /* A forced-colors palette drops the brand border and the color-mix fill alike, so without this the
       selected membership card would look exactly like the unselected ones. Highlight is the same
       system colour the stripe and the focus ring use. */
    .inn-shell .membership-choose .membership-choose-option:has(.membership-choose-radio:checked) {
        forced-color-adjust: none;
        border-color: Highlight;
        box-shadow: 0 0 0 2px Highlight;
        background: Canvas;
    }

    /* The consent glyphs are masks painted with `background-color`, which a forced palette rewrites —
       the same trap as the toast close cross above, and with the same consequence: the mark vanishes
       and the pill looks empty. */
    .inn-shell .inn-consent-pill::before,
    .inn-shell .inn-consent-accept-all::before,
    .inn-shell .inn-consent-link::after {
        forced-color-adjust: none;
        background-color: ButtonText;
    }

    /* Phase 5D, and exactly the same trap: the receipt check and the error bug are masks painted with
       `background-color`, which a forced palette rewrites — the glyph would vanish and leave an empty
       badge. `CanvasText` rather than `ButtonText` because neither of these sits on a control. */
    .inn-shell .inn-receipt-badge::before,
    .inn-shell .inn-regerror-badge::before {
        forced-color-adjust: none;
        background-color: CanvasText;
    }

    /* And the panels themselves: a forced palette drops `--c-ok-bg` and `--c-err-bg`, so the success
       panel and the error badge would lose the only thing that distinguishes them from the page. */
    .inn-shell .inn-receipt,
    .inn-shell .inn-regerror-badge {
        border-color: CanvasText;
        background: Canvas;
    }

    /* And the same problem the membership card has: `--c-ok` / `--c-err` are dropped, so an answered
       consent would look exactly like an unanswered one. The glyph still separates Ja from Nei, which is
       why this can lean on one system colour for both. */
    .inn-shell .inn-consent-radio:checked + .inn-consent-pill {
        forced-color-adjust: none;
        border-color: Highlight;
        background: Canvas;
        color: Highlight;
    }

    .inn-shell .inn-consent-radio:checked + .inn-consent-pill::before {
        background-color: Highlight;
    }
}

@media (prefers-reduced-motion: reduce) {
    .inn-body *,
    .inn-body *::before,
    .inn-body *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
