/* 1. The Parent Container (stays at 100% opacity) */
.htmx-request {
    position: relative;
    min-height: 40px;
    pointer-events: none;
    /* Prevents clicks while loading */
}

/* 2. Target all direct children and dim them */
/* This gives you the "faded content" look you want */
.htmx-request>* {
    opacity: 0.2;
    /* Adjust this for how "ghosted" you want it */
    filter: blur(1px);
    /* Optional: adds a nice professional touch */
    transition: opacity 0.2s ease;
}

/* 3. The Spinner (::after) remains at 100% opacity */
.htmx-request::after {
    content: "";
    display: block;
    width: 30px;
    height: 30px;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;

    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    /* Ensure opacity is explicitly 1 to override any inherited styles */
    opacity: 1 !important;
    animation: htmx-spinner-rotate 0.8s linear infinite;
}

@keyframes htmx-spinner-rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}