/* Mobile Loader Styles */
.mobile-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

[data-theme="dark"] .mobile-loader {
    background: rgba(24, 24, 27, 0.95);
}

.mobile-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.mobile-loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color, #e5e7eb);
    border-top: 4px solid var(--accent-color, #00b894);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

[data-theme="dark"] .mobile-loader-spinner {
    border-color: #374151;
    border-top-color: var(--accent-color, #00b894);
}

.mobile-loader-text {
    color: var(--text-color, #374151);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .mobile-loader-text {
    color: var(--text-color, #f9fafb);
}

.mobile-loader-subtext {
    color: var(--text-secondary, #6b7280);
    font-size: 0.875rem;
    text-align: center;
    max-width: 280px;
    line-height: 1.4;
}

[data-theme="dark"] .mobile-loader-subtext {
    color: var(--text-secondary, #9ca3af);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alternative pulse animation for variety */
.mobile-loader-pulse {
    width: 60px;
    height: 60px;
    background: var(--accent-color, #00b894);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
    100% {
        transform: scale(0.8);
        opacity: 1;
    }
}

/* Dots loader animation */
.mobile-loader-dots {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mobile-loader-dot {
    width: 12px;
    height: 12px;
    background: var(--accent-color, #00b894);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.mobile-loader-dot:nth-child(1) { animation-delay: -0.32s; }
.mobile-loader-dot:nth-child(2) { animation-delay: -0.16s; }
.mobile-loader-dot:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .mobile-loader-spinner {
        width: 45px;
        height: 45px;
        border-width: 3px;
    }
    
    .mobile-loader-text {
        font-size: 0.95rem;
    }
    
    .mobile-loader-subtext {
        font-size: 0.8rem;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .mobile-loader-spinner {
        width: 40px;
        height: 40px;
    }
    
    .mobile-loader-text {
        font-size: 0.9rem;
    }
    
    .mobile-loader-subtext {
        font-size: 0.75rem;
        max-width: 220px;
    }
}

/* Show loader only on mobile devices */
@media (min-width: 1024px) {
    .mobile-loader {
        display: none !important;
    }
}