@if ($paginator->hasPages())
    <nav role="navigation" aria-label="Pagination Navigation" style="display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;width:100%;">
        <div style="font-size:11px;color:#64748b;line-height:1.4;">
            Showing {{ $paginator->firstItem() ?? 0 }} to {{ $paginator->lastItem() ?? 0 }} of {{ $paginator->total() }} results
        </div>

        <div style="display:flex;align-items:center;gap:6px;flex-wrap:wrap;">
            @if ($paginator->onFirstPage())
                <span aria-disabled="true" aria-label="@lang('pagination.previous')" style="font-size:11px;padding:6px 10px;border:1px solid #e2e8f0;border-radius:8px;color:#94a3b8;background:#f8fafc;line-height:1.2;">
                    Previous
                </span>
            @else
                <a href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')" style="font-size:11px;padding:6px 10px;border:1px solid #e2e8f0;border-radius:8px;color:#334155;background:#ffffff;text-decoration:none;line-height:1.2;">
                    Previous
                </a>
            @endif

            @foreach ($elements as $element)
                @if (is_string($element))
                    <span aria-disabled="true" style="font-size:11px;padding:6px 4px;color:#94a3b8;line-height:1.2;">{{ $element }}</span>
                @endif

                @if (is_array($element))
                    @foreach ($element as $page => $url)
                        @if ($page == $paginator->currentPage())
                            <span aria-current="page" style="min-width:32px;text-align:center;font-size:11px;padding:6px 10px;border:1px solid #1a3c6e;border-radius:8px;color:#ffffff;background:#1a3c6e;font-weight:700;line-height:1.2;">
                                {{ $page }}
                            </span>
                        @else
                            <a href="{{ $url }}" aria-label="Go to page {{ $page }}" style="min-width:32px;text-align:center;font-size:11px;padding:6px 10px;border:1px solid #e2e8f0;border-radius:8px;color:#334155;background:#ffffff;text-decoration:none;line-height:1.2;">
                                {{ $page }}
                            </a>
                        @endif
                    @endforeach
                @endif
            @endforeach

            @if ($paginator->hasMorePages())
                <a href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')" style="font-size:11px;padding:6px 10px;border:1px solid #e2e8f0;border-radius:8px;color:#334155;background:#ffffff;text-decoration:none;line-height:1.2;">
                    Next
                </a>
            @else
                <span aria-disabled="true" aria-label="@lang('pagination.next')" style="font-size:11px;padding:6px 10px;border:1px solid #e2e8f0;border-radius:8px;color:#94a3b8;background:#f8fafc;line-height:1.2;">
                    Next
                </span>
            @endif
        </div>
    </nav>
@endif
