/* Loaders
   Spinners and skeleton loaders */

/* ======= SPINNER/LOADER STYLES ======= */

.spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.25rem solid rgba(var(--primary-color-rgb), 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.75s linear infinite;
}

.spinner-sm {
    width: 1.25rem;
    height: 1.25rem;
    border-width: 0.2rem;
}

.spinner-lg {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background-color: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.loading-text {
    margin-top: var(--spacing-md);
    color: var(--text-color);
    font-weight: 500;
}

/* Skeleton loading */
.skeleton {
    display: block;
    background: linear-gradient(90deg, var(--tertiary-color) 25%, rgba(229, 229, 229, 0.7) 50%, var(--tertiary-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--border-radius-sm);
    height: 1rem;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    margin-bottom: 0.5rem;
    height: 1rem;
    width: 100%;
}

    .skeleton-text.skeleton-title {
        height: 1.5rem;
        margin-bottom: 1rem;
        width: 70%;
    }

.skeleton-circle {
    border-radius: 50%;
    height: 3rem;
    width: 3rem;
}

.skeleton-avatar {
    border-radius: 50%;
    height: 2.5rem;
    width: 2.5rem;
}

.skeleton-button {
    height: 2.25rem;
    width: 6rem;
    border-radius: var(--border-radius-md);
}
