/* BUNRIN interactive button contract v1. */
:where(button, input[type="button"], input[type="submit"], [role="button"])[data-bunrin-button] {
    transition:
        filter 140ms ease,
        transform 140ms ease,
        box-shadow 140ms ease,
        opacity 140ms ease;
    -webkit-tap-highlight-color: transparent;
}

:where(button, input[type="button"], input[type="submit"], [role="button"])[data-bunrin-button]:not(:disabled):not([aria-disabled="true"]):hover {
    filter: brightness(1.16) saturate(1.08);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgb(0 0 0 / 28%);
}

:where(button, input[type="button"], input[type="submit"], [role="button"])[data-bunrin-button]:not(:disabled):not([aria-disabled="true"]):active {
    filter: brightness(.92);
    transform: translateY(1px);
    box-shadow: none;
}

:where(button, input[type="button"], input[type="submit"], [role="button"])[data-bunrin-button]:focus-visible {
    outline: 3px solid color-mix(in srgb, currentColor 68%, #fff 32%);
    outline-offset: 3px;
}

:where(button, input[type="button"], input[type="submit"], [role="button"])[data-bunrin-button][aria-disabled="true"],
:where(button, input[type="button"], input[type="submit"])[data-bunrin-button]:disabled {
    cursor: wait;
    opacity: .68;
    filter: saturate(.55);
    transform: none;
    box-shadow: none;
}

:where(form)[data-bunrin-submitting="true"] {
    cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
    :where(button, input[type="button"], input[type="submit"], [role="button"])[data-bunrin-button] {
        transition: none;
    }
}
