/* Loader Overlay */
.document-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
    z-index: 50;
    min-height: 200px;
    border-radius: 12px;
}

.document-loader.active {
    display: flex;
}

/* Spinner animation */
.document-loader__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.document-loader__spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #2c5282;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.document-loader__text {
    color: #2c5282;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* Variant: Inline loader (for lazy load more) */
.document-loader--inline {
    position: relative;
    background: transparent;
    backdrop-filter: none;
    min-height: auto;
    padding: 2rem 1rem;
}

.document-loader--inline .document-loader__spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

/* Responsive */
@media (max-width: 576px) {
    .document-loader__spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }

    .document-loader__text {
        font-size: 12px;
    }
}

/* Animation de fade in/out */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.document-loader {
    animation: fadeIn 0.3s ease-in-out;
}

/* Position relative pour le parent */
.document-list {
    position: relative;
}
