/**
 * Load More Button Responsive Styles
 * Professional, accessible, and mobile-friendly button styling
 */

.load-more-button {
    /* Base button styles - consistent across all sizes */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    letter-spacing: 0.025em;
    user-select: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    position: relative;
    overflow: hidden;
    
    /* Accessibility improvements */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    
    /* Smooth animations for all interactions */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Focus styles for keyboard navigation */
    &:focus {
        outline: 2px solid currentColor;
        outline-offset: 2px;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    
    /* Active state for touch interactions */
    &:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    /* Disabled state */
    &:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
}

/* Loading state styles */
.load-more-button.loading {
    position: relative;
    pointer-events: none;
    
    &::after {
        content: '';
        position: absolute;
        width: 16px;
        height: 16px;
        margin: auto;
        border: 2px solid transparent;
        border-top-color: currentColor;
        border-radius: 50%;
        animation: button-loading-spinner 1s ease infinite;
    }
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .load-more-button {
        /* Slightly larger touch targets on mobile */
        min-height: 44px !important;
        min-width: 120px !important;
        padding: 8px 16px !important;
        font-size: 14px !important;
        
        /* Better spacing on mobile */
        margin: 16px auto;
    }
    
    /* Adjust sizes for mobile */
    .load-more-button[style*="height: 36px"] {
        height: 40px !important;
        padding: 8px 16px !important;
    }
    
    .load-more-button[style*="height: 40px"] {
        height: 44px !important;
        padding: 10px 18px !important;
    }
    
    .load-more-button[style*="height: 46px"] {
        height: 48px !important;
        padding: 12px 20px !important;
    }
    
    .load-more-button[style*="height: 52px"] {
        height: 54px !important;
        padding: 14px 22px !important;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .load-more-button {
        /* Optimal sizing for tablets */
        padding: 10px 20px !important;
        font-size: 15px !important;
    }
}

/* High DPI display adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .load-more-button {
        /* Crisper borders on retina displays */
        border: 0.5px solid transparent;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .load-more-button {
        /* Enhance shadows in dark mode */
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
    
    .load-more-button:hover {
        box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .load-more-button {
        transition: none;
    }
    
    .button-loading-spinner {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .load-more-button {
        border: 2px solid currentColor;
        box-shadow: none;
    }
    
    .load-more-button:focus {
        outline: 3px solid currentColor;
        outline-offset: 3px;
    }
}

/* Print styles */
@media print {
    .load-more-button,
    .load-more-section {
        display: none;
    }
}

/* Loading section styles */
.load-more-section {
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#load-more-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 8px 16px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Modern animated dots loader */
.loading-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

.loading-dots .dot {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: loading-dots-bounce 1.4s infinite ease-in-out both;
}

.loading-dots .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots .dot:nth-child(2) {
    animation-delay: -0.16s;
}

.loading-dots .dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes loading-dots-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Success/completion message styles */
.no-more-games {
    padding: 1rem;
    border-radius: 8px;
    background: rgba(34, 197, 94, 0.1);
    color: rgba(34, 197, 94, 0.9);
    border: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 14px;
    font-weight: 500;
}

/* Error message styles */
.load-more-error {
    padding: 1rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.1);
    color: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 14px;
    font-weight: 500;
}