/* Custom Pagination Styles */
.custom-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.custom-pagination .pagination-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.custom-pagination .pagination-item {
    display: inline-flex;
}

.custom-pagination .pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    /* Gray text */
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    /* Light gray border */
    border-radius: 9999px;
    /* Fully rounded buttons */
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Hover State */
.custom-pagination .pagination-item:not(.disabled):not(.active) .pagination-link:hover {
    color: #6d28d9;
    /* Deep purple text */
    background-color: #f5f3ff;
    /* Light purple bg */
    border-color: #c4b5fd;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(109, 40, 217, 0.1), 0 2px 4px -1px rgba(109, 40, 217, 0.06);
}

/* Active State */
.custom-pagination .pagination-item.active .pagination-link {
    color: #ffffff;
    background-color: #7c3aed;
    /* Vibrant purple */
    border-color: #7c3aed;
    box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.2), 0 2px 4px -1px rgba(124, 58, 237, 0.1);
    z-index: 1;
}

/* Disabled State */
.custom-pagination .pagination-item.disabled .pagination-link {
    color: #9ca3af;
    background-color: #f9fafb;
    border-color: #e5e7eb;
    cursor: not-allowed;
    box-shadow: none;
}

/* Dark Mode Support (html.dark-mode) */
html.dark-mode .custom-pagination .pagination-link {
    color: #d1d5db;
    background-color: #1f2937;
    border-color: #374151;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

html.dark-mode .custom-pagination .pagination-item:not(.disabled):not(.active) .pagination-link:hover {
    color: #c4b5fd;
    /* Lighter purple on dark mode */
    background-color: #312e81;
    /* Dark purple bg */
    border-color: #4c1d95;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}

html.dark-mode .custom-pagination .pagination-item.active .pagination-link {
    color: #ffffff;
    background-color: #8b5cf6;
    border-color: #8b5cf6;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
}

html.dark-mode .custom-pagination .pagination-item.disabled .pagination-link {
    color: #6b7280;
    background-color: #111827;
    border-color: #1f2937;
}

/* Mobile Page Indicator (Hidden by default) */
.custom-pagination .mobile-page-indicator {
    display: none;
}

.custom-pagination .mobile-page-indicator .pagination-link {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
    font-weight: 600;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 639px) {
    .custom-pagination .pagination-item.page-number-item {
        display: none !important;
    }

    .custom-pagination .mobile-page-indicator {
        display: inline-flex;
    }
}


/* Tablet and Desktop */
@media (min-width: 640px) {
    .custom-pagination .pagination-list {
        gap: 0.5rem;
    }

    .custom-pagination .pagination-link {
        min-width: 2.5rem;
        height: 2.5rem;
        padding: 0 0.75rem;
        font-size: 0.875rem;
    }
}

@media (min-width: 1024px) {
    .custom-pagination .pagination-link {
        min-width: 2.75rem;
        height: 2.75rem;
        padding: 0 1rem;
        font-size: 1rem;
    }
}