/* Spinner/Loader Component - Bars Style Only */

/* Overlay for full-page loading */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-overlay.light {
    background-color: rgba(255, 255, 255, 0.9);
}

/* Hide spinner by default */
.spinner-overlay.hidden {
    display: none;
}

/* Spinner Wrapper */
.spinner-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Loading Text */
.spinner-text {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
}

.spinner-overlay.light .spinner-text {
    color: var(--text-color);
}

/* ==========================================
   BARS SPINNER
   ========================================== */
.spinner-bars {
    display: inline-flex;
    gap: 6px;
    align-items: flex-end;
    height: 50px;
}

.spinner-bars .bar {
    width: 8px;
    background-color: var(--primary-color);
    border-radius: 4px;
    animation: spinner-bars 1s ease-in-out infinite;
}

/* White variant for dark overlays */
.spinner-overlay:not(.light) .spinner-bars .bar {
    background-color: white;
}

.spinner-bars .bar:nth-child(1) {
    animation-delay: -0.4s;
}

.spinner-bars .bar:nth-child(2) {
    animation-delay: -0.3s;
}

.spinner-bars .bar:nth-child(3) {
    animation-delay: -0.2s;
}

.spinner-bars .bar:nth-child(4) {
    animation-delay: -0.1s;
}

.spinner-bars .bar:nth-child(5) {
    animation-delay: 0s;
}

/* Size variations */
.spinner-bars.small {
    height: 30px;
    gap: 4px;
}

.spinner-bars.small .bar {
    width: 5px;
}

.spinner-bars.large {
    height: 70px;
    gap: 8px;
}

.spinner-bars.large .bar {
    width: 10px;
}

@keyframes spinner-bars {
    0%, 40%, 100% {
        height: 30%;
    }
    20% {
        height: 100%;
    }
}
