@if ($paginator->hasPages())
<nav class="pagination-nav" role="navigation" aria-label="Pagination">
  @if ($paginator->onFirstPage())
    <span class="page-btn disabled">← Prev</span>
  @else
    <a class="page-btn" href="{{ $paginator->previousPageUrl() }}">← Prev</a>
  @endif

  @foreach ($elements as $element)
    @if (is_string($element))
      <span class="page-btn dots">{{ $element }}</span>
    @endif
    @if (is_array($element))
      @foreach ($element as $page => $url)
        @if ($page == $paginator->currentPage())
          <span class="page-btn current">{{ $page }}</span>
        @else
          <a class="page-btn" href="{{ $url }}">{{ $page }}</a>
        @endif
      @endforeach
    @endif
  @endforeach

  @if ($paginator->hasMorePages())
    <a class="page-btn" href="{{ $paginator->nextPageUrl() }}">Next →</a>
  @else
    <span class="page-btn disabled">Next →</span>
  @endif
</nav>
@endif
