/* A part being replaced: dimmed, with the progress cursor that the in-flight
   rule of `htmxo_utility_styles` gives it no longer. UNLAYERED, like that rule,
   so it holds against an unlayered page rule of lower specificity. Pico draws
   a spinner before every `[aria-busy=true]` element, which would push the
   part's content down a line while it loads; the script sets
   `data-htmxo-busy` only on a part without a `::before` of its own, so
   removing it here removes nothing else. */
.htmxo-loading { opacity: 0.45; cursor: progress; }
[data-htmxo-busy][aria-busy="true"]::before { content: none; }
@layer htmxo {
.htmxo-loading-status {
    position: fixed;
    z-index: 9998;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: .6em;
    padding: .5em 1.1em;
    border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
    border-radius: 999px;
    background: var(--htmxo-bg, Canvas);
    box-shadow: 0 2px 10px rgb(0 0 0 / .12);
    font-size: 1rem;
    line-height: 1.4;
    text-align: center;
    pointer-events: none;
}
.htmxo-loading-status::before {
    content: "";
    flex: none;
    width: .9em;
    height: .9em;
    box-sizing: border-box;
    border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: htmxo-loading-spin .8s linear infinite;
}
.htmxo-loading-status[data-htmxo-off] { opacity: 0; }
@keyframes htmxo-loading-spin { to { transform: rotate(360deg); } }
@keyframes htmx-pulse {
    0%, 100% { outline-color: color-mix(in srgb, var(--htmxo-accent) 30%, transparent); }
    50% { outline-color: var(--htmxo-accent); }
}
.htmx-request-active {
    outline: 2px solid var(--htmxo-accent);
    outline-offset: -2px;
    animation: htmx-pulse 1s ease-in-out infinite;
}
.htmx-request-success {
    outline: 2px solid var(--htmxo-success);
    outline-offset: -2px;
    animation: htmx-fade-success 1s ease-out forwards;
}
.htmx-request-error {
    outline: 2px solid var(--htmxo-error);
    outline-offset: -2px;
    animation: htmx-fade-error 2s ease-out forwards;
}
@keyframes htmx-fade-success {
    0% { outline-color: var(--htmxo-success); }
    100% { outline-color: transparent; }
}
@keyframes htmx-fade-error {
    0% { outline-color: var(--htmxo-error); }
    100% { outline-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .htmx-request-active,
    .htmx-request-success,
    .htmx-request-error,
    .htmxo-loading-status::before {
        animation: none;
    }
}
}
