/* Styles of resources/views/pagination.blade.php (moved out of the template so browsers cache them). */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0;
}

.pagination .page-item {
    margin: 2px;
    flex-shrink: 0; /* Prevent flex items from shrinking */
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    text-decoration: none;
    color: #333;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-weight: 500;
    min-width: 44px;
    height: 44px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    box-sizing: border-box;
    white-space: nowrap;
}

.pagination .page-link:hover {
    background-color: #3d3934;
    color: white;
    border-color: #3d3934;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 39, 36, 0.3);
}

.pagination .page-item.active .page-link {
    background-color: #3d3934;
    border-color: #3d3934;
    color: white;
    box-shadow: 0 4px 12px rgba(43, 39, 36, 0.3);
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #e9ecef;
    color: #868e96;
    pointer-events: none;
    /* Key fix: Prevent stretching of disabled buttons */
    flex-grow: 0;
    flex-shrink: 0;
    min-width: 44px !important;
    max-width: 44px !important;
    width: 44px !important;
}

.pagination .page-item.disabled .page-link:hover {
    background-color: #e9ecef;
    color: #868e96;
    transform: none;
    box-shadow: none;
    border-color: #dee2e6;
}

/* Responsive design */
@media (max-width: 768px) {
    .pagination {
        gap: 3px;
    }

    .pagination .page-link {
        padding: 8px 10px;
        min-width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .pagination .page-item.disabled .page-link {
        min-width: 36px !important;
        max-width: 36px !important;
        width: 36px !important;
    }
}

@media (max-width: 480px) {
    .pagination .page-link {
        padding: 6px 8px;
        min-width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .pagination .page-item.disabled .page-link {
        min-width: 32px !important;
        max-width: 32px !important;
        width: 32px !important;
    }
}
