/* Bizbize bbPress Infinity Scroll Styles */
.bizbize-bbpress-loading {
    text-align: center;
    padding: 30px 20px;
    margin: 20px 0;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bizbize-bbpress-loading.active {
    display: block;
    opacity: 1;
}

.bizbize-bbpress-loading.no-more {
    display: block;
    opacity: 1;
    color: #666;
    font-style: italic;
}

.bizbize-bbpress-loading.error {
    display: block;
    opacity: 1;
    color: #d63638;
}

.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: bizbize-spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes bizbize-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.bizbize-load-more-container {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
}

.bizbize-load-more-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bizbize-load-more-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.bizbize-load-more-btn:active {
    transform: translateY(0);
}

.bizbize-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* New topic animation */
.bizbize-new-topic {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.bbp-topics .bbp-body>li {
    transition: all 0.3s ease;
}

/* Loading state for topics container */
.bizbize-bbpress-infinity-active .bbp-topics {
    position: relative;
}

/* Responsive styles */
@media (max-width: 768px) {
    .bizbize-load-more-btn {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
        max-width: 300px;
    }

    .bizbize-bbpress-loading {
        padding: 20px 15px;
    }

    .loading-spinner {
        width: 20px;
        height: 20px;
        border-width: 2px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .bizbize-bbpress-loading.no-more {
        color: #ccc;
    }

    .loading-text {
        color: #ccc;
    }

    .loading-spinner {
        border-color: #444;
        border-top-color: #0073aa;
    }
}

/* Custom scrollbar for better UX */
.bbp-topics::-webkit-scrollbar {
    width: 8px;
}

.bbp-topics::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.bbp-topics::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.bbp-topics::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.bizbize-load-more-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bizbize-load-more-btn {
        border: 2px solid currentColor;
    }

    .loading-spinner {
        border-width: 4px;
    }
}