/* Modern Loading Indicator Styles */

/* Overlay for full-page loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
}

/* Modern spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes wave {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1.0); }
}

/* Spinner variants */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(234, 29, 35, 0.2);
    border-top-color: #EA1D23;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.loading-spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

/* Pulse dots */
.loading-dots {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: #EA1D23;
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) { animation-delay: 0s; }
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

/* Bouncing dots */
.loading-bounce {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.loading-bounce-dot {
    width: 10px;
    height: 10px;
    background: #EA1D23;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.loading-bounce-dot:nth-child(1) { animation-delay: 0s; }
.loading-bounce-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-bounce-dot:nth-child(3) { animation-delay: 0.4s; }

/* Wave bars */
.loading-wave {
    display: inline-flex;
    gap: 3px;
    align-items: flex-end;
    height: 20px;
}

.loading-wave-bar {
    width: 4px;
    background: #EA1D23;
    border-radius: 2px;
    animation: wave 1.2s ease-in-out infinite;
}

.loading-wave-bar:nth-child(1) { height: 60%; animation-delay: 0s; }
.loading-wave-bar:nth-child(2) { height: 100%; animation-delay: 0.1s; }
.loading-wave-bar:nth-child(3) { height: 80%; animation-delay: 0.2s; }
.loading-wave-bar:nth-child(4) { height: 100%; animation-delay: 0.3s; }
.loading-wave-bar:nth-child(5) { height: 60%; animation-delay: 0.4s; }

/* Loading card (for overlay) */
.loading-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
    min-width: 200px;
}

.dark .loading-card {
    background: #1F2937;
    color: #F9FAFB;
}

.loading-card .loading-spinner {
    margin: 0 auto 1rem;
}

.loading-card .loading-text {
    color: #6B7280;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.dark .loading-card .loading-text {
    color: #D1D5DB;
}

/* Button loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Inline loading (for text replacement) */
.loading-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Progress bar with loading */
.loading-progress {
    width: 100%;
    height: 4px;
    background: rgba(234, 29, 35, 0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, transparent, #EA1D23, transparent);
    animation: loading-progress 1.5s ease-in-out infinite;
}

@keyframes loading-progress {
    0% { left: -30%; }
    100% { left: 100%; }
}





