/* The vendored design system defines --button-secondary-*-disabled and
   --button-ghost-text-disabled, but wires :disabled only for .btn--primary. Without
   the rules below a disabled .btn--secondary or .btn--ghost renders identically to an
   enabled one, so wire:loading.attr="disabled" leaves the user no signal that the
   click registered. Every value here is the system's own token; the override becomes
   redundant once the design system consumes them itself. */

.btn--secondary:disabled,
.btn--secondary:disabled:hover {
    background: var(--button-secondary-bg-disabled);
    color: var(--button-secondary-text-disabled);
    border-color: var(--button-secondary-border-disabled);
    cursor: not-allowed;
}

.btn--ghost:disabled,
.btn--ghost:disabled:hover {
    background: var(--button-ghost-bg);
    color: var(--button-ghost-text-disabled);
    cursor: not-allowed;
}

/* Press feedback (audit §8.2 #1). The vendored `.btn` transitions background, colour and
   border-color and defines no `:active` at all, so 563 controls in the two panels give the
   click no acknowledgement. `enotale-ui` §3 names „press feedback on buttons and rows:
   `:active { transform: scale(.97) }` at `fast`" verbatim in its allowed list, so this is
   pre-authorised rather than a judgement call.

   ⚠ `transform` has to JOIN the vendored transition list — the vendored rule names three
   properties explicitly and a fourth is not covered by them. Written with the motion tokens,
   so `prefers-reduced-motion` zeroes it for free (theme.css zeroes the durations); a raw
   duration here would keep moving for a user who asked it to stop.

   Excludes `:disabled`, which must not appear to accept a press it is refusing. */
.btn {
    transition: background var(--button-transition-duration) var(--button-transition-easing),
                color var(--button-transition-duration) var(--button-transition-easing),
                border-color var(--button-transition-duration) var(--button-transition-easing),
                transform var(--motion-duration-fast) var(--motion-easing-standard);
}

.btn:active:not(:disabled) {
    transform: scale(0.97);
}

/* Press feedback for icon-only row/header actions (enotale-ui §3). `.icon-action` is not a
   `.btn`, so neither the transition list nor the `:active` rule above reaches it, and the
   vendored rule declares no transition of its own — this file supplies both.

   Excludes `[aria-disabled="true"]`, same reasoning as the `.btn` rule above. */
.icon-action {
    transition: transform var(--motion-duration-fast) var(--motion-easing-standard);
}

.icon-action:active:not([aria-disabled="true"]) {
    transform: scale(0.97);
}

/* Dark theme: the bundle hovers a link to --color-accent-primary (#8B2D3D), which sits at
   1.88:1 on a dark row — below the 4.5:1 floor the unhovered link already clears (#CB807C,
   5.11:1). Hovering must not make a link LESS readable, so in dark the hover lightens the
   link colour instead of deepening it. Remove once the bundle ships a dark hover token. */
[data-theme="dark"] a:hover,
[data-theme="dark"] .text-link:hover {
    color: color-mix(in srgb, var(--color-text-link) 75%, var(--color-pure-paper));
}
