/**
 * Animated Loader Component Styles
 *
 * CSS-only rotating spinner with semi-transparent overlay.
 * Uses the custom --solera-eminence color for the spinner border.
 * Fully responsive for desktop, tablet, and mobile devices.
 */

/* Loader Overlay */
.solera-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(200, 200, 200, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

/* Show the loader when active */
.solera-loader-overlay.active {
    display: flex;
}

/* Lock the background scroll when loader is visible */
body.solera-loader-active {
    overflow: hidden;
    cursor: wait;
}

/* Loader Container */
.solera-loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Spinner Animation - Desktop */
.solera-loader-spinner {
    width: 80px;
    height: 80px;
    border: 8px solid rgba(104, 54, 139, 0.2);
    border-top: 8px solid var(--solera-eminence);
    border-radius: 50%;
    animation: solera-spin 1s linear infinite;
}

/* Clockwise rotation animation */
@keyframes solera-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments for tablet (769px to 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .solera-loader-spinner {
        width: 70px;
        height: 70px;
        border: 7px solid rgba(104, 54, 139, 0.2);
        border-top: 7px solid var(--solera-eminence);
    }
}

/* Responsive adjustments for mobile (≤ 768px) */
@media (max-width: 768px) {
    .solera-loader-spinner {
        width: 60px;
        height: 60px;
        border: 6px solid rgba(104, 54, 139, 0.2);
        border-top: 6px solid var(--solera-eminence);
    }
}

/* Extra small devices (≤ 480px) */
@media (max-width: 480px) {
    .solera-loader-spinner {
        width: 50px;
        height: 50px;
        border: 5px solid rgba(104, 54, 139, 0.2);
        border-top: 5px solid var(--solera-eminence);
    }
}
