/* ============================================
   BIBLIATECH LOADING ANIMATION
   Custom loading animation with logo + dots
   ============================================ */

/* Main container for loading animation */
.bibliatech-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    gap: 1.5rem;
}

/* Logo container */
.bibliatech-loading-logo {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoFloat 2s ease-in-out infinite;
}

.bibliatech-loading-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Float animation for logo */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Loading dots container */
.bibliatech-loading-dots {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

/* Individual dot */
.bibliatech-loading-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9d8fc9;
    animation: dotBounce 1.4s ease-in-out infinite;
}

/* Stagger the animation for each dot */
.bibliatech-loading-dot:nth-child(1) {
    animation-delay: 0s;
}

.bibliatech-loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.bibliatech-loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Bounce animation for dots */
@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Loading text (optional) */
.bibliatech-loading-text {
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

/* ============================================
   DARK THEME
   ============================================ */

[data-theme="dark"] .bibliatech-loading-dot {
    background: #a78bfa;
}

[data-theme="dark"] .bibliatech-loading-text {
    color: #9ca3af;
}

/* ============================================
   LIGHT THEME
   ============================================ */

[data-theme="light"] .bibliatech-loading-dot {
    background: #7c3aed;
}

[data-theme="light"] .bibliatech-loading-text {
    color: #6b7280;
}

/* ============================================
   COMPACT VERSION (for smaller areas)
   ============================================ */

.bibliatech-loading.compact {
    padding: 1.5rem 1rem;
    gap: 1rem;
}

.bibliatech-loading.compact .bibliatech-loading-logo {
    width: 40px;
    height: 40px;
}

.bibliatech-loading.compact .bibliatech-loading-dot {
    width: 8px;
    height: 8px;
}

.bibliatech-loading.compact .bibliatech-loading-text {
    font-size: 0.8rem;
}

/* ============================================
   INLINE VERSION (for inline loading)
   ============================================ */

.bibliatech-loading.inline {
    flex-direction: row;
    padding: 0.5rem 1rem;
    gap: 1rem;
}

.bibliatech-loading.inline .bibliatech-loading-logo {
    width: 30px;
    height: 30px;
}

.bibliatech-loading.inline .bibliatech-loading-dot {
    width: 6px;
    height: 6px;
}

.bibliatech-loading.inline .bibliatech-loading-text {
    font-size: 0.85rem;
    margin-top: 0;
    margin-left: 0.5rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Hidden state */
.bibliatech-loading.hidden {
    display: none !important;
}

/* Centered in container */
.bibliatech-loading.centered {
    margin: 0 auto;
}
