/* Global Enhanced Load More and Loading Spinner Styles */
/* This file contains the enhanced loading animations that can be used across all frontend pages */

/* Enhanced Loading Spinner - Modern Design with Color Transitions */
.loading-spinner {
    width: 4rem;
    height: 4rem;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4f46e5;
    border-right: 4px solid #7c3aed;
    border-radius: 50%;
    animation: modernSpin 1.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    margin-bottom: 1.5rem;
    position: relative;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    border: 3px solid transparent;
    border-top: 3px solid #10b981;
    border-radius: 50%;
    animation: modernSpinReverse 0.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    transform: translate(-50%, -50%);
}

@keyframes modernSpin {
    0% {
        transform: rotate(0deg);
        border-top-color: #4f46e5;
        border-right-color: #7c3aed;
    }
    25% {
        border-top-color: #7c3aed;
        border-right-color: #10b981;
    }
    50% {
        transform: rotate(180deg);
        border-top-color: #10b981;
        border-right-color: #f59e0b;
    }
    75% {
        border-top-color: #f59e0b;
        border-right-color: #ef4444;
    }
    100% {
        transform: rotate(360deg);
        border-top-color: #4f46e5;
        border-right-color: #7c3aed;
    }
}

@keyframes modernSpinReverse {
    0% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

/* Enhanced Loading Container */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    min-height: 400px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.08);
}

.loading-container p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4f46e5;
    margin: 0;
    animation: loadingPulse 2s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Empty State Containers */
.empty-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    min-height: 400px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: #94a3b8;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-message {
    color: #6b7280;
    margin-bottom: 2rem;
    max-width: 400px;
}

.btn-reset-search {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-reset-search:hover {
    background: linear-gradient(135deg, #3730a3 0%, #6b21a8 100%);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

/* Mobile Responsiveness for Loading States */
@media (max-width: 768px) {
    .loading-container {
        padding: 3rem 1rem;
        margin: 1rem 0;
        border-radius: 12px;
    }
    
    .loading-spinner {
        width: 3rem;
        height: 3rem;
        border-width: 3px;
        margin-bottom: 1rem;
    }
    
    .loading-spinner::after {
        width: 1.5rem;
        height: 1.5rem;
        border-width: 2px;
    }
    
    .loading-container p {
        font-size: 1rem;
    }
    
    .empty-container {
        padding: 3rem 1rem;
    }
    
    .empty-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .empty-title {
        font-size: 1.25rem;
    }
    
    .empty-message {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-reset-search {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .loading-container {
        padding: 2rem 0.75rem;
        min-height: 300px;
    }
    
    .empty-container {
        padding: 2rem 0.75rem;
        min-height: 300px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .loading-spinner {
        border: 4px solid #000;
        border-top: 4px solid #fff;
        border-right: 4px solid #666;
    }
    
    .loading-spinner::after {
        border-top: 3px solid #000;
    }
    
    .loading-container p {
        color: #000;
    }
    
    .empty-title {
        color: #000;
    }
    
    .empty-message {
        color: #333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .loading-spinner,
    .loading-spinner::after {
        animation-duration: 3s;
    }
    
    .loading-container p {
        animation: none;
        opacity: 1;
    }
    
    .btn-reset-search:hover {
        transform: none;
    }
}