/* Pagination Styles - Fix oversized arrows */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

.pagination .page-item {
    list-style: none;
}

.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination .page-link:hover {
    background: var(--gray-50);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Fix arrow SVG sizes - Force constrain with !important */
.pagination svg,
nav[role="navigation"] svg {
    width: 20px !important;
    height: 20px !important;
}

/* Pagination container styling */
nav[role="navigation"]>div.flex.justify-between.flex-1.sm\:hidden {
    display: none;
    /* Hide mobile simplified view if redundant */
}

nav[role="navigation"]>div.hidden.sm\:flex-1.sm\:flex.sm\:items-center.sm\:justify-between {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Hide "Results x-y of z" text */
nav[role="navigation"] div p.text-sm.text-gray-700 {
    display: none;
}

/* Style the buttons container */
nav[role="navigation"] div>span.relative.z-0.inline-flex.shadow-sm.rounded-md {
    box-shadow: none;
    gap: 5px;
}

/* Individual buttons */
nav[role="navigation"] span.relative.z-0.inline-flex.shadow-sm.rounded-md span,
nav[role="navigation"] span.relative.z-0.inline-flex.shadow-sm.rounded-md a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px !important;
    background: white;
    color: #374151;
    font-weight: 500;
    text-decoration: none;
    font-size: 14px;
}

/* Active state */
nav[role="navigation"] span.relative.z-0.inline-flex.shadow-sm.rounded-md span[aria-current="page"] {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Hover state */
nav[role="navigation"] span.relative.z-0.inline-flex.shadow-sm.rounded-md a:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

/* Ensure pagination text doesn't overflow */
.pagination .page-link span {
    font-size: 0.875rem;
}

/* Additional constraint for any SVG in pagination nav */
nav[aria-label="Pagination Navigation"] svg,
nav.flex svg {
    width: 16px !important;
    height: 16px !important;
}