/* Shared interaction states for the legacy Bootstrap and DaisyUI controls.
 * Keep disabled labels readable without changing which actions are available.
 */
body :is(button, input[type="button"], input[type="submit"], input[type="reset"], .btn, .tw-dw-btn, .public-button, .dt-button, [role="button"]):is(:disabled, [disabled], [aria-disabled="true"], .disabled, .tw-dw-btn-disabled),
body .wizard > .actions .disabled > a {
    --tw-bg-opacity: 1;
    --tw-text-opacity: 1;
    --tw-border-opacity: 1;
    background-color: #e9edf2 !important;
    background-image: none !important;
    color: #526071 !important;
    -webkit-text-fill-color: #526071 !important;
    border: 1px solid #aebac9 !important;
    opacity: 1 !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
    cursor: not-allowed !important;
}

body :is(button, input[type="button"], input[type="submit"], input[type="reset"], .btn, .tw-dw-btn, .public-button, .dt-button, [role="button"]):is(:disabled, [disabled], [aria-disabled="true"], .disabled, .tw-dw-btn-disabled) :is(i, svg, span),
body .wizard > .actions .disabled > a :is(i, svg, span) {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
    opacity: 1 !important;
}

/* Native disabled buttons already reject activation. Allow pointer observation
 * so their disabled cursor and existing tooltips remain usable.
 */
body :is(button, input):is(.btn, .tw-dw-btn):disabled {
    pointer-events: auto;
}

body :is(button, input[type="button"], input[type="submit"], input[type="reset"], .btn, .tw-dw-btn, .public-button, .dt-button, [role="button"]):focus-visible,
body .wizard > .actions a:focus-visible {
    outline: 3px solid #087f94 !important;
    outline-offset: 3px !important;
}

@media (forced-colors: active) {
    body :is(button, input[type="button"], input[type="submit"], input[type="reset"], .btn, .tw-dw-btn, .public-button, .dt-button, [role="button"]):is(:disabled, [disabled], [aria-disabled="true"], .disabled, .tw-dw-btn-disabled),
    body .wizard > .actions .disabled > a {
        background-color: ButtonFace !important;
        color: GrayText !important;
        -webkit-text-fill-color: GrayText !important;
        border-color: GrayText !important;
    }
}
