﻿/* Make all elements that can receive htmx-request positioned relatively */
.htmx-container {
    position: relative;
}

/* Overlay with spinner applied to any element with htmx-request class */
.htmx-request::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 1000;
}

/* Spinner animation added to the center of any htmx-request element */
.htmx-request::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;
    border: 4px solid #ddd;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    z-index: 1001;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

[data-no-preserve] {
    display: none;
}

/* Main loading indicator container */
.loading-indicator {
    position: relative;
    width: 100%;
    min-height: 100px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
}

    /* Spinner animation */
    .loading-indicator::after {
        content: '';
        width: 40px;
        height: 40px;
        border: 4px solid #ddd;
        border-top: 4px solid #3498db;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

.datatable-container {
    margin-top: 25px;
}

@media only screen and (max-width: 1024px) {

    .htmx-container {
        margin-top:125px;
    }

    .htmx-container.nomt {
        margin-top: 0;
    }
}