/* Modern Pagination Styles */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0;
}

.pagination .page-link {
    color: var(--crm-text, #1e293b);
    background-color: #fff;
    border: none;
    padding: 0.5rem 0.875rem;
    min-width: 2.5rem;
    text-align: center;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.pagination .page-link:hover {
    color: var(--crm-primary, #4f6af5);
    background-color: rgba(79, 106, 245, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination .page-link:focus {
    z-index: 3;
    color: var(--crm-primary, #4f6af5);
    background-color: rgba(79, 106, 245, 0.1);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(79, 106, 245, 0.15);
}

.pagination .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background: linear-gradient(135deg, var(--crm-primary, #4f6af5) 0%, var(--crm-primary-dark, #3a50c9) 100%);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(79, 106, 245, 0.3);
}

.pagination .page-item.active .page-link:hover {
    transform: none;
}

.pagination .page-item.disabled .page-link {
    color: var(--crm-text-muted, #64748b);
    background-color: var(--crm-body-bg, #f8fafc);
    pointer-events: none;
    opacity: 0.5;
    box-shadow: none;
}

.pagination-lg .page-link {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    border-radius: 0.75rem;
    min-width: 3rem;
}

.pagination-sm .page-link {
    padding: 0.375rem 0.625rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    min-width: 2rem;
}

/* Pagination info styling */
.pagination-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .pagination-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .results-counter {
        order: 2;
    }
}

/* Results counter styling */
.results-counter {
    font-size: 0.875rem;
    color: var(--crm-text-muted, #64748b);
    font-weight: 500;
    padding: 0.5rem 1rem;
    background-color: var(--crm-body-bg, #f8fafc);
    border-radius: 0.5rem;
    border: none;
}

/* Improve spacing for pagination section */
.pagination-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--crm-card-border, #e2e8f0);
}

/* First/Last page buttons styling */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    font-weight: 600;
}

/* Per page selector styling */
.per-page-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.per-page-selector .form-select {
    border-radius: 0.5rem;
    border: 1.5px solid var(--crm-card-border, #e2e8f0);
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: #fff;
    transition: all 0.2s ease;
}

.per-page-selector .form-select:focus {
    border-color: var(--crm-primary, #4f6af5);
    box-shadow: 0 0 0 3px rgba(79, 106, 245, 0.15);
}
