
/* ===============================
   HTMX Loading Modal Overlay
================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.htmx-indicator {
    opacity: 0;
    pointer-events: none;
}

.htmx-request .modal-overlay.htmx-indicator {
    opacity: 1;
    pointer-events: all;
}

/* ✅ Small centered modal card */
.modal-content {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
    width: 200px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ✅ Centered spinner */
.modal-content .spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border-width: 0.2rem;
    color: var(--theme-color, #007bff);
    margin: 0 auto;
}

/* ✅ Centered text */
.modal-content p {
    margin-top: 0.75rem !important;
    margin-bottom: 0;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    text-align: center;
}

@keyframes modalFadeIn {
    from {
        transform: scale(0.95) translateY(-10px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}